stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
       [not found] <1604996266.2817.1.camel@mtkswgap22>
@ 2020-11-10  9:04 ` Macpaul Lin
  2020-11-18  5:26   ` Macpaul Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Macpaul Lin @ 2020-11-10  9:04 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Matthias Brugger, Alexander Tsoy,
	Nicola Lunghi, Christopher Swenson, Nick Kossifidis, alsa-devel
  Cc: Ainge Hsu, Eddie Hung, Chunfeng Yun, Mediatek WSD Upstream,
	Macpaul Lin, Macpaul Lin, linux-kernel, linux-arm-kernel,
	linux-usb, linux-mediatek, stable

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 <macpaul.lin@mediatek.com>
Signed-off-by: Eddie Hung <eddie.hung@mediatek.com>
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
  2020-11-10  9:04 ` [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET Macpaul Lin
@ 2020-11-18  5:26   ` Macpaul Lin
  2020-11-18  7:34     ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Macpaul Lin @ 2020-11-18  5:26 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Matthias Brugger, Alexander Tsoy, Nicola Lunghi,
	Christopher Swenson, Nick Kossifidis, alsa-devel,
	Ainge Hsu (徐巧宜),
	Eddie Hung (洪正鑫),
	Chunfeng Yun (云春峰),
	wsd_upstream, Macpaul Lin, linux-kernel, linux-arm-kernel,
	linux-usb, linux-mediatek, stable

On Tue, 2020-11-10 at 17:04 +0800, 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 <macpaul.lin@mediatek.com>
> Signed-off-by: Eddie Hung <eddie.hung@mediatek.com>
> 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)

Sorry for bothering again, please hold-on this patch.
I'm still trying to clarify if there is another approach for this
interoperability issue.
I'll update this thread once the result has came out.

Thanks
Macpaul Lin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
  2020-11-18  5:26   ` Macpaul Lin
@ 2020-11-18  7:34     ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-11-18  7:34 UTC (permalink / raw)
  To: Macpaul Lin
  Cc: Takashi Iwai, Jaroslav Kysela, Matthias Brugger, Alexander Tsoy,
	Nicola Lunghi, Christopher Swenson, Nick Kossifidis, alsa-devel,
	Ainge Hsu, Eddie Hung, Chunfeng Yun, wsd_upstream, Macpaul Lin,
	linux-kernel, linux-arm-kernel, linux-usb, linux-mediatek,
	stable

On Wed, 18 Nov 2020 06:26:06 +0100,
Macpaul Lin wrote:
> 
> On Tue, 2020-11-10 at 17:04 +0800, 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 <macpaul.lin@mediatek.com>
> > Signed-off-by: Eddie Hung <eddie.hung@mediatek.com>
> > 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)
> 
> Sorry for bothering again, please hold-on this patch.
> I'm still trying to clarify if there is another approach for this
> interoperability issue.
> I'll update this thread once the result has came out.

OK, thanks for information.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-18  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1604996266.2817.1.camel@mtkswgap22>
2020-11-10  9:04 ` [PATCH v3] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET Macpaul Lin
2020-11-18  5:26   ` Macpaul Lin
2020-11-18  7:34     ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).