Option 1:
I tried but always seems to be save only from desktop with below steps as above:
- Desktop environment,
- Start any stream/app to see which output uses by default.
Example play in loop a video/audio file with a player
- Opened pulse audio mixer gui. From there chang the default playback device. The correct choice will give you sound again back on HDMI.
- Optional wiht cli pulsemixer you can do the checking by simply selecting the stream you opened and select it (and press enter then move and selet the other output devise (sound will play on the correct output device)
Lastly, once you set the master output you can make it perm I run 'sudo alsactl store'.
this will store in your alsa asound.state and after reboot all will be as you selected.
Option 2:
As per Fine Tuning - Armbian Documentation (It should automatically update the asound.state you created above. If you havent check the file exists after reboot in /var/lib/alsa folder
You will see something similar to my output:
# Define the new default sound output
pacmd set-default-sink <NAME-OF-DESIRED-OPTION>
The name of HDMI sound output may change accordingly to the device. If you don’t wanna deal with different names you can:
pacmd set-default-sink $(pactl list short sinks | grep -i 'hdmi' | awk '{print $2}')
The command to define the default sound output is not persistent, to make it persistent add it to the file ~/.bashrc
For example:
In my .bashrc i have at the end this 2 lines commented and you can swap between or make a script to apply between jack and hdmi output as per your needs/setup. Analogue should
Y
Update (workaround/solution):
I have installed manually latest ubuntu pygame dependencies from the pygame compile documentation and install latest stable pygame 2.1.2 version
No DUMMY OUTPUT but later requires you to use python3 scripts that use pygame
PS First post combo though will cause the DUMMY OUTPUT (no sound) from any other media application apart the python pygame mixer