Improve detection of DAC2 + DSP
@@ -223,6 +223,7 @@ guess_card() {
CARD="Amp100 + DSP Module"
DSPTYPE="DSP add-on"
FEATURES="$FEATURES spdifnoclock toslink"
+ SECONDARY_MIXER_CONTROL="Digital"
else
CARD="Amp100"
fi
@@ -234,6 +235,7 @@ guess_card() {
if [ "$HAS_DSP" == "1" ]; then
CARD="DAC2 HD + DSP Module"
DSPTYPE="DSP add-on"
+ SECONDARY_MIXER_CONTROL="DAC"
else
CARD="DAC2 HD"
fi
@@ -256,6 +258,11 @@ guess_card() {
DACPRO=`aplay -l | grep DAC+ | grep Pro`
if [ "$DACPRO" != "" ]; then
+ if [ "$HAS_DSP" == "1" ]; then
+ CARD="DAC2 Pro + DSP Module"
+ DSPTYPE="DSP add-on"
+ SECONDARY_MIXER_CONTROL="Digital"
+ else
amixer sget Headphone 2>/dev/null >/dev/null
if [ $? == 0 ]; then
CARD="DAC2 Pro"
@@ -264,6 +271,7 @@ guess_card() {
else
CARD="DAC+ Pro"
fi
+ fi
return
fi
@@ -370,7 +378,6 @@ check_pi3a() {
fi
}
-
# Reconfigure SpotifyD
reconfigure_spotify() {
if [ ! -f /etc/spotifyd.conf ]; then
@@ -652,6 +659,13 @@ if [ "$HAS_DSP" == "1" ]; then
fi
fi
+if [ "$SECONDARY_MIXER_CONTROL" != "" ] && \
+ [ "$SECONDARY_MIXER_CONTROL" != "$MIXER_CONTROL" ]; then
+ echo "Detected secondary mixer control $SECONDARY_MIXER_CONTROL, setting to 100%"
+ amixer sset $SECONDARY_MIXER_CONTROL 100%
+fi
+
+
if [ "$CURRENT_MIXER_CONTROL" != "$MIXER_CONTROL" ] || \
[ "$CURRENT_CARD" != "$CARD" ] || \
[ "$CURRENT_SYSNAME" != "$SYSNAME" ] || \
