Recently I have set up a Linux Computer (Mint Linux XFCE 18.1) for playing media contents. The system is connected to my TV using HDMI, and initially everything seems working fine. Then I found it is having sound issue after I had turned my TV off and on again. The system keeps falling back to analog output.
After a bit of research on Google, this seems to be a known issue. I took the suggestions from this guide at
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#No_HDMI_sound_output_after_some_time_with_the_monitor_turned_off
I commented out the "load-module module-switch-on-port-available" option in
/etc/pulse/default.pa as advised, and this seems fixed my issue.
...
### Should be after module-*-restore but before module-*-detect
#load-module module-switch-on-port-available