Commit defb5ab2e0ff08ff9a942e2bb7e14c21a55ec26b

Authored by Takashi Iwai
1 parent 01d4825df6

ALSA: hda - Fix yet another auto-mic bug in ALC268

Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing.  Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
	http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>

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

sound/pci/hda/patch_realtek.c
... ... @@ -12859,12 +12859,15 @@
12859 12859 unsigned int wcap = get_wcaps(codec, 0x07);
12860 12860 int i;
12861 12861  
  12862 + spec->capsrc_nids = alc268_capsrc_nids;
12862 12863 /* get type */
12863 12864 wcap = get_wcaps_type(wcap);
12864 12865 if (spec->auto_mic ||
12865 12866 wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) {
12866 12867 spec->adc_nids = alc268_adc_nids_alt;
12867 12868 spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt);
  12869 + if (spec->auto_mic)
  12870 + fixup_automic_adc(codec);
12868 12871 if (spec->auto_mic || spec->input_mux->num_items == 1)
12869 12872 add_mixer(spec, alc268_capture_nosrc_mixer);
12870 12873 else
... ... @@ -12874,7 +12877,6 @@
12874 12877 spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids);
12875 12878 add_mixer(spec, alc268_capture_mixer);
12876 12879 }
12877   - spec->capsrc_nids = alc268_capsrc_nids;
12878 12880 /* set default input source */
12879 12881 for (i = 0; i < spec->num_adc_nids; i++)
12880 12882 snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i],