alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* usb 1-2: 1:1: cannot set freq 44100 to ep 0x81 and potential fix
@ 2017-08-20 13:14 Joakim Tjernlund
  2017-08-21  8:43 ` Joakim Tjernlund
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2017-08-20 13:14 UTC (permalink / raw)
  To: tiwai@suse.com, alsa-devel@alsa-project.org, perex@perex.cz

I have two USB headsets (Logitech Inc Logitech Stereo H650e and
Jabra Jabra UC VOICE 550a) who both causes lots of:

    usb 1-2: 1:1: cannot set freq 44100 to ep 0x81

errors when using them for pidgin audio chats. The actual freq
varies though.

I found that adding a small delay here:
 diff -u sound/usb/clock.c.org  sound/usb/clock.c 
--- sound/usb/clock.c.org	2017-08-18 14:38:05.597977669 +0200
+++ sound/usb/clock.c	2017-08-18 14:20:14.653661513 +0200
@@ -304,6 +304,7 @@
 			iface, fmt->altsetting, rate, ep);
 		return err;
 	}
+        msleep(1);
 
 	/* Don't check the sample rate for devices which we know don't
 	 * support reading */

it seems one cannot do these settings too fast
Ant better idea for a fix? kernel 4.9.44

 Jocke

PS.
   When starting a chat with pidgin-sipe, I see the same sample rate
freq setting twice, not sure where that comes from.
 

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

* Re: usb 1-2: 1:1: cannot set freq 44100 to ep 0x81 and potential fix
  2017-08-20 13:14 usb 1-2: 1:1: cannot set freq 44100 to ep 0x81 and potential fix Joakim Tjernlund
@ 2017-08-21  8:43 ` Joakim Tjernlund
  2017-08-22  6:06   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2017-08-21  8:43 UTC (permalink / raw)
  To: tiwai@suse.com, alsa-devel@alsa-project.org, perex@perex.cz

On Sun, 2017-08-20 at 15:14 +0200, Joakim Tjernlund wrote:
> I have two USB headsets (Logitech Inc Logitech Stereo H650e and
> Jabra Jabra UC VOICE 550a) who both causes lots of:
> 
>     usb 1-2: 1:1: cannot set freq 44100 to ep 0x81
> 
> errors when using them for pidgin audio chats. The actual freq
> varies though.
> 
> I found that adding a small delay here:
>  diff -u sound/usb/clock.c.org  sound/usb/clock.c 
> --- sound/usb/clock.c.org	2017-08-18 14:38:05.597977669 +0200
> +++ sound/usb/clock.c	2017-08-18 14:20:14.653661513 +0200
> @@ -304,6 +304,7 @@
>  			iface, fmt->altsetting, rate, ep);
>  		return err;
>  	}
> +        msleep(1);
>  
>  	/* Don't check the sample rate for devices which we know don't
>  	 * support reading */
> 
> it seems one cannot do these settings too fast
> Ant better idea for a fix? kernel 4.9.44
> 
>  Jocke
> 
> PS.
>    When starting a chat with pidgin-sipe, I see the same sample rate
> freq setting twice, not sure where that comes from.
>  

I found snd_usb_ctl_msg_quirk() and if I add the same logic as
for Zoom R16/24:
+
+       /* Logitech H650e needs a tiny delay here, otherwise requests like
+        * get/set frequency return as failed despite actually succeeding.
+        */
+       if (chip->usb_id == USB_ID(0x046D, 0x0A46) &&
+           (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+               mdelay(1);
+
+       /* Jambra 550a needs a tiny delay here, otherwise requests like
+        * get/set frequency return as failed despite actually succeeding.
+        */
+       if (chip->usb_id == USB_ID(0x0B0E, 0x0349) &&
+           (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+               mdelay(1);

it works again. Is the above an acceptable patch ?

 Jocke

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

* Re: usb 1-2: 1:1: cannot set freq 44100 to ep 0x81 and potential fix
  2017-08-21  8:43 ` Joakim Tjernlund
@ 2017-08-22  6:06   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-08-22  6:06 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: alsa-devel@alsa-project.org

On Mon, 21 Aug 2017 10:43:39 +0200,
Joakim Tjernlund wrote:
> 
> On Sun, 2017-08-20 at 15:14 +0200, Joakim Tjernlund wrote:
> > I have two USB headsets (Logitech Inc Logitech Stereo H650e and
> > Jabra Jabra UC VOICE 550a) who both causes lots of:
> > 
> >     usb 1-2: 1:1: cannot set freq 44100 to ep 0x81
> > 
> > errors when using them for pidgin audio chats. The actual freq
> > varies though.
> > 
> > I found that adding a small delay here:
> >  diff -u sound/usb/clock.c.org  sound/usb/clock.c 
> > --- sound/usb/clock.c.org	2017-08-18 14:38:05.597977669 +0200
> > +++ sound/usb/clock.c	2017-08-18 14:20:14.653661513 +0200
> > @@ -304,6 +304,7 @@
> >  			iface, fmt->altsetting, rate, ep);
> >  		return err;
> >  	}
> > +        msleep(1);
> >  
> >  	/* Don't check the sample rate for devices which we know don't
> >  	 * support reading */
> > 
> > it seems one cannot do these settings too fast
> > Ant better idea for a fix? kernel 4.9.44
> > 
> >  Jocke
> > 
> > PS.
> >    When starting a chat with pidgin-sipe, I see the same sample rate
> > freq setting twice, not sure where that comes from.
> >  
> 
> I found snd_usb_ctl_msg_quirk() and if I add the same logic as
> for Zoom R16/24:
> +
> +       /* Logitech H650e needs a tiny delay here, otherwise requests like
> +        * get/set frequency return as failed despite actually succeeding.
> +        */
> +       if (chip->usb_id == USB_ID(0x046D, 0x0A46) &&
> +           (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
> +               mdelay(1);
> +
> +       /* Jambra 550a needs a tiny delay here, otherwise requests like
> +        * get/set frequency return as failed despite actually succeeding.
> +        */
> +       if (chip->usb_id == USB_ID(0x0B0E, 0x0349) &&
> +           (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
> +               mdelay(1);
> 
> it works again. Is the above an acceptable patch ?

Yes, looks OK.  Care to cook up the fix and submit?

After merging your fix, I'll clean up the quirk function to use
switch/case instead of multiple if.


thanks,

Takashi

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

end of thread, other threads:[~2017-08-22  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 13:14 usb 1-2: 1:1: cannot set freq 44100 to ep 0x81 and potential fix Joakim Tjernlund
2017-08-21  8:43 ` Joakim Tjernlund
2017-08-22  6:06   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).