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: 11893479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E392697 for ; Tue, 10 Nov 2020 08:04:34 +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 59DC22080A for ; Tue, 10 Nov 2020 08:04:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ekV0ImVn"; 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 59DC22080A 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-mediatek-bounces+patchwork-linux-mediatek=patchwork.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=LdNRQ2eLVKgzvAJejaHKUZlcCO0XU5FFLX4rSnlYuWE=; b=ekV0ImVnVBasCjlJcCZvsyrphc /P94FRz3ODQ3i0fwhY7Ey7VkC6kN/6la1J9pPpsAhtbki9BV3/IZ0R9oiTqHGvHR5ba9K2sVD2N0r OJ/2k9bgCCzmLc1onvjBWRETCfPlLm0sGWtlV1qq3HFjYhDOjNTqZ0c8XCki60FbaU/FnKGnKEuUa 2lervXEbFt5+Rj+Tfo1t5BoXhyOPWLFESANyQxtyh9iOOo8xt79EHwAM7BrCw+j1sE2e8Dlzg/jzu s5U5OcRu6AVZzdYKQY792wEjSwS9JzF4kBFd6tuOocjSGnRCAy92KdKJ/LdJbhmgxtXHOgUxNuSPM vbk5ULeA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcOdk-0001aL-G7; Tue, 10 Nov 2020 08:04:32 +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-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.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)