From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] alsa-info: Run without lspci (if there is no pci bus)
Date: Thu, 29 Aug 2013 18:11:35 +0200 [thread overview]
Message-ID: <s5h4na8fpe0.wl%tiwai@suse.de> (raw)
In-Reply-To: <521BEEFE.4020400@canonical.com>
At Tue, 27 Aug 2013 02:12:46 +0200,
David Henningsson wrote:
>
> On 08/09/2013 03:55 PM, Takashi Iwai wrote:
> > At Fri, 9 Aug 2013 14:47:49 +0200,
> > David Henningsson wrote:
> >>
> >> On some embedded ARM hardware, there is no pci bus. In that case,
> >> do not require lspci so we can still get as much info as we can.
> >>
> >> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> >
> > Thanks, applied to my tree.
>
> Ping - did this ever get pushed to the official alsa-info?
Pushed to alsa-driver.org git tree now.
Takashi
>
> >
> >
> > Takashi
> >
> >> ---
> >> alsa/utils/alsa-info.sh | 13 +++++++++----
> >> 1 file changed, 9 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/alsa/utils/alsa-info.sh b/alsa/utils/alsa-info.sh
> >> index 9d996aa..2280af5 100755
> >> --- a/alsa/utils/alsa-info.sh
> >> +++ b/alsa/utils/alsa-info.sh
> >> @@ -393,8 +393,10 @@ trap cleanup 0
> >> if [ "$PROCEED" = "yes" ]; then
> >>
> >> if [ -z "$LSPCI" ]; then
> >> - echo "This script requires lspci. Please install it, and re-run this script."
> >> - exit 0
> >> + if [ -d /sys/bus/pci ]; then
> >> + echo "This script requires lspci. Please install it, and re-run this script."
> >> + exit 0
> >> + fi
> >> fi
> >>
> >> #Fetch the info and store in temp files/variables
> >> @@ -407,8 +409,6 @@ KERNEL_OS=`uname -o`
> >> ALSA_DRIVER_VERSION=`cat /proc/asound/version |head -n1|awk {'print $7'} |sed 's/\.$//'`
> >> get_alsa_library_version
> >> ALSA_UTILS_VERSION=`amixer -v |awk {'print $3'}`
> >> -VENDOR_ID=`lspci -vn | grep 040[1-3] | awk -F':' '{print $3}'| awk {'print substr($0, 2);}' >$TEMPDIR/vendor_id.tmp`
> >> -DEVICE_ID=`lspci -vn | grep 040[1-3] | awk -F':' '{print $4}'| awk {'print $1'} >$TEMPDIR/device_id.tmp`
> >> LAST_CARD=$((`grep "]: " /proc/asound/cards | wc -l` - 1 ))
> >>
> >> ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
> >> @@ -434,7 +434,9 @@ fi
> >>
> >> cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp
> >> cat /proc/asound/cards >$TEMPDIR/alsacards.tmp
> >> +if [[ ! -z "$LSPCI" ]]; then
> >> lspci |grep -i "multi\|audio">$TEMPDIR/lspci.tmp
> >> +fi
> >>
> >> #Check for HDA-Intel cards codec#*
> >> cat /proc/asound/card*/codec\#* > $TEMPDIR/alsa-hda-intel.tmp 2> /dev/null
> >> @@ -547,6 +549,8 @@ echo "" >> $FILE
> >> cat $TEMPDIR/alsacards.tmp >> $FILE
> >> echo "" >> $FILE
> >> echo "" >> $FILE
> >> +
> >> +if [[ ! -z "$LSPCI" ]]; then
> >> echo "!!PCI Soundcards installed in the system" >> $FILE
> >> echo "!!--------------------------------------" >> $FILE
> >> echo "" >> $FILE
> >> @@ -559,6 +563,7 @@ echo "" >> $FILE
> >> lspci -vvn |grep -A1 040[1-3] >> $FILE
> >> echo "" >> $FILE
> >> echo "" >> $FILE
> >> +fi
> >>
> >> if [ "$SNDOPTIONS" ]
> >> then
> >> --
> >> 1.7.9.5
> >>
> >
>
>
>
> --
> David Henningsson, Canonical Ltd.
> https://launchpad.net/~diwic
>
prev parent reply other threads:[~2013-08-29 16:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 12:47 [PATCH] alsa-info: Run without lspci (if there is no pci bus) David Henningsson
2013-08-09 13:55 ` Takashi Iwai
2013-08-27 0:12 ` David Henningsson
2013-08-29 16:11 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h4na8fpe0.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox