From patchwork Tue Nov 10 08:04:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Macpaul Lin X-Patchwork-Id: 11893481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 772FBC388F7 for ; Tue, 10 Nov 2020 08:04:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D67712080A for ; Tue, 10 Nov 2020 08:04:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hrl0/2k0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="SAVGXOT8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D67712080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=j1MxTppxY3KYuwXtjHcgXfNEFn6fe+xOWxNrCU9asMg=; b=Hrl0/2k0rnPXDXlFZXc1+kq1Bb TkZITwf3A5RwLlhWm2Ypi3qae2Wq3VUYLw5aJ59M7+big0aDOXH3RLqThxbnEqgGRuZrTCgizYlnO nUh36yFHa6KhdCvJ/SUHusT/bxxJu3NaPZIQNy24mleo5fzvMBcgTlQvWxL8XI3GaMKHzzWYrqZP0 MpNB/qc03lIJPHmW7MNRe3WZ6oMsBLqYUPz+J372NQVZYz2kPDGWBP/MrYhNnF7OV12NPuXRX1uds rpKy43Lc+KOMaj/RuTR6fwyh3QppF6VykNcVuKATlok/9WrF2A+yAOlpx0aJiolL6SgvuM2y7zjW9 l7iqGqYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcOdl-0001aW-8Y; Tue, 10 Nov 2020 08:04:33 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcOdi-0001Yh-Bo; Tue, 10 Nov 2020 08:04:31 +0000 X-UUID: 127d2e8544da41d4b1aa0cc117ccf3d3-20201110 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=55NVSYNLP7DIKYzsrBmzhTHgIOAfTbElVVQqEHRyOfk=; b=SAVGXOT8M+J/tRazYdAVi3dE1M+qh3W50RQzXhrO7FiPgzc51Zg1mvSJDikiGmOg0+BcvVQPpwJB4WRzb580GzW3UiOakqZQ3MwIubmiqp1+7EaVEAR+R3I3ZcsI24Fm/Fm7G5PuxzQV/nyugxuTT6S8moGtDOgC3ZfBfwloDTE=; X-UUID: 127d2e8544da41d4b1aa0cc117ccf3d3-20201110 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1669011291; Tue, 10 Nov 2020 00:04:20 -0800 Received: from mtkmbs05n2.mediatek.inc (172.21.101.140) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Nov 2020 00:04:18 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Nov 2020 16:04:18 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 10 Nov 2020 16:04:18 +0800 From: Macpaul Lin To: Jaroslav Kysela , Takashi Iwai , "Matthias Brugger" , Alexander Tsoy , "Nicola Lunghi" , Christopher Swenson , "Nick Kossifidis" , Subject: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET Date: Tue, 10 Nov 2020 16:04:03 +0800 Message-ID: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_030430_622389_1D3BD606 X-CRM114-Status: GOOD ( 12.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, Mediatek WSD Upstream , Eddie Hung , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Macpaul Lin , Chunfeng Yun , Macpaul Lin , linux-arm-kernel@lists.infradead.org, Ainge Hsu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The HUAWEI USB-C headset (VID:0x12d1, PID:0x3a07) reported it supports 96khz. However there will be some random issue under 96khz. Not sure if there is any alternate setting could be applied. Hence 48khz is suggested to be applied at this moment. Signed-off-by: Macpaul Lin Signed-off-by: Eddie Hung --- sound/usb/format.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/usb/format.c b/sound/usb/format.c index 1b28d01..6f6e79b 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -217,6 +217,11 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof (chip->usb_id == USB_ID(0x041e, 0x4064) || chip->usb_id == USB_ID(0x041e, 0x4068))) rate = 8000; + /* Huawei headset can't support 96kHz fully */ + if (rate == 96000 && + chip->usb_id == USB_ID(0x12d1, 0x3a07) && + le16_to_cpu(udev->descriptor.bcdDevice) == 0x49) + continue; fp->rate_table[fp->nr_rates] = rate; if (!fp->rate_min || rate < fp->rate_min)