Patch for alsa-info.sh - AC97 including regs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, ive added the +regs file aswell, but decided to store its output in a 
seperate tmp file (before being added to the complete output).

This way, we can change how its output if we'd like, with less stuffing around 
(and all tmp files are cleaned up after each run, anyway).


-- 
Happiness is like peeing your pants. Everyone can see it, but only you can 
feel its warmth 
diff -r 93cc5f0a20f1 alsa-info.sh
--- a/alsa-info.sh	Mon Feb 25 13:07:07 2008 +0100
+++ b/alsa-info.sh	Tue Feb 26 02:04:28 2008 +1000
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-SCRIPT_VERSION=0.4.38
+SCRIPT_VERSION=0.4.39
 CHANGELOG="http://hg.alsa-project.org/alsa/log/tip/alsa-info.sh";
 
 #################################################################################
@@ -270,6 +270,10 @@ lspci |grep -i "multi\|audio">/tmp/alsai
 #Check for HDA-Intel cards codec#*
 cat /proc/asound/card*/codec\#* > /tmp/alsainfo/alsa-hda-intel.tmp 2> /dev/null
 
+#Check for AC97 cards codec
+cat /proc/asound/card*/codec97\#0/ac97\#0-0 > /tmp/alsainfo/alsa-ac97.tmp 2> /dev/null
+cat /proc/asound/card*/codec97\#0/ac97\#0-0+regs > /tmp/alsainfo/alsa-ac97-regs.tmp 2> /dev/null
+
 #Fetch the info, and put it in $FILE in a nice readable format.
 echo "name=$USER&type=33&description=/tmp/alsa-info.txt&expiry=&s=Submit+Post&content=" > $FILE
 echo "!!################################" >> $FILE
@@ -362,6 +366,21 @@ then
 	echo "" >> $FILE
 	echo "" >> $FILE
 fi
+
+if [ -s "/tmp/alsainfo/alsa-ac97.tmp" ]
+then
+        echo "!!AC97 Codec information" >> $FILE
+        echo "!!---------------------------" >> $FILE
+        echo "--startcollapse--" >> $FILE
+        echo "" >> $FILE
+        cat /tmp/alsainfo/alsa-ac97.tmp >> $FILE
+        echo "" >> $FILE
+        cat /tmp/alsainfo/alsa-ac97-regs.tmp >> $FILE
+        echo "--endcollapse--" >> $FILE
+	echo "" >> $FILE
+	echo "" >> $FILE
+fi
+
 
 #If no command line options are specified, then run as though --with-all was specified
 if [[ -z "$1" ]]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux