audio alsa primary card fixes

This commit is contained in:
sydarn
2026-01-18 19:14:06 +01:00
parent a9059925ce
commit 345e90f488
2 changed files with 4 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
cat <<EOF >/storage/.config/profile.d/002-audio_path
ALSA_PRIMARY_CARD=1
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_PLAYBACK_PATH="Playback Mux"
EOF

View File

@@ -26,7 +26,7 @@ then
then
export DEVICE_PLAYBACK_PATH="Playback Path"
fi
amixer -c 0 cset name="${DEVICE_PLAYBACK_PATH}" ${DEVICE_PLAYBACK_PATH_SPK} 2>/dev/null
amixer -c ${ALSA_PRIMARY_CARD:-0} cset name="${DEVICE_PLAYBACK_PATH}" ${DEVICE_PLAYBACK_PATH_SPK} 2>/dev/null
fi
VOLUME=$(get_setting audio.volume)
@@ -40,12 +40,8 @@ fi
### Set the primary card volume to 100%
### to eliminate low audio on some devices.
if [ -n "${ALSA_PRIMARY_CARD}" ]
then
amixer -c ${ALSA_PRIMARY_CARD} -q sset "Master" 100%
else
amixer -c 0 -q sset "Master" 100%
fi
amixer -c ${ALSA_PRIMARY_CARD:-0} -q sset "Master" 100%
### Now set the pipewire mixer volume
/usr/bin/volume ${VOLUME}