[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/system-config-soundcard/devel system-config-soundcard-1.2.12-unmute.patch, NONE, 1.1 system-config-soundcard.spec, 1.15, 1.16



Author: stransky

Update of /cvs/dist/rpms/system-config-soundcard/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21661

Modified Files:
	system-config-soundcard.spec 
Added Files:
	system-config-soundcard-1.2.12-unmute.patch 
Log Message:
using /usr/bin/alsaunmute for unmuting cards

system-config-soundcard-1.2.12-unmute.patch:
 soundcardBackend.py |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

--- NEW FILE system-config-soundcard-1.2.12-unmute.patch ---
--- system-config-soundcard-1.2.12/src/soundcardBackend.py.old	2005-07-11 14:36:09.000000000 +0200
+++ system-config-soundcard-1.2.12/src/soundcardBackend.py	2005-07-11 14:55:21.000000000 +0200
@@ -140,7 +140,8 @@
                card.position = position(driverList,card.driver)
 	       self.cardList.append(card)
 
-	self.defaultModule = self.cardList[0].driver
+	if self.cardList != []:
+	    self.defaultModule = self.cardList[0].driver
 
         return self.cardList
 
@@ -257,19 +258,6 @@
 
             retval = os.system("/sbin/modprobe -r %s" % module)
 
-    def setVolumeTrack(self, track, device):
-        amixer_path = "/usr/bin/amixer"
-	amixer_pid = os.fork()
-        amixer_args = [amixer_path, "-q", "-c", device, "sset", track, "75%", "on"]
-
-        if (not amixer_pid):
-	    try:
-	        os.execv(amixer_path, amixer_args)
-            except:
-	        sys.exit(0)
-        else:
-	    os.waitpid(amixer_pid,0)
-
     def setVolume(self, index):
         if kernel_type == '2.4':
             aumix_path = "/bin/aumix-minimal"
@@ -286,12 +274,17 @@
 
         #alsa drivers load muted. we need to set the volume for them.
         if kernel_type == '2.6':
-	    device = "%d"% index
-	    self.setVolumeTrack("Master", device)
-	    self.setVolumeTrack("PCM", device)
-	    self.setVolumeTrack("PCM-2", device)
-            # For PowerMacs
-	    self.setVolumeTrack("DRC Range", device)
+	    amixer_path = "/usr/bin/alsaunmute"
+	    amixer_pid = os.fork()
+            amixer_args = [amixer_path, `index`, "-v"]
+
+            if (not amixer_pid):
+	       try:
+	          os.execv(amixer_path, amixer_args)
+               except:
+	          sys.exit(0)
+            else:
+	       os.waitpid(amixer_pid,0)
 
     def setDefault(self, index):
         if kernel_type == '2.6':


Index: system-config-soundcard.spec
===================================================================
RCS file: /cvs/dist/rpms/system-config-soundcard/devel/system-config-soundcard.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- system-config-soundcard.spec	20 Jun 2005 11:00:13 -0000	1.15
+++ system-config-soundcard.spec	11 Jul 2005 13:14:41 -0000	1.16
@@ -1,7 +1,7 @@
 Summary: A graphical interface for detecting and configuring soundcards
 Name: system-config-soundcard
 Version: 1.2.12
-Release: 2
+Release: 3
 URL: http://fedora.redhat.com/projects/config-tools/redhat-config-soundcard.html
 License: GPL
 ExclusiveOS: Linux
@@ -10,6 +10,7 @@
 BuildArch: noarch
 Source0: %{name}-%{version}.tar.bz2
 Patch0:  system-config-soundcard-1.2.12-mod.patch
+Patch1:  system-config-soundcard-1.2.12-unmute.patch
 BuildRequires: desktop-file-utils
 BuildRequires: gettext
 ExcludeArch: s390 s390x
@@ -20,7 +21,7 @@
 Requires: sox
 Requires: rhpl
 Requires: kudzu
-Requires: alsa-utils
+Requires: alsa-utils >= 1.0.9rf-3
 Requires: alsa-lib
 
 %description
@@ -29,7 +30,8 @@
 
 %prep
 %setup -q
-%patch -p1 -b .mod
+%patch0 -p1 -b .mod
+%patch1 -p1 -b .unmute
 
 %build
 make
@@ -77,6 +79,9 @@
 %attr(0644,root,root) %config /etc/pam.d/system-config-soundcard
 
 %changelog
+* Mon Jul 11 2005 Martin Stransky <stransky redhat com> 1.2.12-3
+- using /usr/bin/alsaunmute for unmuting cards
+
 * Mon Jun 20 2005 Martin Stransky <stransky redhat com> 1.2.12-2
 - read cards mumbers from /proc/asound/modules
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]