From: "Ozan Çağlayan" <ozan@pardus.org.tr>
To: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>
Subject: [PATCH/RFC] alsa-info: add DMI data to the alsa-info output
Date: Sun, 31 May 2009 22:36:37 +0300 [thread overview]
Message-ID: <4A22DC45.6000008@pardus.org.tr> (raw)
This is a working but not a clean/good patch for doing that because I'm
not very good at shell scripting but I'm posting it just to give a
possible idea.
dmidecode should be run as root because it reads /dev/mem. If alsa-info
is run as root, providing at least the system-manufacturer and
system-product-name in the output will be very useful for distro
maintainers.
Thanks,
Ozan Caglayan
Index: alsa-info.sh
===================================================================
--- alsa-info.sh (revision 69253)
+++ alsa-info.sh (working copy)
@@ -361,6 +361,18 @@
ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+DMIDECODE=$(which dmidecode)
+DMI_SYSTEM_MANUFACTURER="Not provided"
+DMI_SYSTEM_PRODUCT_NAME="Not provided"
+
+if [ -f $DMIDECODE ]; then
+ $DMIDECODE -q &> /dev/null
+ if [ x$? != "x1" ]; then
+ DMI_SYSTEM_MANUFACTURER=$($DMIDECODE -s system-manufacturer)
+ DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name)
+ fi
+fi
+
cat /proc/asound/modules 2>/dev/null|awk {'print
$2'}>$TEMPDIR/alsamodules.tmp
cat /proc/asound/cards >$TEMPDIR/alsacards.tmp
lspci |grep -i "multi\|audio">$TEMPDIR/lspci.tmp
@@ -391,6 +403,13 @@
echo $DISTRO >> $FILE
echo "" >> $FILE
echo "" >> $FILE
+echo "!!DMI Information" >> $FILE
+echo "!!---------------" >> $FILE
+echo "" >> $FILE
+echo "Manufacturer: $DMI_SYSTEM_MANUFACTURER" >> $FILE
+echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE
+echo "" >> $FILE
+echo "" >> $FILE
echo "!!Kernel Information" >> $FILE
echo "!!------------------" >> $FILE
echo "" >> $FILE
next reply other threads:[~2009-05-31 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 19:36 Ozan Çağlayan [this message]
2009-06-01 9:19 ` [PATCH/RFC] alsa-info: add DMI data to the alsa-info output Takashi Iwai
2009-06-01 12:28 ` Lennart Poettering
2009-06-01 13:01 ` Ozan Çağlayan
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=4A22DC45.6000008@pardus.org.tr \
--to=ozan@pardus.org.tr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox