rpms/system-config-soundcard/devel system-config-soundcard-2.0.6-usb-hack.patch, NONE, 1.1 system-config-soundcard-no-vendor.patch, NONE, 1.1 system-config-soundcard-2.0.6-update.patch, 1.1, 1.2 system-config-soundcard.spec, 1.56, 1.57
Martin Stransky (stransky)
fedora-extras-commits at redhat.com
Mon May 28 13:18:28 UTC 2007
- Previous message (by thread): rpms/gramps/devel .cvsignore, 1.20, 1.21 gramps.spec, 1.31, 1.32 sources, 1.20, 1.21
- Next message (by thread): rpms/tcp_wrappers/devel tcp_wrappers-7.6-sigchld.patch, 1.1, 1.2 tcp_wrappers.spec, 1.26, 1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: stransky
Update of /cvs/pkgs/rpms/system-config-soundcard/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11452
Modified Files:
system-config-soundcard-2.0.6-update.patch
system-config-soundcard.spec
Added Files:
system-config-soundcard-2.0.6-usb-hack.patch
system-config-soundcard-no-vendor.patch
Log Message:
update the no-vendor fix (#237709), added a hack for USB devices (#232217), disabled fix for (#227778)
system-config-soundcard-2.0.6-usb-hack.patch:
--- NEW FILE system-config-soundcard-2.0.6-usb-hack.patch ---
--- system-config-soundcard-2.0.6/src/soundcardBackend.py.usb 2007-05-28 14:24:36.000000000 +0200
+++ system-config-soundcard-2.0.6/src/soundcardBackend.py 2007-05-28 14:54:20.000000000 +0200
@@ -47,6 +47,9 @@
DETECTION_PROC = "proc"
DETECTION_HAL = "hal"
+USB_AUDIO_DRIVER = "snd-usb-audio"
+USB_AUDIO_POSITION = 7
+
##
## Error message
##
@@ -141,7 +144,9 @@
self.card_default_changed = False
self.readAlsaConfig()
-
+
+ self.usb_cards_hack = True
+ self.usb_cards_hack_position = USB_AUDIO_POSITION
def dump(self):
print " ----------- soundConfiguration -----------"
@@ -192,7 +197,7 @@
lines.append("#Generated by system-config-soundcard\n")
lines.append("#If you edit this file, don't run system-config-soundcard,\n")
- lines.append("#all changes could be lost.\n")
+ lines.append("#all your changes here could be lost.\n")
if self.hardware_device:
lines.append("#HWCONF\n")
lines.append("#DEV %d\n" % device)
@@ -228,6 +233,51 @@
if card.active:
num = card.index
return num
+
+ def readUSBDevicePosition(self, list):
+ # Checking for "options snd-usb-audio index=X"
+ for whole_line in list:
+
+ line = string.strip(whole_line)
+ if line == []:
+ modprobe.append(whole_line)
+ continue;
+
+ tmp = line.split()
+
+ if tmp == [] or tmp[0] == [] or tmp[0][0] == '#'\
+ or tmp[1] == [] or tmp[2] == [] :
+ continue
+
+ if tmp[0] != "options":
+ continue
+
+ if tmp[1] != "snd-usb-audio" and tmp[1] != "snd_usb_audio":
+ continue;
+
+ if tmp[2][:5] == "index":
+ option = string.split(string.join(tmp[2:]), '=')
+ # option[1] has to be the index
+ self.usb_cards_hack = True
+ self.usb_cards_hack_position = string.atoi(option[1])
+ break;
+
+
+ def writeUSBDevicePosition(self, cardArray, modprobe):
+ if self.usb_cards_hack:
+ is_there_any_usb = False
+ for card in cardArray:
+ if card.active and (card.driver == "snd-usb-audio" or card.driver == "snd_usb_audio"):
+ is_there_any_usb = True
+ break;
+
+ if not is_there_any_usb:
+ modprobe.append("alias snd-card-%d %s\n" % (self.usb_cards_hack_position, USB_AUDIO_DRIVER))
+ modprobe.append("options %s index=%d\n" % (USB_AUDIO_DRIVER, self.usb_cards_hack_position))
+
+ def setUSBDevice(self):
+ self.usb_cards_hack = True;
+ self.card_index_changed = True
def rewriteModprobe(self, cardArray):
@@ -238,6 +288,8 @@
except:
return False
+ self.readUSBDevicePosition(list)
+
sound_lines = []
modprobe = []
@@ -280,6 +332,8 @@
if card.active:
modprobe.append("alias snd-card-%d %s\n" % (card.index, card.driver))
modprobe.append("options %s index=%d\n" % (card.driver, card.index))
+
+ self.writeUSBDevicePosition(cardArray, modprobe)
try:
os.rename('/etc/modprobe.conf', '/etc/modprobe.conf.scs')
system-config-soundcard-no-vendor.patch:
--- NEW FILE system-config-soundcard-no-vendor.patch ---
--- system-config-soundcard-2.0.6/src/soundcardBackendHal.py.novendor 2007-05-28 11:56:32.000000000 +0200
+++ system-config-soundcard-2.0.6/src/soundcardBackendHal.py 2007-05-28 12:15:04.000000000 +0200
@@ -107,6 +107,26 @@
if new_parentUdi == None:
break
parentUdi = new_parentUdi
+
+ # Vendor has not been found - search the product name at least
+ vendor = _("Unknown")
+ parentUdi = udi
+ device_skipped = False
+ while parentUdi and len(parentUdi):
+ obj = self._dbusBus.get_object("org.freedesktop.Hal", parentUdi)
+
+ product = self.getProperty(obj, "info.product")
+ if product != None and device_skipped :
+ return vendor, product
+
+ new_parentUdi = self.getProperty(obj, "info.parent")
+ if new_parentUdi == None:
+ break
+ parentUdi = new_parentUdi
+ device_skipped = True
+
+ # hmm, it's a strange device
+ return (vendor, vendor)
def getBus(self, udi):
parentUdi = udi
system-config-soundcard-2.0.6-update.patch:
Index: system-config-soundcard-2.0.6-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-soundcard/devel/system-config-soundcard-2.0.6-update.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- system-config-soundcard-2.0.6-update.patch 11 Apr 2007 09:03:44 -0000 1.1
+++ system-config-soundcard-2.0.6-update.patch 28 May 2007 13:17:54 -0000 1.2
@@ -47,7 +47,7 @@
if card.maker != None:
+ maker_string = []
+ if self.firstBoot:
-+ maker_string = self.wrapLine(card.maker)
++ maker_string = card.maker
+ else:
+ maker_string = card.maker
+
@@ -62,7 +62,7 @@
elif card.type != None:
+ type_string = []
+ if self.firstBoot:
-+ type_string = self.wrapLine(card.type)
++ type_string = card.type
+ else:
+ type_string = card.type
+
@@ -76,7 +76,7 @@
+ model_string = []
+ if self.firstBoot:
-+ model_string = self.wrapLine(card.model)
++ model_string = card.model
+ else:
+ model_string = card.model
+
Index: system-config-soundcard.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-soundcard/devel/system-config-soundcard.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- system-config-soundcard.spec 11 Apr 2007 09:03:44 -0000 1.56
+++ system-config-soundcard.spec 28 May 2007 13:17:54 -0000 1.57
@@ -1,7 +1,7 @@
Summary: A graphical interface for detecting and configuring soundcards
Name: system-config-soundcard
Version: 2.0.6
-Release: 4%{dist}
+Release: 6%{dist}
URL: http://fedora.redhat.com/projects/config-tools/redhat-config-soundcard.html
License: GPL
ExclusiveOS: Linux
@@ -11,6 +11,8 @@
Source0: %{name}-%{version}.tar.bz2
Patch: system-config-soundcard-2.0.6-dbus.patch
Patch1: system-config-soundcard-2.0.6-update.patch
+Patch2: system-config-soundcard-no-vendor.patch
+Patch3: system-config-soundcard-2.0.6-usb-hack.patch
BuildRequires: desktop-file-utils
BuildRequires: gettext, intltool
ExcludeArch: s390 s390x
@@ -32,9 +34,11 @@
detects and configures the soundcard(s) on the system.
%prep
-%setup -q
-%patch -p1
-%patch1 -p1 -b .old
+%setup -q
+%patch -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1 -b .usb
%build
make
@@ -84,6 +88,14 @@
%ghost /root/scsound.log
%changelog
+* Mon May 28 2007 Martin Stransky <stransky at redhat.com> - 2.0.6-6
+- update the no-vendor fix (#237709)
+- added a hack for USB devices (#232217)
+- disabled fix for (#227778)
+
+* Mon May 21 2007 Jeremy Katz <katzj at redhat.com> - 2.0.6-5
+- fix case of no vendor being able to be found in the hal tree (#237709)
+
* Wed Apr 11 2007 Martin Stransky <stransky at redhat.com> 2.0.6-4
- fixed #227778 - Firstboot soundcard screen 'too wide'
with long name
- Previous message (by thread): rpms/gramps/devel .cvsignore, 1.20, 1.21 gramps.spec, 1.31, 1.32 sources, 1.20, 1.21
- Next message (by thread): rpms/tcp_wrappers/devel tcp_wrappers-7.6-sigchld.patch, 1.1, 1.2 tcp_wrappers.spec, 1.26, 1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list