* [PATCH] Add some system information to alsa-info.sh output
@ 2008-06-30 16:31 Travis Place
2008-06-30 16:42 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Travis Place @ 2008-06-30 16:31 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
First some information about this..
I was planning on using dmidecode to fetch this information, but that
required 1) the script be run as root, and 2) requires the user to have
dmidecode installed (most people wouldnt). So we fetch from /sys/ (if
available).
Patch attached.
Changelog: Fetch the board_vendor, product_version and product_name from
DMI in /sys/ (if available). Increased alsa-info.sh version to 0.4.49.
Signed-off-by: Travis Place <wishie@wishie.net>
[-- Attachment #2: alsa-info.sh-0.4.49.patch --]
[-- Type: text/x-patch, Size: 1313 bytes --]
--- alsa-info.sh 2008-06-17 02:53:27.000000000 +1000
+++ alsa-info.sh.wishie 2008-07-01 02:25:46.000000000 +1000
@@ -1,6 +1,6 @@
#!/bin/bash
-SCRIPT_VERSION=0.4.48
+SCRIPT_VERSION=0.4.49
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
#################################################################################
@@ -288,6 +288,12 @@
cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>/tmp/alsainfo/alsamodules.tmp
cat /proc/asound/cards >/tmp/alsainfo/alsacards.tmp
lspci |grep -i "multi\|audio">/tmp/alsainfo/lspci.tmp
+if [ -d $SYSFS ]
+then
+BOARD_VENDOR=`cat /sys/devices/virtual/dmi/id/board_vendor`
+PRODUCT_VERSION=`cat /sys/devices/virtual/dmi/id/product_version`
+PRODUCT_NAME=`cat /sys/devices/virtual/dmi/id/product_name`
+fi
#Check for HDA-Intel cards codec#*
cat /proc/asound/card*/codec\#* > /tmp/alsainfo/alsa-hda-intel.tmp 2> /dev/null
@@ -311,6 +317,15 @@
echo $DISTRO >> $FILE
echo "" >> $FILE
echo "" >> $FILE
+if [ -d $SYSFS ]
+then
+echo "!!Hardware Information" >> $FILE
+echo "!!--------------------" >> $FILE
+echo "Board Vendor: $BOARD_VENDOR" >> $FILE
+echo "Product: $PRODUCT_VERSION ($PRODUCT_NAME)" >> $FILE
+echo "" >> $FILE
+echo "" >> $FILE
+fi
echo "!!Kernel Information" >> $FILE
echo "!!------------------" >> $FILE
echo "" >> $FILE
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-06-30 16:31 [PATCH] Add some system information to alsa-info.sh output Travis Place
@ 2008-06-30 16:42 ` Mark Brown
2008-06-30 17:36 ` Travis Place
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2008-06-30 16:42 UTC (permalink / raw)
To: Travis Place; +Cc: Takashi Iwai, alsa-devel
On Tue, Jul 01, 2008 at 02:31:37AM +1000, Travis Place wrote:
> +if [ -d $SYSFS ]
> +then
> +BOARD_VENDOR=`cat /sys/devices/virtual/dmi/id/board_vendor`
> +PRODUCT_VERSION=`cat /sys/devices/virtual/dmi/id/product_version`
> +PRODUCT_NAME=`cat /sys/devices/virtual/dmi/id/product_name`
This produces visible errors if the information isn't present (which
would be reasonable enough). It might be better to check for errors and
include something about being unable to read DMI information in the
report - that'd be a bit less scary.
Also, on my system the DMI information is under /sys/class/dmi rather
than /sys/devices/virtual (this is with 2.6.25).
> +fi
How about bios_vendor, bios_date and bios_version as well?
For embedded devices the relevant information is often in /proc/cpuinfo
so it might be worth adding that too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-06-30 16:42 ` Mark Brown
@ 2008-06-30 17:36 ` Travis Place
2008-07-01 9:34 ` Mark Brown
2008-07-01 9:48 ` Takashi Iwai
0 siblings, 2 replies; 7+ messages in thread
From: Travis Place @ 2008-06-30 17:36 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
I think i was a bit quick/excited about getting this info in
there..Tested on my 2 machines here (both running 2.6.24 though) without
issues.. Will have to look into it further (after taking your advice)
and rework this patch.
On Mon, 2008-06-30 at 17:42 +0100, Mark Brown wrote:
> On Tue, Jul 01, 2008 at 02:31:37AM +1000, Travis Place wrote:
>
> > +if [ -d $SYSFS ]
> > +then
> > +BOARD_VENDOR=`cat /sys/devices/virtual/dmi/id/board_vendor`
> > +PRODUCT_VERSION=`cat /sys/devices/virtual/dmi/id/product_version`
> > +PRODUCT_NAME=`cat /sys/devices/virtual/dmi/id/product_name`
>
> This produces visible errors if the information isn't present (which
> would be reasonable enough). It might be better to check for errors and
> include something about being unable to read DMI information in the
> report - that'd be a bit less scary.
>
> Also, on my system the DMI information is under /sys/class/dmi rather
> than /sys/devices/virtual (this is with 2.6.25).
This will certainly be a pain, if the info keep moving around.. unless
we do some quick 'search' for the 'dmi' dir.
>
> > +fi
>
> How about bios_vendor, bios_date and bios_version as well?
>
How useful is the BIOS information going to be, in most cases ?
> For embedded devices the relevant information is often in /proc/cpuinfo
> so it might be worth adding that too.
Can i get an example output or 'cpuinfo' on an embedded device (if you
have one available) so i can see what im looking for.
Thanks,
Travis Place
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-06-30 17:36 ` Travis Place
@ 2008-07-01 9:34 ` Mark Brown
2008-07-01 9:50 ` Takashi Iwai
2008-07-01 9:48 ` Takashi Iwai
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2008-07-01 9:34 UTC (permalink / raw)
To: Travis Place; +Cc: alsa-devel
On Tue, Jul 01, 2008 at 03:36:00AM +1000, Travis Place wrote:
> On Mon, 2008-06-30 at 17:42 +0100, Mark Brown wrote:
> > How about bios_vendor, bios_date and bios_version as well?
> How useful is the BIOS information going to be, in most cases ?
Well, ideally most of the time all this information will be useless
since everything will work fine :) . I'd expect it to be useful
sometimes for handling things like broken information about setup for
HDA codecs.
> > For embedded devices the relevant information is often in /proc/cpuinfo
> > so it might be worth adding that too.
> Can i get an example output or 'cpuinfo' on an embedded device (if you
> have one available) so i can see what im looking for.
The particular output varies with platform and some platforms allow
machine drivers to add entirely custom fields - it's probably safest to
just include the entire file.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-06-30 17:36 ` Travis Place
2008-07-01 9:34 ` Mark Brown
@ 2008-07-01 9:48 ` Takashi Iwai
1 sibling, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2008-07-01 9:48 UTC (permalink / raw)
To: Travis Place; +Cc: alsa-devel, Mark Brown
At Tue, 01 Jul 2008 03:36:00 +1000,
Travis Place wrote:
>
> I think i was a bit quick/excited about getting this info in
> there..Tested on my 2 machines here (both running 2.6.24 though) without
> issues.. Will have to look into it further (after taking your advice)
> and rework this patch.
>
> On Mon, 2008-06-30 at 17:42 +0100, Mark Brown wrote:
> > On Tue, Jul 01, 2008 at 02:31:37AM +1000, Travis Place wrote:
> >
> > > +if [ -d $SYSFS ]
> > > +then
> > > +BOARD_VENDOR=`cat /sys/devices/virtual/dmi/id/board_vendor`
> > > +PRODUCT_VERSION=`cat /sys/devices/virtual/dmi/id/product_version`
> > > +PRODUCT_NAME=`cat /sys/devices/virtual/dmi/id/product_name`
> >
> > This produces visible errors if the information isn't present (which
> > would be reasonable enough). It might be better to check for errors and
> > include something about being unable to read DMI information in the
> > report - that'd be a bit less scary.
> >
> > Also, on my system the DMI information is under /sys/class/dmi rather
> > than /sys/devices/virtual (this is with 2.6.25).
>
> This will certainly be a pain, if the info keep moving around.. unless
> we do some quick 'search' for the 'dmi' dir.
Well, just keeping a couple of possible places and checking each
direcory should suffice instead of just checking /sys.
> >
> > > +fi
> >
> > How about bios_vendor, bios_date and bios_version as well?
> >
> How useful is the BIOS information going to be, in most cases ?
It'd be helpful if a certain BIOS version is known to be broken.
Or, for comparing two devices, one working and one not-working.
thanks,
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-07-01 9:34 ` Mark Brown
@ 2008-07-01 9:50 ` Takashi Iwai
2008-07-01 9:52 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2008-07-01 9:50 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Travis Place
At Tue, 1 Jul 2008 10:34:52 +0100,
Mark Brown wrote:
>
> On Tue, Jul 01, 2008 at 03:36:00AM +1000, Travis Place wrote:
> > On Mon, 2008-06-30 at 17:42 +0100, Mark Brown wrote:
>
> > > For embedded devices the relevant information is often in /proc/cpuinfo
> > > so it might be worth adding that too.
>
> > Can i get an example output or 'cpuinfo' on an embedded device (if you
> > have one available) so i can see what im looking for.
>
> The particular output varies with platform and some platforms allow
> machine drivers to add entirely custom fields - it's probably safest to
> just include the entire file.
Agreed. Maybe better to be marked to collapse, since this wouldn't be
important in most cases with x86* architectures.
thanks,
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add some system information to alsa-info.sh output
2008-07-01 9:50 ` Takashi Iwai
@ 2008-07-01 9:52 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2008-07-01 9:52 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Travis Place
On Tue, Jul 01, 2008 at 11:50:52AM +0200, Takashi Iwai wrote:
> Mark Brown wrote:
> > The particular output varies with platform and some platforms allow
> > machine drivers to add entirely custom fields - it's probably safest to
> > just include the entire file.
> Agreed. Maybe better to be marked to collapse, since this wouldn't be
> important in most cases with x86* architectures.
Yeah - I meant to only suggest including this information if there was
no DMI information available.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-01 9:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-30 16:31 [PATCH] Add some system information to alsa-info.sh output Travis Place
2008-06-30 16:42 ` Mark Brown
2008-06-30 17:36 ` Travis Place
2008-07-01 9:34 ` Mark Brown
2008-07-01 9:50 ` Takashi Iwai
2008-07-01 9:52 ` Mark Brown
2008-07-01 9:48 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.