usb audio: Fix another Dallas quirk
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
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
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.
Signed-off-by Pavel Machek <[email protected]>sound/usb/usbaudio.c +0
-0
sound/usb/usbaudio.c
Quoted 4 lines
sound/usb/usbaudio.c +1
-0int 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.
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.
Signed-off-by Pavel Machek <[email protected]>sound/usb/usbaudio.c +0
-0sound/usb/usbaudio.c
Quoted 4 lines
sound/usb/usbaudio.c +1
-0int 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
Takashi Iwai
AppliedAt 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.
Signed-off-by Pavel Machek <[email protected]>
Applied this to ALSA tree, too. Thanks.
Takashi
Quoted 31 lines
sound/usb/usbaudio.c +9
-1int 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
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.
Signed-off-by Pavel Machek <[email protected]>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