From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 9DFCDC388F7 for ; Tue, 10 Nov 2020 08:25:22 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 8E6F620870 for ; Tue, 10 Nov 2020 08:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="pAx58SQN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E6F620870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3001D16CF; Tue, 10 Nov 2020 09:24:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3001D16CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1604996718; bh=NxJv5TSLdDNWHZ2kq7x41YhCdm3DqIa5oRH7yybagK0=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pAx58SQNeNKJaRHeVCvrwMNFWciOZJiPWHaejFjhIuaTCcOXwy1Ce10mObRNS6nn9 ld1tcGg0J6bCIeudKEqluXVzGePqpEQ1mD6K/e3zzWUPIF1jPWdxf4mSBI0J3iacAF yBEA3hTo+DZefZuDuazNMYxLTOZF6Xqp3sTB8ZaM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B6E30F80161; Tue, 10 Nov 2020 09:24:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C50A2F801D5; Tue, 10 Nov 2020 09:24:26 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D6322F80059 for ; Tue, 10 Nov 2020 09:24:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D6322F80059 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4D23FAB95; Tue, 10 Nov 2020 08:24:20 +0000 (UTC) Date: Tue, 10 Nov 2020 09:24:20 +0100 Message-ID: From: Takashi Iwai To: Macpaul Lin Subject: Re: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET In-Reply-To: <1604996266.2817.1.camel@mtkswgap22> References: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> <1604996266.2817.1.camel@mtkswgap22> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, Mediatek WSD Upstream , Christopher Swenson , linux-kernel@vger.kernel.org, Macpaul Lin , Eddie Hung , Takashi Iwai , Chunfeng Yun , Alexander Tsoy , linux-mediatek@lists.infradead.org, Nick Kossifidis , Matthias Brugger , Nicola Lunghi , linux-arm-kernel@lists.infradead.org, Ainge Hsu X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 10 Nov 2020 09:17:46 +0100, Macpaul Lin wrote: > > On Tue, 2020-11-10 at 09:12 +0100, Takashi Iwai wrote: > > On Tue, 10 Nov 2020 09:04:03 +0100, > > Macpaul Lin wrote: > > > > > > 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) > > > > This causes the compile error due to the unknown udev. > > Is this bcdDevice check mandatory? > > This means firmware version of the headset as far as I know.. OK, then it's useful. > Sorry I'll check the compile error and resend later. I guess the only needed change is to replace udev with chip->dev. thanks, Takashi > > > > > thanks, > > > > Takashi > > Thanks > Macpaul Lin >