Message ID | 20250309-for-sound-alc256-dell-v1-1-aacd84853907@arinc9.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ALSA: hda/realtek: Limit Internal Microphone boost for ALC3246 | expand |
On 09/03/2025 12:39, Chester A. Unal via B4 Relay wrote: > From: "Chester A. Unal" <chester.a.unal@arinc9.com> > > Internal Microphone is too loud on Dell Latitude 5490, Dell Device > [1028:0816], which has got ALC3246. I suppose this is the case for all > devices with ALC3246 which is ALC256 for Dell devices. Therefore, limit the > Internal Microphone boost for ALC3246. Change > ALC255_FIXUP_DELL1_MIC_NO_PRESENCE to > ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST which includes the former fixup. > > Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com> > --- > I don't know ALSA or the Intel HDA specification very well so feel free to > correct any incorrect information in the patch log. > > I experience another issue with this laptop that is also there on ALC3204. > Headphones output loops back to Headset Microphone. So if I record with > this microphone, sysystem audio is recorded as well. I have tried a fair > share of fixups by compiling snd-hda-codec-realtek.ko with different fixups > applied for "0x10ec0256, 0x1028", replacing the existing module in > /lib/modules, and then rebooting. > > ALC2XX_FIXUP_HEADSET_MIC makes Headset Microphone appear unplugged. But I > can see on the OS that it detects voice, so, it works. When it appears > unplugged, Headphones output won't loop back to it. This fixup also makes > Speakers appear unavailable and makes Microphone disappear, as > ALC255_FIXUP_DELL1_MIC_NO_PRESENCE won't apply anymore. > > Another issue is when I toggle capture on Headphone Mic on alsamixer, > physically no audio will be played on Headphone. Speaker is unaffected. If > the capture is toggled on anything else, Headphone will play audio. > > Tested on Debian Trixie Alpha, kernel 6.12.17. My headphones are > Tip-Ring-Ring-Sleeve. Here's how I test both issues: > > systemctl --user stop pipewire.socket && systemctl --user stop pipewire > alsamixer -c 0 > > speaker-test -Dhw:0,0 -c2 -r48000 -FS16_LE -t sine > > arecord -Dhw:0,0 -c2 -r48000 -fS16_LE -d30 test.wav > aplay -Dhw:0,0 test.wav > > Attached is test.wav. The timeline of the recording is: > - I run speaker-test. Then I run arecord. After that I say: Speaker-test is > running. Capture is toggled on Headphone Mic. > - After about five seconds I say: I am switching capture to Headset Mic. > - I toggle capture on Headset Mic. After that I say: This is Headset Mic. > - I kill speaker-test. After that I say: I have killed speaker-test. Here's the link to the recording. https://github.com/thesofproject/linux/issues/4292#issuecomment-2708834717 Chester A. > > Maintainers, please let me know if you have an idea how to fix these two > issues. > > Chester A. > --- > sound/pci/hda/patch_realtek.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index d2a1f836dbbf714c26be682133b44cc0bd173ad9..379a325e96641232485a2fc8e6de03798461f466 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -11799,7 +11799,7 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { > SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, > {0x19, 0x40000000}, > {0x1b, 0x40000000}), > - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, > + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, > {0x19, 0x40000000}, > {0x1a, 0x40000000}), > SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, > > --- > base-commit: b7c90e3e717abff6fe06445b98be306b732bbd2b > change-id: 20250308-for-sound-alc256-dell-61967f99ce45 > > Best regards,
On Sun, 09 Mar 2025 13:39:36 +0100, Chester A. Unal via B4 Relay wrote: > > From: "Chester A. Unal" <chester.a.unal@arinc9.com> > > Internal Microphone is too loud on Dell Latitude 5490, Dell Device > [1028:0816], which has got ALC3246. I suppose this is the case for all > devices with ALC3246 which is ALC256 for Dell devices. Therefore, limit the > Internal Microphone boost for ALC3246. Change > ALC255_FIXUP_DELL1_MIC_NO_PRESENCE to > ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST which includes the former fixup. > > Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com> Thanks for the patch. The code replaces the quirk entry for a pin-quirk table, and it implies that this change will influence on all models that have this pin table pattern, which is a bit risky to change. IMO, a safer option would be to add an explicit PCI SSID quirk entry for your device pointing to ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST. > --- > I don't know ALSA or the Intel HDA specification very well so feel free to > correct any incorrect information in the patch log. > > I experience another issue with this laptop that is also there on ALC3204. > Headphones output loops back to Headset Microphone. So if I record with > this microphone, sysystem audio is recorded as well. I have tried a fair > share of fixups by compiling snd-hda-codec-realtek.ko with different fixups > applied for "0x10ec0256, 0x1028", replacing the existing module in > /lib/modules, and then rebooting. The "headphone" mic means to use the pin used for the headphone output as the mic input. If turned on, the pin usage is switched from the output to the input, hence no playback from there any longer. And, a headphone can be indeed used physically as a mic (although the tone is very soft) -- so it's the expected behavior. OTOH, "headset" mic is different; it has both the headset output pin and the headset mic pin that work individually. > ALC2XX_FIXUP_HEADSET_MIC makes Headset Microphone appear unplugged. But I > can see on the OS that it detects voice, so, it works. When it appears > unplugged, Headphones output won't loop back to it. This fixup also makes > Speakers appear unavailable and makes Microphone disappear, as > ALC255_FIXUP_DELL1_MIC_NO_PRESENCE won't apply anymore. If the headset isn't detected by plugging to the headset jack, that's a bug to be fixed. Please elaborate the behavior. thanks, Takashi
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d2a1f836dbbf714c26be682133b44cc0bd173ad9..379a325e96641232485a2fc8e6de03798461f466 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11799,7 +11799,7 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, {0x19, 0x40000000}, {0x1b, 0x40000000}), - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, {0x19, 0x40000000}, {0x1a, 0x40000000}), SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST,