alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk
@ 2021-03-03 18:14 John Ernberg
  2021-03-03 19:22 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: John Ernberg @ 2021-03-03 18:14 UTC (permalink / raw)
  To: perex, tiwai, alsa-devel, linux-kernel; +Cc: kempe, John Ernberg

The microphone in the Plantronics C320-M headset will randomly
fail to initialize properly, at least when using Microsoft Teams.
Introducing a 20ms delay on the control messages appears to
resolve the issue.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1065
Tested-by: Andreas Kempe <kempe@lysator.liu.se>
Signed-off-by: John Ernberg <john.ernberg@actia.se>
---

Note: Microsoft Teams is the only application tests have been performed with
and no other kinds of investigations have been performed, like USB packet logging.
Originally reported as a possible PulseAudio issue, where it was suggested to
try a delay quirk in the kernel.
If other tests should be performed, please let me know which tests and I will try to do them.

All testing was done on 5.10, patch was then applied on sound.git master for submission

I did not register to the mailing lists, please keep me CC on any comments. Thanks!

 sound/usb/quirks.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index d02dac5fcd40..a31b7db92b1e 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1673,6 +1673,14 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
 	    && (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
 		msleep(20);
 
+	/*
+	 * Plantronics C320-M needs a delay to avoid random
+	 * microhpone failures.
+	 */
+	if (chip->usb_id == USB_ID(0x047f, 0xc025)  &&
+	    (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+		msleep(20);
+
 	/* Zoom R16/24, many Logitech(at least H650e/H570e/BCC950),
 	 * Jabra 550a, Kingston HyperX needs a tiny delay here,
 	 * otherwise requests like get/set frequency return
-- 
2.30.0

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

* Re: [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk
  2021-03-03 18:14 [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk John Ernberg
@ 2021-03-03 19:22 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-03-03 19:22 UTC (permalink / raw)
  To: John Ernberg; +Cc: linux-kernel, alsa-devel, kempe, tiwai

On Wed, 03 Mar 2021 19:14:39 +0100,
John Ernberg wrote:
> 
> The microphone in the Plantronics C320-M headset will randomly
> fail to initialize properly, at least when using Microsoft Teams.
> Introducing a 20ms delay on the control messages appears to
> resolve the issue.
> 
> Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1065
> Tested-by: Andreas Kempe <kempe@lysator.liu.se>
> Signed-off-by: John Ernberg <john.ernberg@actia.se>
> ---
> 
> Note: Microsoft Teams is the only application tests have been performed with
> and no other kinds of investigations have been performed, like USB packet logging.
> Originally reported as a possible PulseAudio issue, where it was suggested to
> try a delay quirk in the kernel.
> If other tests should be performed, please let me know which tests and I will try to do them.
> 
> All testing was done on 5.10, patch was then applied on sound.git master for submission
> 
> I did not register to the mailing lists, please keep me CC on any comments. Thanks!

Thanks, applied now.

It's a good timing, as I've recently got a bug report for the similar
device (C320) showing mysterious behavior on Teams :)


Takashi

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

end of thread, other threads:[~2021-03-03 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 18:14 [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk John Ernberg
2021-03-03 19:22 ` 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).