4

HDMI switching pulseaudio output with udev

view full story
linux-howto

https://bbs.archlinux.org – I'm trying to get HDMI to analog audio output switching when the HDMI cable is plugged or unplugged.I have a working script that can detect if the HDMI output is plugged or not and switch pulseaudio to the correct setting:#! /bin/bashif [ /sys/class/drm/card0-HDMI-A-1/status  == "connected" ]; then    notify-send -u normal -t 500 -i gnome-sound-properties "HDMI On" "Sound to HDMI"    pacmd "set-card-profile 0 output:hdmi-stereo"else    notify-send -u normal -t 500 -i gnome-sound-properties "HDMI Off" &quo (HowTos)