Muting HDMI Audio Output

Hi all,

When using my Odroid N2 I wanted to be able to mute the HDMI Audio Output when using SPDIF, so I used the F3 key on my remote to run a command.

Keymap was this:

				<key id="61530">control.setfocus(9000,0,absolute)</key>
				<F1>RunScript(,1)</F1>      <!-- switches to profile 1 -->
				<F2>RunScript(,2)</F2>      <!-- switches to profile 2 -->
				<F6>RunScript(,3)</F6>      <!-- switches to profile 3 -->
				<F4>RunScript(,4)</F4>      <!-- switches to profile 4 -->
				<F5>RunScript(,popup)</F5>  <!-- displays a dialog for you to pick a profile -->
				<F8>RunScript(,0)</F8>      <!-- rotates through the profiles -->
</keymap> was this:

if amixer get 'Audio hdmi-out mute' | grep -q 'off'; then
	amixer sset 'Audio hdmi-out mute' on &> /dev/null
	kodi-send --action "RunScript(,2)"
	amixer sset 'Audio hdmi-out mute' off &> /dev/null
	kodi-send --action "RunScript(,1)"

All I did was press F3 on the remote and start playing the video. There was no audio from the HDMI and I could listen to the SPDIF Headphones. All worked great for years.

I now have an AM6B+ and while the F3 key still mutes the HDMI output it is unmuted as soon as I start playing a video. Why, and how do I stop this from happening?


EDIT: Some more information - Seems the problem is related to playing HDR10 and HDR10+ videos only.

I enabled debug, rebooted, run at 2024-06-24 08:52:53.826 to enable the SPDIF output and to mute the audio from the HDMI output. This worked! I then played an HDR10 video via File Manager and the HDMI Audio became unmuted.

Log and configure is here:

115 views and nobody has any ideas?

If you require more information please ask.