From https://forum.ameridroid.com/t/how-to-retain-sound-settings-on-reboot:
theoak
I am enjoying my Indiedroid Nova, and I am running Armbian 23.05.0 jammy. Thanks to the devs as this is working very well. BUT have a slight issue with HDMI sound. It does not work unless I go into Sound settings and select “Analog Output - Built-in Audio” as the Output device. On reboot, this is not saved, so I have to reset this each time I reboot.
theoak
Finally got a working script to put in autostart:
#!/bin/bash
/usr/bin/pulseaudio -k
sleep 6
/usr/bin/pacmd set-default-sink 1