]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsa-info.sh: add sysfs card info section
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 Feb 2021 09:56:31 +0000 (10:56 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 Feb 2021 09:56:34 +0000 (10:56 +0100)
It may be useful to dump the sysfs tree to gather
more runtime information.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsa-info/alsa-info.sh

index 252a607ec021835d17d0182387d7eaa6d0e22697..0044ee741eafe7f85a08846478325c5157dd2534 100755 (executable)
@@ -611,8 +611,7 @@ echo "" >> $FILE
 echo "" >> $FILE
 fi
 
-if [ "$SNDOPTIONS" ]
-then
+if [ "$SNDOPTIONS" ]; then
 echo "!!Modprobe options (Sound related)" >> $FILE
 echo "!!--------------------------------" >> $FILE
 echo "" >> $FILE
@@ -635,6 +634,18 @@ if [ -d "$SYSFS" ]; then
                echo "" >> $FILE
        done
        echo "" >> $FILE
+       echo "!!Sysfs card info" >> $FILE
+       echo "!!---------------" >> $FILE
+       echo "" >> $FILE
+       for cdir in $(echo $SYSFS/class/sound/card*); do
+               echo "!!Card: $cdir" >> $FILE
+               driver=$(readlink -f "$cdir/device/driver")
+               echo "Driver: $driver" >> $FILE
+               echo "Tree:" >> $FILE
+               tree --noreport $cdir -L 2 | sed -e 's/^/\t/g' >> $FILE
+               echo "" >> $FILE
+       done
+       echo "" >> $FILE
 fi
 
 if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then