From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
Takashi Iwai <tiwai@suse.de>, Sasha Levin <sashal@kernel.org>,
perex@perex.cz, tiwai@suse.com, jeremy.szu@canonical.com,
wse@tuxedocomputers.com, andy.chi@canonical.com,
kai.heng.feng@canonical.com, tanureal@opensource.cirrus.com,
cam@neo-zeon.de, kailang@realtek.com, yong.wu@mediatek.com,
alsa-devel@alsa-project.org
Subject: [PATCH AUTOSEL 5.17 02/12] ALSA: hda/realtek: Add quirk for Dell Latitude 7520
Date: Tue, 24 May 2022 11:59:16 -0400 [thread overview]
Message-ID: <20220524155929.826793-2-sashal@kernel.org> (raw)
In-Reply-To: <20220524155929.826793-1-sashal@kernel.org>
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
[ Upstream commit 1efcdd9c1f34f5a6590bc9ac5471e562fb011386 ]
The driver is currently using ALC269_FIXUP_DELL4_MIC_NO_PRESENCE for
the Latitude 7520, but this fixup chain has some issues:
- The internal mic is really loud and the recorded audio is distorted
at "standard" audio levels.
- There are pop noises at system startup and when plugging/unplugging
headphone jacks.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215885
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Link: https://lore.kernel.org/r/20220501124237.4667-1-gabriele.mzt@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/hda/patch_realtek.c | 43 +++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 51c54cf0f312..8425eadf6873 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6775,6 +6775,41 @@ static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
}
}
+static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ struct hda_input_mux *imux = &spec->gen.input_mux;
+ int i;
+
+ alc269_fixup_limit_int_mic_boost(codec, fix, action);
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /**
+ * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic)
+ * to Hi-Z to avoid pop noises at startup and when plugging and
+ * unplugging headphones.
+ */
+ snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
+ snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ);
+ break;
+ case HDA_FIXUP_ACT_PROBE:
+ /**
+ * Make the internal mic (0x12) the default input source to
+ * prevent pop noises on cold boot.
+ */
+ for (i = 0; i < imux->num_items; i++) {
+ if (spec->gen.imux_pins[i] == 0x12) {
+ spec->gen.cur_mux[0] = i;
+ break;
+ }
+ }
+ break;
+ }
+}
+
enum {
ALC269_FIXUP_GPIO2,
ALC269_FIXUP_SONY_VAIO,
@@ -6816,6 +6851,7 @@ enum {
ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
+ ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET,
ALC269_FIXUP_HEADSET_MODE,
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
ALC269_FIXUP_ASPIRE_HEADSET_MIC,
@@ -8772,6 +8808,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC285_FIXUP_HP_MUTE_LED,
},
+ [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc_fixup_dell4_mic_no_presence_quiet,
+ .chained = true,
+ .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8862,6 +8904,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET),
SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC),
SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK),
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
--
2.35.1
next prev parent reply other threads:[~2022-05-24 15:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 15:59 [PATCH AUTOSEL 5.17 01/12] ALSA: usb-audio: Don't get sample rate for MCT Trigger 5 USB-to-HDMI Sasha Levin
2022-05-24 15:59 ` Sasha Levin [this message]
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 03/12] ALSA: hda/realtek: Add quirk for the Framework Laptop Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 04/12] pinctrl: sunxi: fix f1c100s uart2 function Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 05/12] KVM: arm64: Don't hypercall before EL2 init Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 06/12] parisc: Disable debug code regarding cache flushes in handle_nadtlb_fault() Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 07/12] percpu_ref_init(): clean ->percpu_count_ref on failure Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 08/12] net: af_key: check encryption module availability consistency Sasha Levin
2022-05-24 18:09 ` Jakub Kicinski
2022-05-25 5:20 ` Jakub Kicinski
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 09/12] nfc: pn533: Fix buggy cleanup order Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 10/12] net: ftgmac100: Disable hardware checksum on AST2600 Sasha Levin
2022-05-24 18:47 ` Arnd Bergmann
2022-05-24 18:47 ` Arnd Bergmann
2022-05-24 19:01 ` Jakub Kicinski
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 11/12] i2c: ismt: Provide a DMA buffer for Interrupt Cause Logging Sasha Levin
2022-05-24 15:59 ` [PATCH AUTOSEL 5.17 12/12] drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers Sasha Levin
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=20220524155929.826793-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andy.chi@canonical.com \
--cc=cam@neo-zeon.de \
--cc=gabriele.mzt@gmail.com \
--cc=jeremy.szu@canonical.com \
--cc=kai.heng.feng@canonical.com \
--cc=kailang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tanureal@opensource.cirrus.com \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=wse@tuxedocomputers.com \
--cc=yong.wu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox