[Pkg-alsa-devel] [Debian ALSA CVS] debian/alsa-utils (3 files)

Thomas Hood jdthood-guest@haydn.debian.org
Mon, 06 Sep 2004 06:33:47 -0600


    Date: Monday, September 6, 2004 @ 06:33:47
  Author: jdthood-guest
    Path: /cvsroot/pkg-alsa/debian/alsa-utils

Modified: alsaconf/alsaconf.in alsactl/alsactl.1 alsactl/alsactl.c

Undo last change due to my failure to 'dpatch deapply-all' prior to checking in


----------------------+
 alsaconf/alsaconf.in |   29 ++++++++++++++++++-----------
 alsactl/alsactl.1    |    4 ++--
 alsactl/alsactl.c    |    2 +-
 3 files changed, 21 insertions(+), 14 deletions(-)


Index: debian/alsa-utils/alsaconf/alsaconf.in
diff -u debian/alsa-utils/alsaconf/alsaconf.in:1.4 debian/alsa-utils/alsaconf/alsaconf.in:1.5
--- debian/alsa-utils/alsaconf/alsaconf.in:1.4	Mon Sep  6 06:28:51 2004
+++ debian/alsa-utils/alsaconf/alsaconf.in	Mon Sep  6 06:33:45 2004
@@ -40,6 +40,13 @@
   distribution="unknown"
 fi
 
+for prog in lspci lsmod; do
+	for path in /sbin /usr/sbin /bin /usr/bin;do
+		[[ -x $path/$prog ]] && eval $prog=$path/$prog
+	done
+done
+unset prog path
+
 usage() {
     echo "ALSA configurator version $version"
     echo "usage: alsaconf [options]"
@@ -72,8 +79,8 @@
 use_modinfo_db=0
 do_logging=0
 alsa_uid=0
-alsa_gid=29
-alsa_mode=0660
+alsa_gid=0
+alsa_mode=0666
 legacy_probe_card=""
 LOGFILE="/tmp/alsaconf.log"
 TESTSOUND="@TESTSOUND@"
@@ -164,7 +171,7 @@
   fi
   cfgfile="/etc/modprobe.conf"
 elif [ "$distribution" = "debian" ]; then
-  cfgfile="/etc/modutils/alsa-base"
+  cfgfile="/etc/alsa/modutils/0.9"
 elif [ -e /etc/modules.conf ]; then
   cfgfile="/etc/modules.conf"
 elif [ -e /etc/conf.modules ]; then
@@ -499,7 +506,7 @@
 /^[<literal space><literal tab>]*PCI: /{
 	gsub(/0x/, "");
 	gsub(/=/, ":");
-	x = sprintf ("'/usr/bin/lspci' -n | grep '"' 0401: '"' | grep %s", $2);
+	x = sprintf ("'$lspci' -n 2>/dev/null| grep '"'Class 0401'"' | grep %s", $2);
 	if (system (x) == 0)
 		printf "%s %s\n", $2, driver >>"'"$FOUND"'"
 }
@@ -530,7 +537,7 @@
 #
 find_device_name () {
     if expr "$1" : '[0-9a-f][0-9a-f][0-9a-f][0-9a-f]:[0-9a-f][0-9a-f][0-9a-f][0-9a-f]' >/dev/null; then
-	/usr/bin/lspci -d $1 2>/dev/null| sed -e 's/^.*:..\.. Multimedia audio controller: //g'
+	$lspci -d $1 2>/dev/null| sed -e 's/^.*:..\.. Multimedia audio controller: //g'
 	return
     elif expr "$1" : '[A-Z@][A-Z@][A-Z@][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' >/dev/null; then
 	cardname=`grep '^Card [0-9]\+ '\'$1':' $DUMP | head -n 1 | sed -e 's/^Card [0-9]\+ '\''.*:\(.*\)'\'' .*$/\1/'`
@@ -682,8 +689,8 @@
 	  aplay $TESTSOUND
       fi
     fi
-    if [ ! -r /var/lib/alsa/asound.state ]; then
-	echo "Saving the mixer setup used for this in /var/lib/alsa/asound.state."
+    if [ ! -r /etc/asound.state ]; then
+	echo "Saving the mixer setup used for this in /etc/asound.state."
 	$sbindir/alsactl store
     fi
     clear
@@ -728,7 +735,7 @@
 ac_try_load () {
     test $do_logging = 1 && echo "$1 ${*:2}" >> $LOGFILE
     /sbin/modprobe snd-$1 ${*:2} >/dev/null 2>&1
-    if /bin/lsmod | grep -E '^(snd-|snd_)'$1' ' >/dev/null 2>&1; then
+    if $lsmod | grep -E '^(snd-|snd_)'$1' ' >/dev/null 2>&1; then
 	: ;
     else
 	modprobe -r snd-$1 >/dev/null 2>&1
@@ -767,7 +774,7 @@
 ac_try_capture () {
     test $do_logging = 1 && echo "$1 ${*:2}" >> $LOGFILE
     /sbin/modprobe snd-$1 ${*:3} >/dev/null 2>&1
-    if /bin/lsmod | grep -E '^(snd-|snd_)'$1' ' >/dev/null 2>&1; then
+    if $lsmod | grep -E '^(snd-|snd_)'$1' ' >/dev/null 2>&1; then
 	: ;
     else
 	modprobe -r snd-$1 >/dev/null 2>&1
@@ -1123,7 +1130,7 @@
     # check for TP600E
     #
     if [ ${devs_found[0]} = cs46xx ]; then
-	if /usr/bin/lspci -nv 2>/dev/null| grep -q "Subsystem: 1014:1010"; then
+	if $lspci -nv 2>/dev/null| grep -q "Subsystem: 1014:1010"; then
 	    if $DIALOG --yesno "
  Looks like you having a Thinkpad 600E or 770 notebook.
  On this notebook, CS4236 driver should be used
@@ -1136,7 +1143,7 @@
 		ac_config_legacy cs4236
 		exit 0
 	    fi
-	elif /usr/bin/lspci -nv 2>/dev/null| grep -q "Subsystem: 8086:8080"; then
+	elif $lspci -nv 2>/dev/null| grep -q "Subsystem: 8086:8080"; then
 	    if $DIALOG --yesno "
  Looks like you having a Dell Dimension machine.
  On this machine, CS4232 driver should be used
Index: debian/alsa-utils/alsactl/alsactl.1
diff -u debian/alsa-utils/alsactl/alsactl.1:1.2 debian/alsa-utils/alsactl/alsactl.1:1.3
--- debian/alsa-utils/alsactl/alsactl.1:1.2	Mon Sep  6 06:28:51 2004
+++ debian/alsa-utils/alsactl/alsactl.1	Mon Sep  6 06:33:46 2004
@@ -34,7 +34,7 @@
 
 .TP
 \fI-f, --file\fP
-Select the configuration file to use. The default is /var/lib/alsa/asound.state
+Select the configuration file to use. The default is /etc/asound.state
 
 .TP
 \fI-F, --force\fP
@@ -50,7 +50,7 @@
 Print alsactl version number.
 
 .SH FILES
-\fI/var/lib/alsa/asound.state\fP (or whatever file you specify with the
+\fI/etc/asound.state\fP (or whatever file you specify with the
 \fB-f\fP flag) is used to store current settings for your
 soundcards. The settings include all the usual soundcard mixer
 settings.  More importantly, alsactl is
Index: debian/alsa-utils/alsactl/alsactl.c
diff -u debian/alsa-utils/alsactl/alsactl.c:1.2 debian/alsa-utils/alsactl/alsactl.c:1.3
--- debian/alsa-utils/alsactl/alsactl.c:1.2	Mon Sep  6 06:28:51 2004
+++ debian/alsa-utils/alsactl/alsactl.c	Mon Sep  6 06:33:46 2004
@@ -29,7 +29,7 @@
 #include <errno.h>
 #include <alsa/asoundlib.h>
 
-#define SYS_ASOUNDRC "/var/lib/alsa/asound.state"
+#define SYS_ASOUNDRC "/etc/asound.state"
 
 int debugflag = 0;
 int force_restore = 0;