[PATCH 1/2] ALSA: hda/realtek: Fix headset mic on Loongson platform
Add pin quirks to enable use of the headset mic on Loongson platform.
Signed-off-by: Kaige Li likaige@loongson.cn --- sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4c7e191..b227be3 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6041,6 +6041,7 @@ enum { ALC290_FIXUP_SUBWOOFER_HSJACK, ALC269_FIXUP_THINKPAD_ACPI, ALC269_FIXUP_DMIC_THINKPAD_ACPI, + ALC269_FIXUP_LOONGSON_HDA, ALC255_FIXUP_ACER_MIC_NO_PRESENCE, ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, @@ -6381,6 +6382,14 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC }, + [ALC269_FIXUP_LOONGSON_HDA] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x1b, 0x02214c40 }, /* Front Mic */ + { 0x15, 0x01014030 }, /* Rear Mic */ + { } + }, + }, [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl[]) { @@ -7654,6 +7663,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), + SND_PCI_QUIRK(0x10ec, 0x0269, "Loongson HDA", ALC269_FIXUP_LOONGSON_HDA), SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller.
Signed-off-by: Kaige Li likaige@loongson.cn --- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 1625721..ea1d535 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2735,6 +2735,8 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_HDMI }, /* Zhaoxin */ { PCI_DEVICE(0x1d17, 0x3288), .driver_data = AZX_DRIVER_ZHAOXIN }, + /* Loongson */ + { PCI_DEVICE(0x0014, 0x7a07), .driver_data = AZX_DRIVER_GENERIC }, { 0, } }; MODULE_DEVICE_TABLE(pci, azx_ids);
On Fri, 17 Jul 2020 04:51:32 +0200, Kaige Li wrote:
Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller.
Signed-off-by: Kaige Li likaige@loongson.cn
Applied this one. Thanks.
Takashi
On Fri, 17 Jul 2020 04:51:31 +0200, Kaige Li wrote:
Add pin quirks to enable use of the headset mic on Loongson platform.
Signed-off-by: Kaige Li likaige@loongson.cn @@ -7654,6 +7663,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
- SND_PCI_QUIRK(0x10ec, 0x0269, "Loongson HDA", ALC269_FIXUP_LOONGSON_HDA),
This is basically Realtek ALC269 codec itself, so putting this here may hit with many other machines.
Doesn't it has any proper PCI or codec SSID? The lack of them usually means a bug of BIOS.
thanks,
Takashi
On 07/17/2020 02:57 PM, Takashi Iwai wrote:
On Fri, 17 Jul 2020 04:51:31 +0200, Kaige Li wrote:
Add pin quirks to enable use of the headset mic on Loongson platform.
Signed-off-by: Kaige Li likaige@loongson.cn @@ -7654,6 +7663,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
- SND_PCI_QUIRK(0x10ec, 0x0269, "Loongson HDA", ALC269_FIXUP_LOONGSON_HDA),
This is basically Realtek ALC269 codec itself, so putting this here may hit with many other machines.
Doesn't it has any proper PCI or codec SSID? The lack of them usually means a bug of BIOS.
Ok, I will have a look. If there is any progress, I will reply to you again.
Thank you!
Kaige
thanks,
Takashi
On 07/20/2020 09:58 AM, Kaige Li wrote:
On 07/17/2020 02:57 PM, Takashi Iwai wrote:
On Fri, 17 Jul 2020 04:51:31 +0200, Kaige Li wrote:
Add pin quirks to enable use of the headset mic on Loongson platform.
Signed-off-by: Kaige Li likaige@loongson.cn @@ -7654,6 +7663,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
- SND_PCI_QUIRK(0x10ec, 0x0269, "Loongson HDA",
ALC269_FIXUP_LOONGSON_HDA),
This is basically Realtek ALC269 codec itself, so putting this here may hit with many other machines.
Doesn't it has any proper PCI or codec SSID? The lack of them usually means a bug of BIOS.
Ok, I will have a look. If there is any progress, I will reply to you again.
Sorry for that, there is no proper PCI or codec SSID. We have fixed this by writing the firmware. So this patch is useless.
Thank you for your time!
Kaige
Thank you!
Kaige
thanks,
Takashi
participants (2)
-
Kaige Li
-
Takashi Iwai