rpms/system-config-soundcard/devel system-config-soundcard-2.0.0-ainit.patch, NONE, 1.1 system-config-soundcard.spec, 1.42, 1.43

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Jul 20 22:11:34 UTC 2006


Author: stransky

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

Modified Files:
	system-config-soundcard.spec 
Added Files:
	system-config-soundcard-2.0.0-ainit.patch 
Log Message:
removed ainit parts

system-config-soundcard-2.0.0-ainit.patch:
 soundcard.py        |   14 +-------
 soundcardBackend.py |   89 +++-------------------------------------------------
 2 files changed, 8 insertions(+), 95 deletions(-)

--- NEW FILE system-config-soundcard-2.0.0-ainit.patch ---
--- system-config-soundcard-2.0.0/src/soundcardBackend.py.old	2006-07-20 21:43:45.000000000 +0200
+++ system-config-soundcard-2.0.0/src/soundcardBackend.py	2006-07-20 23:50:16.000000000 +0200
@@ -136,14 +136,12 @@
         self.default_device = 0
             
         self.hardware_device = 0
-        self.dynamic_keys = 0        
-        
+                
         self.card_max_index = 7
         self.card_min_index = 0
         
         self.card_index_changed = False
-        self.card_default_changed = False
-        self.card_dyn_keys_generate = False        
+        self.card_default_changed = False        
 
         self.readAlsaConfig()
         
@@ -153,27 +151,13 @@
         print "default_card %d" % self.default_card
             
         print "hardware_device %d" % self.hardware_device
-        print "dynamic_keys %d" % self.dynamic_keys
-        
+                
         print "card_max_index %d" % self.card_max_index
         print "card_min_index %d" % self.card_min_index
     
         print "\n"
     
-        return
-
-    def reconfigureDynamicKeys(self):
-        try:
-          if self.dynamic_keys :
-            if os.path.exists("/usr/bin/ainit") and os.path.exists("/var/run/console/console.lock"):
-                os.system("/usr/bin/ainit `cat /var/run/console/console.lock` start")
-          else:
-            if os.path.exists("/usr/bin/ainit") and os.path.exists("/var/run/console/console.lock"):
-                os.system("/usr/bin/ainit `cat /var/run/console/console.lock` stop")
-          return True
-        except:
-          return False
-          
+        return          
 
     def readAlsaConfig(self):
         # Check alsa configuration
@@ -192,21 +176,6 @@
             self.hardware_device = 0
             self.default_device = 0
 
-        # Check ainit configuration
-        try:
-            fd = open('/etc/alsa/ainit.conf', 'r')
-            lines = fd.readlines()
-            fd.close()
-
-            for line in lines:                
-                line = string.split(string.strip(line))
-                if line != [] and cmp(string.lower(line[0]),"enable") == 0:
-                    self.dynamic_keys = (cmp(string.lower(line[2]),'yes') == 0)
-                    break;
-                    
-        except:
-            self.dynamic_keys = 0
-
         try:
             self.default_card = int(commands.getoutput('/bin/alsacard'))
         except:
@@ -242,32 +211,6 @@
 	        fd.write(line)
 	    fd.close()
 
-        try:          
-          if os.path.exists("/etc/alsa/ainit.conf"):
-
-              # re-writing ainit.conf
-              fd = open('/etc/alsa/ainit.conf', 'r')
-              lines = fd.readlines()
-              fd.close()
-
-              lines_out = []
-              for line in lines:                
-                line_tmp = string.split(string.strip(line))
-                if line_tmp != [] and cmp(string.lower(line_tmp[0]),"enable") == 0:
-                    if self.dynamic_keys:
-                       lines_out.append("enable = yes\n")
-                    else:
-                       lines_out.append("enable = no\n")
-                else:
-                    lines_out.append(line)
-
-              fd = open('/etc/alsa/ainit.conf', 'w')
-              fd.writelines(lines_out)
-              fd.close()
-              
-        except:
-          return False
-          
         return True
 
     def cardIndexChanged(self):
@@ -277,9 +220,6 @@
     def cardDefaultChanged(self):
         self.card_default_changed = True
         
-    def cardDynKeysGenerate(self):
-        self.card_dyn_keys_generate = True
-
     # ------------------------------------------------------------------------
     # Configuring routines - modprobe.conf
     # ------------------------------------------------------------------------        
@@ -421,7 +361,7 @@
         self.card_index_changed = False
 
     def writeConfig(self, cardArray):
-        ret_alsa = ret_mod = dyn_keys = True
+        ret_alsa = ret_mod = True
         if self.card_index_changed:
             ret_mod = self.rewriteModprobe(cardArray)
             if not ret_mod:
@@ -438,14 +378,7 @@
             else:
                 errorDialog(_("Unable to write ALSA configuration files!"))
 
-        if self.card_dyn_keys_generate:
-            dyn_keys = self.reconfigureDynamicKeys()
-            if dyn_keys:
-                self.card_dyn_keys_generate = False
-            else:
-                errorDialog(_("Unable to generate ALSA SHM keys!"))
-
-        return ret_mod and ret_alsa and dyn_keys
+        return ret_mod and ret_alsa
         
 
 class soundcardBackend:
@@ -629,13 +562,6 @@
     # Other conrols
     # --------------
     
-    def setDynamicKeys(self, state):
-        self.soundConfig.dynamic_keys = state;
-        self.soundConfig.cardDefaultChanged()        
-
-    def getDynamicKeys(self):
-        return self.soundConfig.dynamic_keys
-
     def setDefaultCard(self, index):
         self.soundConfig.default_card = index
         self.soundConfig.cardDefaultChanged()
@@ -655,9 +581,6 @@
 
     def cardIndexChanged(self):
         self.soundConfig.cardIndexChanged()
-
-    def cardDynKeysGenerate(self):
-        self.soundConfig.cardDynKeysGenerate()
     
     def writeConfig(self):
         self.soundConfig.writeConfig(self.cardArray)
--- system-config-soundcard-2.0.0/src/soundcard.py.old	2006-07-20 21:43:45.000000000 +0200
+++ system-config-soundcard-2.0.0/src/soundcard.py	2006-07-21 00:06:29.000000000 +0200
@@ -195,10 +195,7 @@
                 
     def changeHW(self, widget, data=None):
         self.soundcardBackend.setHardwareDevice(widget.get_active())
-        
-    def changeDynKeys(self, widget, data=None):
-        self.soundcardBackend.setDynamicKeys(widget.get_active())
-        
+                
     def applyChanges(self, *args):
         self.soundcardBackend.writeConfig()
 
@@ -642,18 +639,11 @@
         configBox = gtk.VBox(False, 0)
 
         #Create a check-box for hw/sw config
-        button = gtk.CheckButton(_("Disable software mixing (dmix, dsnoop)"))
+        button = gtk.CheckButton(_("Disable specific card configuration"))
         button.set_active(self.soundcardBackend.getHardwareDevice())
         button.connect("toggled", self.changeHW)
         
         configBox.pack_start(button)
-
-        #Create a check-box for key config
-        button = gtk.CheckButton(_("Dynamic keys for software mixer (more secure)"))
-        button.set_active(self.soundcardBackend.getDynamicKeys())
-        button.connect("toggled", self.changeDynKeys)
-           
-        configBox.pack_start(button)
         configBox.show_all()
 
         configBox = self.create_frame(self.create_frame(configBox,8),0,_("ALSA plugins"),gtk.SHADOW_ETCHED_IN)


Index: system-config-soundcard.spec
===================================================================
RCS file: /cvs/dist/rpms/system-config-soundcard/devel/system-config-soundcard.spec,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- system-config-soundcard.spec	20 Jul 2006 09:46:39 -0000	1.42
+++ system-config-soundcard.spec	20 Jul 2006 22:11:31 -0000	1.43
@@ -1,7 +1,7 @@
 Summary: A graphical interface for detecting and configuring soundcards
 Name: system-config-soundcard
 Version: 2.0.0
-Release: 3
+Release: 4
 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
 Patch: system-config-soundcard-2.0.0-update.patch
+Patch1: system-config-soundcard-2.0.0-ainit.patch
 BuildRequires: desktop-file-utils
 BuildRequires: gettext, intltool
 ExcludeArch: s390 s390x
@@ -34,6 +35,7 @@
 %prep
 %setup -q
 %patch -p1
+%patch1 -p1
 
 %build
 make
@@ -88,6 +90,9 @@
 %ghost /root/scsound.log
 
 %changelog
+* Fri Jul 21 2006 Martin Stransky <stransky at redhat.com> 2.0.0-4
+- removed ainit parts
+
 * Tue Jul 20 2006 Martin Stransky <stransky at redhat.com> 2.0.0-3
 - fixed pycairo Requires
 




More information about the fedora-cvs-commits mailing list