All of lore.kernel.org
 help / color / mirror / Atom feed
From: Travis Place <wishie@wishie.net>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] Add some system information to alsa-info.sh output
Date: Tue, 01 Jul 2008 02:31:37 +1000	[thread overview]
Message-ID: <1214843497.11032.4.camel@temp-fallen> (raw)

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

             reply	other threads:[~2008-06-30 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 16:31 Travis Place [this message]
2008-06-30 16:42 ` [PATCH] Add some system information to alsa-info.sh output 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

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=1214843497.11032.4.camel@temp-fallen \
    --to=wishie@wishie.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 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.