Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1582803pxb; Thu, 4 Mar 2021 15:27:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzd8N9sd7kuoVt01O/T4YVe+0+S/6s4yW7uqy83ath24+jUivv/80KGoGrx1n2E54L/n9BM X-Received: by 2002:a92:d7ce:: with SMTP id g14mr5773300ilq.255.1614900421833; Thu, 04 Mar 2021 15:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614900421; cv=none; d=google.com; s=arc-20160816; b=a7Z4jaFAy7IyRLdxja32kyMY5yRGv1pHLeOVcFCcQxRNQx0irm8O0FoYoUzhnceMVJ V3HAE+9WNkVN4uY6D+Xgaeo8dIjcMi2JswagF/kiBRrMVjXqu4OY1O7HNp5iKz+0PdhT S37C1BcrSyksHz7WYKP3ounK6aLEB+ywnMY15H8qreA5vFbEigBjw3shYkKBtWV7wrXf 5Drkspqi5DWEna4HW6LPGT+7vUGhJD09RmAk9yp4wNskNcul8kZjTs9TW5Ld1TCZg470 GI+fH90EF3S8erZAHVm5ccT3pxmnPUIL46HGRpo0a5+WmwU3VpwEV05UUDjx897o7iZX Gdxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=X//DZHKUSb3SMeHRZmi/zZiqOP+OQlqOxf13Re3EYFQ=; b=AKjWcZrlk5bNLmLjMw2D8V0AzUX9mSb9m+XUobbO2eOg+uAnQTeKakpNhLEgAh73y7 NzwLKn0m2LyO2i/1VNWoGJ+TRAe59iJigsxMJGt0UJTQf+bylMs2V+IMYFJw93qwcwZX 3lpmzYLUCIcDMV3cq15eyxcQ1Azb7Q/UJYjGLJQ6e8MOYTqA5Cui4xcgi+pAf3rUlV3r /039Hddpq5CAKwCOYhEp6f5xx/ap9AriwryizczPS6ZCpI8N3vyUiTh8d6TWBGuF1NsL f6EsIPvKGmGwraq8avI1qPTaw48dZiJ1Rtbd6H/49+1vc6fF2RmeGG9FJWXrBlASExBX jVTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si719976iow.35.2021.03.04.15.26.48; Thu, 04 Mar 2021 15:27:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838400AbhCCTAe convert rfc822-to-8bit (ORCPT + 99 others); Wed, 3 Mar 2021 14:00:34 -0500 Received: from mail.actia.se ([195.67.112.82]:25647 "EHLO mail.actia.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1579350AbhCCSbH (ORCPT ); Wed, 3 Mar 2021 13:31:07 -0500 X-Greylist: delayed 943 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Mar 2021 13:31:06 EST Received: from S036ANL.actianordic.se (192.168.16.117) by S036ANL.actianordic.se (192.168.16.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 3 Mar 2021 19:14:39 +0100 Received: from S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69]) by S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69%3]) with mapi id 15.01.2176.004; Wed, 3 Mar 2021 19:14:39 +0100 From: John Ernberg To: "perex@perex.cz" , "tiwai@suse.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" CC: "kempe@lysator.liu.se" , John Ernberg Subject: [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk Thread-Topic: [PATCH] ALSA: usb: Add Plantronics C320-M USB ctrl msg delay quirk Thread-Index: AQHXEFkTCsQRnWxDKk2OSuE4/Zlp2w== Date: Wed, 3 Mar 2021 18:14:39 +0000 Message-ID: <20210303181405.39835-1-john.ernberg@actia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.30.0 x-originating-ip: [10.11.250.6] x-esetresult: clean, is OK x-esetid: 37303A2905BC1358637367 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: John Ernberg --- 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