Skip to contentSkip to conversation

ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM

PATCH In review Ajrat Makhmutov 3 participants 14 messages Jun 15, 2024 – Jun 25, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM

Headset microphone do not work out of the box with this laptop. This quirk fixes it. Zihao Wang specified the wrong subsystem id in his patch.

Fixes 3b79954fd00d ("ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers")
---
 sound/pci/hda/patch_realtek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +1 -1
index aa76d1c88589..5ec95a7903b8 100644
@@ -10502,7 +10502,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
 	SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
-	SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
+	SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
 	SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
 	SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
Signature · 1 line
2.33.8
#1 lore raw
Quoted 7 lines · Ajrat Makhmutov

Headset microphone do not work out of the box with this laptop. This quirk fixes it. Zihao Wang specified the wrong subsystem id in his patch.

Fixes 3b79954fd00d ("ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers")

Your From address and Signed-off-by address are different. Could you try to align them?

I can take as-is if inevitably necessary, but usually it's a wrong sign.

thanks,

Takashi

#2 lore raw
In reply to Ajrat Makhmutov

Hi Ajrat,

Quoted 2 lines · Ajrat Makhmutov

Headset microphone do not work out of the box with this laptop. This quirk fixes it. Zihao Wang specified the wrong subsystem id in his patch.

The 17aa:3820 is the Duet 7 ITL6's PCI SSID, so I don't think it's a mistake. It is just a PCI SSID - codec SSID collision.

Here is an ITL6 probe:
https://linux-hardware.org/?probe=d3d4d3dea3

There are some similar collisions with Lenovo laptops. Please see commit 0ac32a396e4f41e88df76ce2282423188a2d2ed0 for an example how to handle one.

Best regards,
Gergo

author
#3 lore raw
Quoted 2 lines · Takashi Iwai

Your From address and Signed-off-by address are different. Could you try to align them?

Ok.

Quoted 3 lines · Gergo Koteles

There are some similar collisions with Lenovo laptops. Please see commit 0ac32a396e4f41e88df76ce2282423188a2d2ed0 for an example how to handle one.

Yes, you're right. I'll do the same and send v3.

#5 lore raw

Hey Rauty,

Quoted 3 lines · Rauty

I haven't changed the patch yet, but it's already in the stable-queue:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.10/alsa-hda-realtek-enable-headset-mic-on-ideapad-330-1.patch
Do you still need changes from me?

I still think this breaks Duet 7 sound, because snd_hda_pick_fixup function picks the PCI SSIDs before Codec SSIDs.
But maybe I missed something.

Takashi, what do you think?

Best regards,
Gergo Koteles

#6 lore raw
Quoted 8 lines · Gergo Koteles

Hey Rauty,

Quoted 3 lines · Rauty

I haven't changed the patch yet, but it's already in the stable-queue:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.10/alsa-hda-realtek-enable-headset-mic-on-ideapad-330-1.patch
Do you still need changes from me?

Quoted 5 lines

I still think this breaks Duet 7 sound, because snd_hda_pick_fixup function picks the PCI SSIDs before Codec SSIDs.
But maybe I missed something.

Takashi, what do you think?

Hm, a breakage looks possible, indeed. I naively thought it being a same model, but this is a different one.

We need an additional codec vendor or SSID check as done for other machines.

Takashi

author
#7 lore raw
Quoted 2 lines · Gergo Koteles

I still think this breaks Duet 7 sound, because snd_hda_pick_fixup function picks the PCI SSIDs before Codec SSIDs.

a piece of lspci from Lenovo IdeaPad 330-17IKB 81DM:
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Subsystem: Lenovo Device [17aa:3837]
Kernel driver in use: snd_hda_intel

Since PCI SSIDs are in priority, I will specify it (0x3837). Then this patch will not break the sound in the laptop and the change will be minimal.

#8 lore raw
Quoted 11 lines · Rauty
Quoted 2 lines · Gergo Koteles

I still think this breaks Duet 7 sound, because snd_hda_pick_fixup function picks the PCI SSIDs before Codec SSIDs.

a piece of lspci from Lenovo IdeaPad 330-17IKB 81DM:
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Subsystem: Lenovo Device [17aa:3837]
Kernel driver in use: snd_hda_intel

Quoted 3 lines

Since PCI SSIDs are in priority, I will specify it (0x3837). Then this patch will not break the sound in the laptop and the change will be minimal.

It's not about PCI SSID but the codec SSID. It's found in the corresponding /proc/asound/card*/codec#* file. It might be the same number as PCI SSID, though. Please check both Vendor Id and Subsystem Id lines.

And we need to know those numbers from the conflicting model (Yoga Diet 7 13ITL6), too.

Takashi

#9 lore raw
Quoted 18 lines · Takashi Iwai
Quoted 11 lines · Rauty
Quoted 2 lines · Gergo Koteles

I still think this breaks Duet 7 sound, because snd_hda_pick_fixup function picks the PCI SSIDs before Codec SSIDs.

a piece of lspci from Lenovo IdeaPad 330-17IKB 81DM:
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
Subsystem: Lenovo Device [17aa:3837]
Kernel driver in use: snd_hda_intel

Quoted 3 lines

Since PCI SSIDs are in priority, I will specify it (0x3837). Then this patch will not break the sound in the laptop and the change will be minimal.

Quoted 7 lines

It's not about PCI SSID but the codec SSID. It's found in the corresponding /proc/asound/card*/codec#* file. It might be the same number as PCI SSID, though. Please check both Vendor Id and Subsystem Id lines.

And we need to know those numbers from the conflicting model (Yoga Diet 7 13ITL6), too.

No need to diet, but "duet" :)

Zihao, do you still have the access to this machine?
If yes, could you give alsa-info.sh output, or a proc file output?

thanks,

Takashi