alsa-info.sh: add sysfs card info section

It may be useful to dump the sysfs tree to gather
more runtime information.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-02-22 10:56:31 +01:00
parent c990f9a8ad
commit c1f8cc2f07

View file

@ -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