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 mutehdmiaudio.sh script if anybody would be interested:
#!/bin/bash
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