mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 15:49:45 +01:00
alsaconf - add support for PnP BIOS devices
This patch adds the support for PnP BIOS devices.
This commit is contained in:
parent
18a09d56cd
commit
d112b21c86
1 changed files with 16 additions and 1 deletions
|
@ -602,10 +602,11 @@ probe_cards () {
|
||||||
if [ -r $PROCFS/isapnp ]; then
|
if [ -r $PROCFS/isapnp ]; then
|
||||||
cat $PROCFS/isapnp >"$DUMP"
|
cat $PROCFS/isapnp >"$DUMP"
|
||||||
found="1"
|
found="1"
|
||||||
elif [ -r $SYSFS/bus/pnp/devices/0[0123]:01.00 ]; then
|
elif [ -d $SYSFS/bus/pnp/devices ]; then
|
||||||
# use 2.6 kernel's sysfs output
|
# use 2.6 kernel's sysfs output
|
||||||
# fake the isapnp dump
|
# fake the isapnp dump
|
||||||
index=0
|
index=0
|
||||||
|
bindex=0
|
||||||
for d1 in $SYSFS/devices/pnp* ; do
|
for d1 in $SYSFS/devices/pnp* ; do
|
||||||
for d2 in $d1/*:* ; do
|
for d2 in $d1/*:* ; do
|
||||||
if [ -r $d2/card_id ]; then
|
if [ -r $d2/card_id ]; then
|
||||||
|
@ -614,6 +615,13 @@ probe_cards () {
|
||||||
echo "Card $index '$id:$name' " >> "$DUMP"
|
echo "Card $index '$id:$name' " >> "$DUMP"
|
||||||
index=$[$index+1]
|
index=$[$index+1]
|
||||||
found="1"
|
found="1"
|
||||||
|
else if [ -r $d2/id ]; then
|
||||||
|
# FIXME: multiple id might be present (separated with new-line)
|
||||||
|
id=`head -n 1 $d2/id`
|
||||||
|
echo "BIOS $bindex '$id' " >> "$DUMP"
|
||||||
|
bindex=$[$bindex+1]
|
||||||
|
found="1"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -658,14 +666,21 @@ BEGIN {
|
||||||
gsub(/0x/, "");
|
gsub(/0x/, "");
|
||||||
gsub(/=/, ":");
|
gsub(/=/, ":");
|
||||||
x = sprintf ("'$lspci' -n 2>/dev/null| grep '"' 040.: '"' | grep %s", $2);
|
x = sprintf ("'$lspci' -n 2>/dev/null| grep '"' 040.: '"' | grep %s", $2);
|
||||||
|
print x
|
||||||
if (system (x) == 0)
|
if (system (x) == 0)
|
||||||
printf "%s %s\n", $2, driver >>"'"$FOUND"'"
|
printf "%s %s\n", $2, driver >>"'"$FOUND"'"
|
||||||
}
|
}
|
||||||
/^[<literal space><literal tab>]*ISAPNP: /{
|
/^[<literal space><literal tab>]*ISAPNP: /{
|
||||||
|
id2 = substr($0, index($0, "=")+1);
|
||||||
gsub(/=.*/, "");
|
gsub(/=.*/, "");
|
||||||
x = sprintf ("grep '\''^Card [0-9] .%s:'\'' '"$DUMP"'", $2);
|
x = sprintf ("grep '\''^Card [0-9] .%s:'\'' '"$DUMP"'", $2);
|
||||||
if (system (x) == 0)
|
if (system (x) == 0)
|
||||||
printf "%s %s\n", $2, driver >>"'"$FOUND"'"
|
printf "%s %s\n", $2, driver >>"'"$FOUND"'"
|
||||||
|
else if (index($2, "ffff") > 0) {
|
||||||
|
x = sprintf ("grep '\''^BIOS [0-9]* .%s.'\'' '"$DUMP"'", id2);
|
||||||
|
if (system (x) == 0)
|
||||||
|
printf "%s %s\n", id2, driver >>"'"$FOUND"'"
|
||||||
|
}
|
||||||
}' < $CARDID_DB |\
|
}' < $CARDID_DB |\
|
||||||
$DIALOG --gauge "$msg" 6 40 0
|
$DIALOG --gauge "$msg" 6 40 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue