Mute HDMI audio in UI

Hello, would it be possible to add ON/OFF option in Kodi UI for muting hdmi audio? This is useful for those who are using toslink output for external DAC or amplifiers. Personally I wrote simple script, mapped it to button and launching it by pressing the key.
But I have feedbacks from Homatics owners that people would welcome this option directly in Kodi UI (those that don’t want to mess up with CLI too much).

Here’s the script if anybody would be interested:

mute_status=$(amixer sset 'Audio hdmi-out mute' toggle | grep Playback | tail -1 | awk '{ printf($3) }')
#mute_status=$(amixer sset 'Audio hdmi-out mute' toggle | grep -o '\[on\]\|\[off\]')
#mute_status=$(amixer sset 'Audio hdmi-out mute' toggle | grep -oP '(?<=\[)[^]]*(?=\])')

curl -H "Content-Type: application/json" -X POST -d "{
   \"jsonrpc\": \"2.0\",
   \"method\": \"GUI.ShowNotification\",
   \"params\": {
       \"title\": \"HDMI audio mute\",
       \"message\": \"$mute_status\",
       \"displaytime\": 5000
   \"id\": 1
}" http://localhost:8080/jsonrpc

Please be more in detail what system you use. I don’t think this option is available for all platforms.

Oh, I am sorry. I am using Dune/Homatics R 4K Plus and running CE 21.0-Omega_nightly build. I used to use osmc (that time it was Nexus 20.2) in the past and this option was somewhere in the System - Audio settings as ON/OFF switch, so I would assume it might be possible in CE too.
As stated above, this can be achieved by running
amixer sset 'Audio hdmi-out mute' off
on command line in CE.

It depends on kernel if it’s supported or not. I will check it when there is some spare time.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.