Skip to contentSkip to conversation

usb audio: Fix another Dallas quirk

PATCH Applied Pavel Machek 4 participants 5 messages Mar 29, 2008 – Apr 14, 2008 Sound

lore
Share & tools
lore
#0 lore raw

Dallas USB speakers are buggy in more than one way. One of configs they offer does not work at all.

sound/usb/usbaudio.c +0 -0
index 257a4e1..b6b2490 100644

int format;
struct audioformat *fp;
unsigned char *fmt, *csep;
+ int num;

dev = chip->dev;

/* parse the interface's altsettings */
iface = usb_ifnum_to_if(dev, iface_no);
- for (i = 0; i < iface->num_altsetting; i++) {
+ num = iface->num_altsetting;
+
+ /* Dallas DS4201 workaround: It presents 5 altsettings, but the last
+ one misses syncpipe, and does not produce any sound. */
+ if (chip->usb_id == USB_ID(0x04fa, 0x4201))
+ num = 4;
+
+ for (i = 0; i < num; i++) {
alts = &iface->altsetting[i];
altsd = get_iface_desc(alts);
/* skip invalid one */

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 10 lines · On Sat, 29 Mar 2008 23:32:41 +0100 Pavel Machek <[email protected]> wrote:

Dallas USB speakers are buggy in more than one way. One of configs they offer does not work at all.

sound/usb/usbaudio.c +0 -0
index 257a4e1..b6b2490 100644

sound/usb/usbaudio.c

Quoted 4 lines
sound/usb/usbaudio.c +1 -0
 	int format;
 	struct audioformat *fp;
 	unsigned char *fmt, *csep;
+	int num;

This is not a patch - something munched the "@@ -2676,12 +2676,23 @@" line.

I typed it in again.

#2 lore raw
Quoted 21 lines · Andrew Morton
Quoted 10 lines · On Sat, 29 Mar 2008 23:32:41 +0100 Pavel Machek <[email protected]> wrote:

Dallas USB speakers are buggy in more than one way. One of configs they offer does not work at all.

sound/usb/usbaudio.c +0 -0
index 257a4e1..b6b2490 100644

sound/usb/usbaudio.c

Quoted 4 lines
sound/usb/usbaudio.c +1 -0
 	int format;
 	struct audioformat *fp;
 	unsigned char *fmt, *csep;
+	int num;

This is not a patch - something munched the "@@ -2676,12 +2676,23 @@" line.

Quoted 1 line

I typed it in again.

Thanks a lot. I guess I did something wrong when hand-editing it.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Applied
#3 lore raw
In reply to Pavel Machek

At Sat, 29 Mar 2008 23:32:41 +0100,

Quoted 6 lines · Pavel Machek

Dallas USB speakers are buggy in more than one way. One of configs they offer does not work at all.

Applied this to ALSA tree, too. Thanks.

Takashi

Quoted 31 lines
sound/usb/usbaudio.c +9 -1
index 257a4e1..b6b2490 100644
 	int format;
 	struct audioformat *fp;
 	unsigned char *fmt, *csep;
+	int num;
 
 	dev = chip->dev;
 
 	/* parse the interface's altsettings */
 	iface = usb_ifnum_to_if(dev, iface_no);
-	for (i = 0; i < iface->num_altsetting; i++) {
+	num = iface->num_altsetting;
+
+	/* Dallas DS4201 workaround: It presents 5 altsettings, but the last
+	   one misses syncpipe, and does not produce any sound. */
+	if (chip->usb_id == USB_ID(0x04fa, 0x4201))
+		num = 4;
+	
+	for (i = 0; i < num; i++) {
 		alts = &iface->altsetting[i];
 		altsd = get_iface_desc(alts);
 		/* skip invalid one */
Signature · 3 lines
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw

Hi!

Quoted 6 lines
Quoted 4 lines

Dallas USB speakers are buggy in more than one way. One of configs they offer does not work at all.

Applied this to ALSA tree, too. Thanks.

Thanks!

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html