All of lore.kernel.org
 help / color / mirror / Atom feed
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Alexander Tsoy <alexander@tsoy.me>,
	Nicola Lunghi <nick83ola@gmail.com>,
	Christopher Swenson <swenson@swenson.io>,
	Nick Kossifidis <mickflemm@gmail.com>,
	<alsa-devel@alsa-project.org>
Cc: Ainge Hsu <ainge.hsu@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Mediatek WSD Upstream <wsd_upstream@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	Macpaul Lin <macpaul@gmail.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-usb@vger.kernel.org>, <linux-mediatek@lists.infradead.org>
Subject: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
Date: Tue, 10 Nov 2020 16:04:03 +0800	[thread overview]
Message-ID: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> (raw)

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>
---
 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)
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Alexander Tsoy <alexander@tsoy.me>,
	Nicola Lunghi <nick83ola@gmail.com>,
	Christopher Swenson <swenson@swenson.io>,
	Nick Kossifidis <mickflemm@gmail.com>,
	<alsa-devel@alsa-project.org>
Cc: linux-usb@vger.kernel.org,
	Mediatek WSD Upstream <wsd_upstream@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Macpaul Lin <macpaul@gmail.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	Ainge Hsu <ainge.hsu@mediatek.com>
Subject: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
Date: Tue, 10 Nov 2020 16:04:03 +0800	[thread overview]
Message-ID: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> (raw)

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>
---
 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)
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	Alexander Tsoy <alexander@tsoy.me>,
	"Nicola Lunghi" <nick83ola@gmail.com>,
	Christopher Swenson <swenson@swenson.io>,
	"Nick Kossifidis" <mickflemm@gmail.com>,
	<alsa-devel@alsa-project.org>
Cc: linux-usb@vger.kernel.org,
	Mediatek WSD Upstream <wsd_upstream@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Macpaul Lin <macpaul@gmail.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	Ainge Hsu <ainge.hsu@mediatek.com>
Subject: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
Date: Tue, 10 Nov 2020 16:04:03 +0800	[thread overview]
Message-ID: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> (raw)

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>
---
 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)
-- 
1.7.9.5
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	Alexander Tsoy <alexander@tsoy.me>,
	"Nicola Lunghi" <nick83ola@gmail.com>,
	Christopher Swenson <swenson@swenson.io>,
	"Nick Kossifidis" <mickflemm@gmail.com>,
	<alsa-devel@alsa-project.org>
Cc: linux-usb@vger.kernel.org,
	Mediatek WSD Upstream <wsd_upstream@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Macpaul Lin <macpaul@gmail.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	Ainge Hsu <ainge.hsu@mediatek.com>
Subject: [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET
Date: Tue, 10 Nov 2020 16:04:03 +0800	[thread overview]
Message-ID: <1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com> (raw)

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>
---
 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)
-- 
1.7.9.5
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-11-10  8:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  8:04 Macpaul Lin [this message]
2020-11-10  8:04 ` [PATCH] ALSA: usb-audio: disable 96khz support for HUAWEI USB-C HEADSET Macpaul Lin
2020-11-10  8:04 ` Macpaul Lin
2020-11-10  8:04 ` Macpaul Lin
2020-11-10  8:12 ` Takashi Iwai
2020-11-10  8:12   ` Takashi Iwai
2020-11-10  8:12   ` Takashi Iwai
2020-11-10  8:12   ` Takashi Iwai
2020-11-10  8:17   ` Macpaul Lin
2020-11-10  8:17     ` Macpaul Lin
2020-11-10  8:17     ` Macpaul Lin
2020-11-10  8:17     ` Macpaul Lin
2020-11-10  8:24     ` Takashi Iwai
2020-11-10  8:24       ` Takashi Iwai
2020-11-10  8:24       ` Takashi Iwai
2020-11-10  8:24       ` Takashi Iwai
2020-11-10  9:04     ` [PATCH v3] " Macpaul Lin
2020-11-10  9:04       ` Macpaul Lin
2020-11-10  9:04       ` Macpaul Lin
2020-11-10  9:04       ` Macpaul Lin
2020-11-18  5:26       ` Macpaul Lin
2020-11-18  5:26         ` Macpaul Lin
2020-11-18  5:26         ` Macpaul Lin
2020-11-18  5:26         ` Macpaul Lin
2020-11-18  7:34         ` Takashi Iwai
2020-11-18  7:34           ` Takashi Iwai
2020-11-18  7:34           ` Takashi Iwai
2020-11-18  7:34           ` Takashi Iwai
2020-11-10  8:42 ` [PATCH v2] " Macpaul Lin
2020-11-10  8:42   ` Macpaul Lin
2020-11-10  8:42   ` Macpaul Lin
2020-11-10  8:42   ` Macpaul Lin
2020-11-10  8:50   ` Greg KH
2020-11-10  8:50     ` Greg KH
2020-11-10  8:50     ` Greg KH
2020-11-10  8:50     ` Greg KH
2020-11-10  8:54     ` Macpaul Lin
2020-11-10  8:54       ` Macpaul Lin
2020-11-10  8:54       ` Macpaul Lin
2020-11-10  8:54       ` Macpaul Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1604995443-30453-1-git-send-email-macpaul.lin@mediatek.com \
    --to=macpaul.lin@mediatek.com \
    --cc=ainge.hsu@mediatek.com \
    --cc=alexander@tsoy.me \
    --cc=alsa-devel@alsa-project.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=eddie.hung@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=macpaul@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mickflemm@gmail.com \
    --cc=nick83ola@gmail.com \
    --cc=perex@perex.cz \
    --cc=swenson@swenson.io \
    --cc=tiwai@suse.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.