Skip to contentSkip to conversation

ALSA: hda - More pop noise fixes for Dell XPS 13 9333

PATCH Applied Gabriele Mazzotta 2 participants 4 messages Aug 8, 2014 – Aug 10, 2014 Sound

lore
Share & tools
lore
#0 lore raw

cover ALSA: hda - More pop noise fixes for Dell XPS 13 9333

Fix the pop noises that happen when the laptop is booting and when it's rebooting.

Gabriele Mazzotta (2):
ALSA: hda - Set internal mic as default input source on Dell XPS 13

    9333

ALSA: hda - Fix pop noises on reboot for Dell XPS 13 9333

 sound/pci/hda/patch_realtek.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0.rc1
#1 lore raw

PATCH 1/2 ALSA: hda - Set internal mic as default input source on Dell XPS 13 9333

If the laptop is powered on with a jack plugged in, independently on what is plugged, the jack is treated as a microphone jack.

Initialize the capture source so that by default jacks are treated as headphones jacks. This will also prevent pop noises on boot in case headphones are plugged in since setting/unsetting mic-in as input source causes a pop noise.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611

---
 sound/pci/hda/patch_realtek.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
sound/pci/hda/patch_realtek.c +11 -0
index b60824e..85cd80c 100644
@@ -4018,8 +4018,19 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec,
 {
 	if (action == HDA_FIXUP_ACT_PROBE) {
 		struct alc_spec *spec = codec->spec;
+		struct hda_input_mux *imux = &spec->gen.input_mux;
+		int i;
+
 		spec->shutup = alc_no_shutup;
 		codec->power_filter = alc_power_filter_xps13;
+
+		/* Make the internal mic the default input source. */
+		for (i = 0; i < imux->num_items; i++) {
+			if (spec->gen.imux_pins[i] == 0x12) {
+				spec->gen.cur_mux[0] = i;
+				break;
+			}
+		}
 	}
 }
 
Signature · 1 line
2.1.0.rc1
#2 lore raw

PATCH 2/2 ALSA: hda - Fix pop noises on reboot for Dell XPS 13 9333

In reply to Gabriele Mazzotta

If nid 0x15 (Headphone Playback Switch) is in D3 and headphones are plugged in when the laptop reboots, a pop noise is generated. Prevent this by keeping nid 0x15 in D0 when headphones are plugged in.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611

---
 sound/pci/hda/patch_realtek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +1 -1
index 85cd80c..12fc3e9a 100644
@@ -4008,7 +4008,7 @@ static unsigned int alc_power_filter_xps13(struct hda_codec *codec,
 
 	/* Avoid pop noises when headphones are plugged in */
 	if (spec->gen.hp_jack_present)
-		if (nid == codec->afg || nid == 0x02)
+		if (nid == codec->afg || nid == 0x02 || nid == 0x15)
 			return AC_PWRST_D0;
 	return power_state;
 }
Signature · 1 line
2.1.0.rc1
Applied
#3 lore raw
In reply to Gabriele Mazzotta

At Fri, 8 Aug 2014 19:34:39 +0200,

Quoted 8 lines · Gabriele Mazzotta

Fix the pop noises that happen when the laptop is booting and when it's rebooting.

Gabriele Mazzotta (2):
ALSA: hda - Set internal mic as default input source on Dell XPS 13

    9333

ALSA: hda - Fix pop noises on reboot for Dell XPS 13 9333

Thanks, applied both patches now.

Takashi

Quoted 7 lines
 sound/pci/hda/patch_realtek.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0.rc1