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