[alsa-devel] [PATCH/RFC] alsa-info: add DMI data to the alsa-info output
Ozan Çağlayan
ozan at pardus.org.tr
Sun May 31 21:36:37 CEST 2009
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
More information about the Alsa-devel
mailing list