aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9b58f29833e..8d60b1f25ce 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4809,6 +4809,25 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec)
4809 } 4809 }
4810} 4810}
4811 4811
4812static void alc880_auto_init_input_src(struct hda_codec *codec)
4813{
4814 struct alc_spec *spec = codec->spec;
4815 int c;
4816
4817 for (c = 0; c < spec->num_adc_nids; c++) {
4818 unsigned int mux_idx;
4819 const struct hda_input_mux *imux;
4820 mux_idx = c >= spec->num_mux_defs ? 0 : c;
4821 imux = &spec->input_mux[mux_idx];
4822 if (!imux->num_items && mux_idx > 0)
4823 imux = &spec->input_mux[0];
4824 if (imux)
4825 snd_hda_codec_write(codec, spec->adc_nids[c], 0,
4826 AC_VERB_SET_CONNECT_SEL,
4827 imux->items[0].index);
4828 }
4829}
4830
4812/* parse the BIOS configuration and set up the alc_spec */ 4831/* parse the BIOS configuration and set up the alc_spec */
4813/* return 1 if successful, 0 if the proper config is not found, 4832/* return 1 if successful, 0 if the proper config is not found,
4814 * or a negative error code 4833 * or a negative error code
@@ -4887,6 +4906,7 @@ static void alc880_auto_init(struct hda_codec *codec)
4887 alc880_auto_init_multi_out(codec); 4906 alc880_auto_init_multi_out(codec);
4888 alc880_auto_init_extra_out(codec); 4907 alc880_auto_init_extra_out(codec);
4889 alc880_auto_init_analog_input(codec); 4908 alc880_auto_init_analog_input(codec);
4909 alc880_auto_init_input_src(codec);
4890 if (spec->unsol_event) 4910 if (spec->unsol_event)
4891 alc_inithook(codec); 4911 alc_inithook(codec);
4892} 4912}
@@ -6398,6 +6418,8 @@ static void alc260_auto_init_analog_input(struct hda_codec *codec)
6398 } 6418 }
6399} 6419}
6400 6420
6421#define alc260_auto_init_input_src alc880_auto_init_input_src
6422
6401/* 6423/*
6402 * generic initialization of ADC, input mixers and output mixers 6424 * generic initialization of ADC, input mixers and output mixers
6403 */ 6425 */
@@ -6484,6 +6506,7 @@ static void alc260_auto_init(struct hda_codec *codec)
6484 struct alc_spec *spec = codec->spec; 6506 struct alc_spec *spec = codec->spec;
6485 alc260_auto_init_multi_out(codec); 6507 alc260_auto_init_multi_out(codec);
6486 alc260_auto_init_analog_input(codec); 6508 alc260_auto_init_analog_input(codec);
6509 alc260_auto_init_input_src(codec);
6487 if (spec->unsol_event) 6510 if (spec->unsol_event)
6488 alc_inithook(codec); 6511 alc_inithook(codec);
6489} 6512}