# PulseAudio Configuration for MageDok HDMI Audio
# Routes HDMI audio from DisplayPort adapter to internal speaker output

# Detect and load HDMI output module
load-module module-alsa-sink device=hw:0,3 sink_name=hdmi_stereo sink_properties="device.description='HDMI Audio'"

# Detect and configure internal speaker (fallback)
load-module module-alsa-sink device=hw:0,0 sink_name=speaker_mono sink_properties="device.description='Speaker'"

# Set HDMI as default output sink
set-default-sink hdmi_stereo

# Enable volume control
load-module module-volume-restore

# Auto-switch to HDMI when connected
load-module module-switch-on-connect

# Log sink configuration
.load-if-exists /etc/pulse/magedok-routing.conf
