summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2023-03-24 09:07:29 +0100
committerJaroslav Kysela <perex@perex.cz>2023-03-24 09:07:43 +0100
commitca503e3519b36cd6497e45d3b2fb633c6102e73b (patch)
tree704b7530840e5a7f9c8f464544986c6e512297e8
parentfd2e386b3ee660e4164fff6e6de33a25d024b041 (diff)
downloadalsa-utils-ca503e3519b36cd6497e45d3b2fb633c6102e73b.tar.gz
alsa-info.sh: print ctl-led list from sysfs
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rwxr-xr-xalsa-info/alsa-info.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh
index 251472a..04d6d17 100755
--- a/alsa-info/alsa-info.sh
+++ b/alsa-info/alsa-info.sh
@@ -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