All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* usb audio: Fix another Dallas quirk
@ 2008-03-29 22:32 Pavel Machek
  2008-04-01 19:20 ` Andrew Morton
  2008-04-14 10:21 ` Takashi Iwai
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2008-03-29 22:32 UTC (permalink / raw
  To: perex, kernel list, tiwai


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 <pavel@suse.cz>

diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 257a4e1..b6b2490 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
 	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 */

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb audio: Fix another Dallas quirk
  2008-03-29 22:32 usb audio: Fix another Dallas quirk Pavel Machek
@ 2008-04-01 19:20 ` Andrew Morton
  2008-04-02 12:49   ` Pavel Machek
  2008-04-14 10:21 ` Takashi Iwai
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-04-01 19:20 UTC (permalink / raw
  To: Pavel Machek; +Cc: perex, linux-kernel, tiwai

On Sat, 29 Mar 2008 23:32:41 +0100
Pavel Machek <pavel@suse.cz> 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 <pavel@suse.cz>
> 
> diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
> index 257a4e1..b6b2490 100644
> --- a/sound/usb/usbaudio.c
> +++ b/sound/usb/usbaudio.c
>  	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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb audio: Fix another Dallas quirk
  2008-04-01 19:20 ` Andrew Morton
@ 2008-04-02 12:49   ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2008-04-02 12:49 UTC (permalink / raw
  To: Andrew Morton; +Cc: perex, linux-kernel, tiwai

On Tue 2008-04-01 12:20:00, Andrew Morton wrote:
> On Sat, 29 Mar 2008 23:32:41 +0100
> Pavel Machek <pavel@suse.cz> 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 <pavel@suse.cz>
> > 
> > diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
> > index 257a4e1..b6b2490 100644
> > --- a/sound/usb/usbaudio.c
> > +++ b/sound/usb/usbaudio.c
> >  	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.

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb audio: Fix another Dallas quirk
  2008-03-29 22:32 usb audio: Fix another Dallas quirk Pavel Machek
  2008-04-01 19:20 ` Andrew Morton
@ 2008-04-14 10:21 ` Takashi Iwai
  2008-04-14 10:47   ` Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2008-04-14 10:21 UTC (permalink / raw
  To: Pavel Machek; +Cc: perex, kernel list

At Sat, 29 Mar 2008 23:32:41 +0100,
Pavel Machek 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 <pavel@suse.cz>

Applied this to ALSA tree, too.  Thanks.


Takashi

> 
> diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
> index 257a4e1..b6b2490 100644
> --- a/sound/usb/usbaudio.c
> +++ b/sound/usb/usbaudio.c
>  	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 */
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb audio: Fix another Dallas quirk
  2008-04-14 10:21 ` Takashi Iwai
@ 2008-04-14 10:47   ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2008-04-14 10:47 UTC (permalink / raw
  To: Takashi Iwai; +Cc: perex, kernel list

Hi!

> > 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 <pavel@suse.cz>
> 
> Applied this to ALSA tree, too.  Thanks.

Thanks!

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-14 10:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-29 22:32 usb audio: Fix another Dallas quirk Pavel Machek
2008-04-01 19:20 ` Andrew Morton
2008-04-02 12:49   ` Pavel Machek
2008-04-14 10:21 ` Takashi Iwai
2008-04-14 10:47   ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.