alsa-info.sh: print ctl-led list from sysfs

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-03-24 09:07:29 +01:00
parent fd2e386b3e
commit ca503e3519

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
SCRIPT_VERSION=0.5.1 SCRIPT_VERSION=0.5.2
CHANGELOG="https://www.alsa-project.org/alsa-info.sh.changelog" CHANGELOG="https://www.alsa-project.org/alsa-info.sh.changelog"
################################################################################# #################################################################################
@ -662,6 +662,21 @@ if [ -d "$SYSFS" ]; then
echo "" >> $FILE echo "" >> $FILE
done done
echo "" >> $FILE 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 fi
if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then