]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsa-info.sh: print ctl-led list from sysfs
authorJaroslav Kysela <perex@perex.cz>
Fri, 24 Mar 2023 08:07:29 +0000 (09:07 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 24 Mar 2023 08:07:43 +0000 (09:07 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsa-info/alsa-info.sh

index 251472a9f19491beca981e88c6683f51e60edacc..04d6d1762119d0b55e84b7a1211a9a255c1f3c22 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-SCRIPT_VERSION=0.5.1
+SCRIPT_VERSION=0.5.2
 CHANGELOG="https://www.alsa-project.org/alsa-info.sh.changelog"
 
 #################################################################################
@@ -662,6 +662,21 @@ if [ -d "$SYSFS" ]; then
                echo "" >> $FILE
        done
        echo "" >> $FILE
+       if [ -d $SYSFS/class/sound/ctl-led ]; then
+               echo "!!Sysfs ctl-led info" >> $FILE
+               echo "!!---------------" >> $FILE
+               echo "" >> $FILE
+               for path in $(echo $SYSFS/class/sound/ctl-led/[ms][ip]*/card*); do
+                       echo "!!CTL-LED: $path" >> $FILE
+                       if [ -r "$path/list" ]; then
+                               list=$(cat "$path/list")
+                               echo "List: $list" >> $FILE
+                       fi
+                       #echo "Tree:" >> $FILE
+                       #tree --noreport $path -L 2 | sed -e 's/^/\t/g' >> $FILE
+                       echo "" >> $FILE
+               done
+       fi
 fi
 
 if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then