Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3842335pxb; Tue, 10 Nov 2020 01:08:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIxF+7xXvGzm0XCByUt0+0uxCyTg6gY6DtPIVKtmNJjEZSQoIqNACNrOkBZLl95ODuSGup X-Received: by 2002:aa7:ce82:: with SMTP id y2mr20142065edv.6.1604999305948; Tue, 10 Nov 2020 01:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604999305; cv=none; d=google.com; s=arc-20160816; b=mUwuk9tOo0cjfv4pt82Qp+wCK0FQDwFqKw2UNSQapSRayXXO9PkG9uOY5l4sOCOysE 2nFrUzTCg1zRlW0ezNAuyImUKeQB1rEKrDr+6FjMDE58fW1dJflin4xDpzZPJ+el60k/ XdwxwWMA1JJV80arLQ/x2hk95gqEvbF7Sb6endEVRBhIyrulwSay3nY5iA8K19gDGa42 lVNGx3d+DPIckWTIrnc5KvVo+kXk1fMmexS/6IPA52FjvCDBYBiCvs8U9WM+r3pT/Pdx dnFdoAnpokN8sXsU3ULpAl5ckUzCNt/zoyRPbCK0ol8TWqWMm1a5QqTVXIAob9bJx7nw 8TYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=4Eyc4mIGsoTEIgnCisZeLBbJJy0Jy6TLHe0tGhWUZ4o=; b=rtpHy0VnIllikc1n5JUXmrMeGxB79K5sHzqXdESHUzG2Fp9Tvui4xHQEnAQjqr1RJG ilaifizjNQ4KjCHsgLDPPmITYWYHv1eHdSV2iTm1qD/190MUJH1MjRMg1zAxY0f8sjIR 1Xm2jg3JEKQqS/7VxtVUYmOOo3hSnZelkulzA2QiTB7MaSG4qF3o7JCtUlh/8Mn3V6xf sy0CD3LkRbAfvSI9YST/ehQpWY/n9/x5tOAvLDLcno5E3J0xMlCrBUcyCX9ljvIoFL10 tCmUXs/bE0FIbKBMcOFRvI/FFtMQVTpHPQLtQtlBQ3aIhgi6DdeHVY5AtXFIv4UMHsHg yhWg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si8655151ejr.344.2020.11.10.01.08.03; Tue, 10 Nov 2020 01:08:25 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbgKJJFm (ORCPT + 99 others); Tue, 10 Nov 2020 04:05:42 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:58402 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729902AbgKJJEV (ORCPT ); Tue, 10 Nov 2020 04:04:21 -0500 X-UUID: 0d8bb3a431fb404e9bb9c1b01b7e6eb6-20201110 X-UUID: 0d8bb3a431fb404e9bb9c1b01b7e6eb6-20201110 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1250319375; Tue, 10 Nov 2020 17:04:17 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Nov 2020 17:04:14 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 10 Nov 2020 17:04:15 +0800 From: Macpaul Lin To: Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Alexander Tsoy , Nicola Lunghi , Christopher Swenson , Nick Kossifidis , CC: Ainge Hsu , Eddie Hung , Chunfeng Yun , Mediatek WSD Upstream , Macpaul Lin , Macpaul Lin , , , , , Subject: [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET Date: Tue, 10 Nov 2020 17:04:08 +0800 Message-ID: <1604999048-20294-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1604996266.2817.1.camel@mtkswgap22> References: <1604996266.2817.1.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 3B1BA5211D1AEA1F9D389FD0B8F95556B1905E286E655FC53C5BEFF736FBB5782000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 Cc: stable@vger.kernel.org --- Changes for v2: - Fix build error. - Add Cc: stable@vger.kernel.org Changes for v3: - Replace "udev" with "chip->dev" according to Takashi's suggestion. Thanks. sound/usb/format.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/usb/format.c b/sound/usb/format.c index 1b28d01..0aff774 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(chip->dev->descriptor.bcdDevice) == 0x49) + continue; fp->rate_table[fp->nr_rates] = rate; if (!fp->rate_min || rate < fp->rate_min) -- 1.7.9.5