mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 12:26:31 +01:00
alsa-info: Add lsusb and stream outputs
We need more detailed information for USB-audio devices, at least the lsusb -v output and the contents of stream* proc files. Let's add them to alsa-info.sh output. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c1b92db5ef
commit
5812f37d87
1 changed files with 33 additions and 0 deletions
|
@ -476,6 +476,18 @@ cat /proc/asound/card*/codec\#* > $TEMPDIR/alsa-hda-intel.tmp 2> /dev/null
|
|||
cat /proc/asound/card*/codec97\#0/ac97\#0-0 > $TEMPDIR/alsa-ac97.tmp 2> /dev/null
|
||||
cat /proc/asound/card*/codec97\#0/ac97\#0-0+regs > $TEMPDIR/alsa-ac97-regs.tmp 2> /dev/null
|
||||
|
||||
#Check for USB descriptors
|
||||
if [ -x /usr/bin/lsusb ]; then
|
||||
for f in /proc/asound/card[0-9]*/usbbus; do
|
||||
test -f "$f" || continue
|
||||
id=$(sed 's@/@:@' $f)
|
||||
lsusb -v -s $id >> $TEMPDIR/lsusb.tmp 2> /dev/null
|
||||
done
|
||||
fi
|
||||
|
||||
#Check for USB stream setup
|
||||
cat /proc/asound/card*/stream[0-9]* > $TEMPDIR/alsa-usbstream.tmp 2> /dev/null
|
||||
|
||||
#Check for USB mixer setup
|
||||
cat /proc/asound/card*/usbmixer > $TEMPDIR/alsa-usbmixer.tmp 2> /dev/null
|
||||
|
||||
|
@ -649,6 +661,27 @@ if [ -s "$TEMPDIR/alsa-ac97.tmp" ]; then
|
|||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/lsusb.tmp" ]; then
|
||||
echo "!!USB Descriptors" >> $FILE
|
||||
echo "!!---------------" >> $FILE
|
||||
echo "--startcollapse--" >> $FILE
|
||||
cat $TEMPDIR/lsusb.tmp >> $FILE
|
||||
echo "--endcollapse--" >> $FILE
|
||||
echo "" >> $FILE
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/lsusb.tmp" ]; then
|
||||
echo "!!USB Stream information" >> $FILE
|
||||
echo "!!----------------------" >> $FILE
|
||||
echo "--startcollapse--" >> $FILE
|
||||
echo "" >> $FILE
|
||||
cat $TEMPDIR/alsa-usbstream.tmp >> $FILE
|
||||
echo "--endcollapse--" >> $FILE
|
||||
echo "" >> $FILE
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then
|
||||
echo "!!USB Mixer information" >> $FILE
|
||||
echo "!!---------------------" >> $FILE
|
||||
|
|
Loading…
Reference in a new issue