* [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-07 8:41 ` huangwenhui
0 siblings, 0 replies; 9+ messages in thread
From: huangwenhui @ 2022-06-07 8:41 UTC (permalink / raw)
To: perex, tiwai
Cc: jeremy.szu, hui.wang, wse, cam, kailang, tanureal, sami,
alsa-devel, linux-kernel, huangwenhui
Added the support of new Huawei codec HW8326.
Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
---
sound/hda/hdac_device.c | 1 +
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3e9e9ac804f6..775474f00141 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -651,6 +651,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1095, "Silicon Image" },
{ 0x10de, "Nvidia" },
{ 0x10ec, "Realtek" },
+ { 0x19e5, "Huawei" },
{ 0x1102, "Creative" },
{ 0x1106, "VIA" },
{ 0x111d, "IDT" },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f3ad454b3fbf..0f32c0d17a3f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -443,6 +443,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
case 0x10ec0245:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0257:
case 0x10ec0282:
case 0x10ec0283:
@@ -580,6 +581,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
@@ -3247,6 +3249,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0x0);
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
break;
@@ -3275,6 +3278,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0xd011);
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
break;
@@ -4910,6 +4914,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5025,6 +5030,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0256);
@@ -5175,6 +5181,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x45, 0xc089);
msleep(50);
@@ -5274,6 +5281,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5388,6 +5396,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5489,6 +5498,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x06, 0x6104);
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
@@ -5783,6 +5793,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, alc256fw);
break;
}
@@ -6385,6 +6396,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
case 0x10ec0236:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
@@ -10095,6 +10107,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
spec->codec_variant = ALC269_TYPE_ALC256;
spec->shutup = alc256_shutup;
spec->init_hook = alc256_init;
@@ -11479,6 +11492,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-07 8:41 ` huangwenhui
0 siblings, 0 replies; 9+ messages in thread
From: huangwenhui @ 2022-06-07 8:41 UTC (permalink / raw)
To: perex, tiwai
Cc: alsa-devel, kailang, tanureal, jeremy.szu, linux-kernel, wse,
huangwenhui, hui.wang, sami, cam
Added the support of new Huawei codec HW8326.
Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
---
sound/hda/hdac_device.c | 1 +
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3e9e9ac804f6..775474f00141 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -651,6 +651,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1095, "Silicon Image" },
{ 0x10de, "Nvidia" },
{ 0x10ec, "Realtek" },
+ { 0x19e5, "Huawei" },
{ 0x1102, "Creative" },
{ 0x1106, "VIA" },
{ 0x111d, "IDT" },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f3ad454b3fbf..0f32c0d17a3f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -443,6 +443,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
case 0x10ec0245:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0257:
case 0x10ec0282:
case 0x10ec0283:
@@ -580,6 +581,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
@@ -3247,6 +3249,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0x0);
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
break;
@@ -3275,6 +3278,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0xd011);
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
break;
@@ -4910,6 +4914,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5025,6 +5030,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0256);
@@ -5175,6 +5181,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x45, 0xc089);
msleep(50);
@@ -5274,6 +5281,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5388,6 +5396,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5489,6 +5498,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x06, 0x6104);
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
@@ -5783,6 +5793,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, alc256fw);
break;
}
@@ -6385,6 +6396,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
case 0x10ec0236:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
@@ -10095,6 +10107,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
spec->codec_variant = ALC269_TYPE_ALC256;
spec->shutup = alc256_shutup;
spec->init_hook = alc256_init;
@@ -11479,6 +11492,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
2022-06-07 8:41 ` huangwenhui
@ 2022-06-07 9:09 ` Takashi Iwai
-1 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2022-06-07 9:09 UTC (permalink / raw)
To: huangwenhui
Cc: perex, tiwai, alsa-devel, kailang, tanureal, jeremy.szu,
linux-kernel, wse, hui.wang, sami, cam
On Tue, 07 Jun 2022 10:41:09 +0200,
huangwenhui wrote:
>
> Added the support of new Huawei codec HW8326.
>
It'd be appreciated if you describe about the hardware a bit more.
It looks like a compatible chip with some other Realtek codecs
(ALC256?).
> @@ -11479,6 +11492,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
> HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
> + HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
This table is sorted in the codec ID order. Please put at the
appropriate place (at the last), instead.
thanks,
Takashi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-07 9:09 ` Takashi Iwai
0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2022-06-07 9:09 UTC (permalink / raw)
To: huangwenhui
Cc: alsa-devel, kailang, tanureal, jeremy.szu, linux-kernel, tiwai,
wse, hui.wang, sami, cam
On Tue, 07 Jun 2022 10:41:09 +0200,
huangwenhui wrote:
>
> Added the support of new Huawei codec HW8326.
>
It'd be appreciated if you describe about the hardware a bit more.
It looks like a compatible chip with some other Realtek codecs
(ALC256?).
> @@ -11479,6 +11492,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
> HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
> + HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
This table is sorted in the codec ID order. Please put at the
appropriate place (at the last), instead.
thanks,
Takashi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
2022-06-07 9:09 ` Takashi Iwai
(?)
@ 2022-06-07 9:32 ` huangwenhui
-1 siblings, 0 replies; 9+ messages in thread
From: huangwenhui @ 2022-06-07 9:32 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, kailang, tanureal, jeremy.szu, linux-kernel, tiwai,
wse, hui.wang, sami, cam
The codec HW8326 is a compatible chip with ALC256.
It is developed by Huawei via CPLD with Realtek's codec IP.
Thanks.
------------------ Original ------------------
From: "Takashi Iwai"<tiwai@suse.de>;
Date: Tue, Jun 7, 2022 05:09 PM
To: "huangwenhui"<huangwenhuia@uniontech.com>;
Cc: "perex"<perex@perex.cz>; "tiwai"<tiwai@suse.com>; "alsa-devel"<alsa-devel@alsa-project.org>; "kailang"<kailang@realtek.com>; "tanureal"<tanureal@opensource.cirrus.com>; "jeremy.szu"<jeremy.szu@canonical.com>; "linux-kernel"<linux-kernel@vger.kernel.org>; "wse"<wse@tuxedocomputers.com>; "hui.wang"<hui.wang@canonical.com>; "sami"<sami@loone.fi>; "cam"<cam@neo-zeon.de>;
Subject: Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
On Tue, 07 Jun 2022 10:41:09 +0200,
huangwenhui wrote:
>
> Added the support of new Huawei codec HW8326.
>
It'd be appreciated if you describe about the hardware a bit more.
It looks like a compatible chip with some other Realtek codecs
(ALC256?).
> @@ -11479,6 +11492,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
> HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
> + HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
> HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
This table is sorted in the codec ID order. Please put at the
appropriate place (at the last), instead.
thanks,
Takashi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
2022-06-08 1:12 ` huangwenhui
@ 2022-06-08 5:39 ` Takashi Iwai
-1 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2022-06-08 5:39 UTC (permalink / raw)
To: huangwenhui
Cc: alsa-devel, kailang, tanureal, jeremy.szu, linux-kernel, tiwai,
wse, hui.wang, sami, cam
On Wed, 08 Jun 2022 03:12:27 +0200,
huangwenhui wrote:
>
> Added the support of new Huawei codec HW8326.
>
> Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
Please give more description, as mentioned in the previous post, but
*in the patch itself*. If it's compatible with the existing ALC256,
describe it there.
Also, when you post a newer version of the patch, add v2 prefix to the
subject, e.g.
[PATCH v2] ALSA: hda/realtek - Add HW8326 support
(Of course at the next respin, it'll be v3 :)
thanks,
Takashi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-08 5:39 ` Takashi Iwai
0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2022-06-08 5:39 UTC (permalink / raw)
To: huangwenhui
Cc: tiwai, perex, alsa-devel, kailang, tanureal, jeremy.szu,
linux-kernel, wse, hui.wang, sami, cam
On Wed, 08 Jun 2022 03:12:27 +0200,
huangwenhui wrote:
>
> Added the support of new Huawei codec HW8326.
>
> Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
Please give more description, as mentioned in the previous post, but
*in the patch itself*. If it's compatible with the existing ALC256,
describe it there.
Also, when you post a newer version of the patch, add v2 prefix to the
subject, e.g.
[PATCH v2] ALSA: hda/realtek - Add HW8326 support
(Of course at the next respin, it'll be v3 :)
thanks,
Takashi
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-08 1:12 ` huangwenhui
0 siblings, 0 replies; 9+ messages in thread
From: huangwenhui @ 2022-06-08 1:12 UTC (permalink / raw)
To: tiwai, perex
Cc: alsa-devel, kailang, tanureal, jeremy.szu, linux-kernel, wse,
huangwenhui, hui.wang, sami, cam
Added the support of new Huawei codec HW8326.
Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
---
sound/hda/hdac_device.c | 1 +
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3e9e9ac804f6..775474f00141 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -651,6 +651,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1095, "Silicon Image" },
{ 0x10de, "Nvidia" },
{ 0x10ec, "Realtek" },
+ { 0x19e5, "Huawei" },
{ 0x1102, "Creative" },
{ 0x1106, "VIA" },
{ 0x111d, "IDT" },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f3ad454b3fbf..cd1281691767 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -443,6 +443,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
case 0x10ec0245:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0257:
case 0x10ec0282:
case 0x10ec0283:
@@ -580,6 +581,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
@@ -3247,6 +3249,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0x0);
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
break;
@@ -3275,6 +3278,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0xd011);
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
break;
@@ -4910,6 +4914,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5025,6 +5030,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0256);
@@ -5175,6 +5181,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x45, 0xc089);
msleep(50);
@@ -5274,6 +5281,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5388,6 +5396,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5489,6 +5498,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x06, 0x6104);
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
@@ -5783,6 +5793,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, alc256fw);
break;
}
@@ -6385,6 +6396,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
case 0x10ec0236:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
@@ -10095,6 +10107,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
spec->codec_variant = ALC269_TYPE_ALC256;
spec->shutup = alc256_shutup;
spec->init_hook = alc256_init;
@@ -11545,6 +11558,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
{} /* terminator */
};
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ALSA: hda/realtek - Add HW8326 support
@ 2022-06-08 1:12 ` huangwenhui
0 siblings, 0 replies; 9+ messages in thread
From: huangwenhui @ 2022-06-08 1:12 UTC (permalink / raw)
To: tiwai, perex
Cc: jeremy.szu, hui.wang, wse, cam, kailang, tanureal, sami,
alsa-devel, linux-kernel, huangwenhui
Added the support of new Huawei codec HW8326.
Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
---
sound/hda/hdac_device.c | 1 +
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3e9e9ac804f6..775474f00141 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -651,6 +651,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1095, "Silicon Image" },
{ 0x10de, "Nvidia" },
{ 0x10ec, "Realtek" },
+ { 0x19e5, "Huawei" },
{ 0x1102, "Creative" },
{ 0x1106, "VIA" },
{ 0x111d, "IDT" },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f3ad454b3fbf..cd1281691767 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -443,6 +443,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
case 0x10ec0245:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0257:
case 0x10ec0282:
case 0x10ec0283:
@@ -580,6 +581,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
@@ -3247,6 +3249,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0x0);
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
break;
@@ -3275,6 +3278,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0xd011);
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
break;
@@ -4910,6 +4914,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5025,6 +5030,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0256);
@@ -5175,6 +5181,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x45, 0xc089);
msleep(50);
@@ -5274,6 +5281,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5388,6 +5396,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5489,6 +5498,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x06, 0x6104);
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
@@ -5783,6 +5793,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, alc256fw);
break;
}
@@ -6385,6 +6396,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
case 0x10ec0236:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
@@ -10095,6 +10107,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
spec->codec_variant = ALC269_TYPE_ALC256;
spec->shutup = alc256_shutup;
spec->init_hook = alc256_init;
@@ -11545,6 +11558,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
{} /* terminator */
};
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-06-08 7:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 8:41 [PATCH] ALSA: hda/realtek - Add HW8326 support huangwenhui
2022-06-07 8:41 ` huangwenhui
2022-06-07 9:09 ` Takashi Iwai
2022-06-07 9:09 ` Takashi Iwai
2022-06-07 9:32 ` huangwenhui
2022-06-08 1:12 huangwenhui
2022-06-08 1:12 ` huangwenhui
2022-06-08 5:39 ` Takashi Iwai
2022-06-08 5:39 ` Takashi Iwai
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.