Commit f38663ab5cc2d1bf359c0fd2b6b84a9f000e4388

Authored by Gabriele Mazzotta
Committed by Takashi Iwai
1 parent 53da5ebfef

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
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff

sound/pci/hda/patch_realtek.c
... ... @@ -4103,8 +4103,19 @@
4103 4103 {
4104 4104 if (action == HDA_FIXUP_ACT_PROBE) {
4105 4105 struct alc_spec *spec = codec->spec;
  4106 + struct hda_input_mux *imux = &spec->gen.input_mux;
  4107 + int i;
  4108 +
4106 4109 spec->shutup = alc_no_shutup;
4107 4110 codec->power_filter = alc_power_filter_xps13;
  4111 +
  4112 + /* Make the internal mic the default input source. */
  4113 + for (i = 0; i < imux->num_items; i++) {
  4114 + if (spec->gen.imux_pins[i] == 0x12) {
  4115 + spec->gen.cur_mux[0] = i;
  4116 + break;
  4117 + }
  4118 + }
4108 4119 }
4109 4120 }
4110 4121