[alsa-devel] Patch for alsa-info.sh
The below patch should stop alsa-info.sh from running amixer on cards that dont exist (ie, if the user has no card0, but has a card1) I realise its a generally a rare case, and cards are _usually_ consecutive, but we might aswell cover all bases if we can.
diff -r 7907cfbab11c alsa-info.sh --- a/alsa-info.sh Mon Feb 18 12:13:23 2008 +0100 +++ b/alsa-info.sh Mon Feb 25 15:16:16 2008 +1000 @@ -1,6 +1,6 @@ #!/bin/bash
-SCRIPT_VERSION=0.4.37 +SCRIPT_VERSION=0.4.38 CHANGELOG="http://hg.alsa-project.org/alsa/log/tip/alsa-info.sh"
################################################################################# @@ -98,7 +98,7 @@ withamixer() { echo "!!Amixer output" >> $FILE echo "!!-------------" >> $FILE echo "" >> $FILE - for i in `seq 0 $LAST_CARD`;do + for i in `grep "]: " /proc/asound/cards | awk -F ' ' '{ print $1} '` ; do CARD_NAME=`grep "^ $i" /tmp/alsainfo/alsacards.tmp|awk {'print $2'}` echo "!!-------Mixer controls for card $i $CARD_NAME]" >> $FILE echo "" >>$FILE
At Mon, 25 Feb 2008 15:18:10 +1000, Travis Place wrote:
The below patch should stop alsa-info.sh from running amixer on cards that dont exist (ie, if the user has no card0, but has a card1) I realise its a generally a rare case, and cards are _usually_ consecutive, but we might aswell cover all bases if we can.
Applied to HG tree. Thanks.
Takashi
participants (2)
-
Takashi Iwai
-
Travis Place