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.
alsa-info.sh +1 -1
@@ -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
Signature · 2 lines
Happiness is like peeing your pants. Everyone can see it, but only you can feel its warmth
Takashi Iwai
AppliedAt Mon, 25 Feb 2008 15:18:10 +1000,
Quoted 5 lines · Travis Place
The below patch should stop
alsa-info.shfrom 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