sound: (arm) use /proc/asound/cards to detect soundcard changes if PCI bus is missing
This commit is contained in:
parent
f365eb6f03
commit
dd6e1435ce
@ -73,7 +73,16 @@ set 'Audigy Analog/Digital Output Jack' off
|
|||||||
_EOF
|
_EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
SOUND_DEV="`lspci -n | grep " 04[0-9][0-9]: "`"
|
if [ -e /proc/bus/pci ]; then
|
||||||
|
SOUND_DEV="`lspci -n | grep " 04[0-9][0-9]: "`"
|
||||||
|
fi
|
||||||
|
if [ ! "$SOUND_DEV" ]; then
|
||||||
|
if [ -e /proc/asound/cards ]; then
|
||||||
|
SOUND_DEV="`md5sum /proc/asound/cards 2>/dev/null`"
|
||||||
|
else
|
||||||
|
SOUND_DEV="missing"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$SOUND_FORCE_RESCAN" != "on" -a "$SOUND_FORCE_RESCAN" != "1" ]; then
|
if [ "$SOUND_FORCE_RESCAN" != "on" -a "$SOUND_FORCE_RESCAN" != "1" ]; then
|
||||||
if [ -e $postpluglibdir/sound.cache ]; then
|
if [ -e $postpluglibdir/sound.cache ]; then
|
||||||
@ -87,7 +96,7 @@ fi
|
|||||||
echo "$SOUND_DEV" > $postpluglibdir/sound.cache
|
echo "$SOUND_DEV" > $postpluglibdir/sound.cache
|
||||||
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* | head -n1`
|
codec=`grep Codec: $c/codec* 2>/dev/null | head -n1`
|
||||||
logmsg "$me" $"setting volumes for $id sound card ($codec)"
|
logmsg "$me" $"setting volumes for $id sound card ($codec)"
|
||||||
index=${d1/*card}
|
index=${d1/*card}
|
||||||
set_mixers $index
|
set_mixers $index
|
||||||
|
Loading…
Reference in New Issue
Block a user