sound: workaround softvol channels initialization by running dummy aplay and arecord
This commit is contained in:
parent
f918abfc6b
commit
30e0db1d2c
@ -93,7 +93,11 @@ if [ "$SOUND_FORCE_RESCAN" != "on" -a "$SOUND_FORCE_RESCAN" != "1" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$SOUND_DEV" > $postpluglibdir/sound.cache
|
# WORKAROUND: custom softvol controls are not actived until a play/rec is done
|
||||||
|
# this also triggers kmix crash problem at first boot
|
||||||
|
aplay -q -d1 < /dev/zero
|
||||||
|
arecord -q -d1 > /dev/null
|
||||||
|
|
||||||
for c in /proc/asound/card[0-9]*; do
|
for c in /proc/asound/card[0-9]*; do
|
||||||
id=`cat $c/id`
|
id=`cat $c/id`
|
||||||
codec=`grep Codec: $c/codec* 2>/dev/null | head -n1`
|
codec=`grep Codec: $c/codec* 2>/dev/null | head -n1`
|
||||||
@ -104,9 +108,7 @@ done
|
|||||||
|
|
||||||
if [ -x /usr/sbin/alsactl ]; then
|
if [ -x /usr/sbin/alsactl ]; then
|
||||||
logmsg "$me" $"saving the mixer setup (/var/lib/sound/asound.state)"
|
logmsg "$me" $"saving the mixer setup (/var/lib/sound/asound.state)"
|
||||||
/usr/sbin/alsactl store >/dev/null
|
/usr/sbin/alsactl store > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$SOUND_DEV" > $postpluglibdir/sound.cache
|
echo "$SOUND_DEV" > $postpluglibdir/sound.cache
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user