aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8ea2fd654327..9917e55d6f11 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2717,9 +2717,6 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec)
2717 int max_nums = ARRAY_SIZE(spec->private_adc_nids); 2717 int max_nums = ARRAY_SIZE(spec->private_adc_nids);
2718 int i, nums = 0; 2718 int i, nums = 0;
2719 2719
2720 if (spec->shared_mic_hp)
2721 max_nums = 1; /* no multi streams with the shared HP/mic */
2722
2723 nid = codec->start_nid; 2720 nid = codec->start_nid;
2724 for (i = 0; i < codec->num_nodes; i++, nid++) { 2721 for (i = 0; i < codec->num_nodes; i++, nid++) {
2725 hda_nid_t src; 2722 hda_nid_t src;
@@ -4076,6 +4073,7 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec)
4076 if (spec->dyn_adc_switch) 4073 if (spec->dyn_adc_switch)
4077 return; 4074 return;
4078 4075
4076 again:
4079 nums = 0; 4077 nums = 0;
4080 for (n = 0; n < spec->num_adc_nids; n++) { 4078 for (n = 0; n < spec->num_adc_nids; n++) {
4081 hda_nid_t cap = spec->private_capsrc_nids[n]; 4079 hda_nid_t cap = spec->private_capsrc_nids[n];
@@ -4096,6 +4094,11 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec)
4096 if (!nums) { 4094 if (!nums) {
4097 /* check whether ADC-switch is possible */ 4095 /* check whether ADC-switch is possible */
4098 if (!alc_check_dyn_adc_switch(codec)) { 4096 if (!alc_check_dyn_adc_switch(codec)) {
4097 if (spec->shared_mic_hp) {
4098 spec->shared_mic_hp = 0;
4099 spec->private_imux[0].num_items = 1;
4100 goto again;
4101 }
4099 printk(KERN_WARNING "hda_codec: %s: no valid ADC found;" 4102 printk(KERN_WARNING "hda_codec: %s: no valid ADC found;"
4100 " using fallback 0x%x\n", 4103 " using fallback 0x%x\n",
4101 codec->chip_name, spec->private_adc_nids[0]); 4104 codec->chip_name, spec->private_adc_nids[0]);
@@ -4113,7 +4116,7 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec)
4113 4116
4114 if (spec->auto_mic) 4117 if (spec->auto_mic)
4115 alc_auto_mic_check_imux(codec); /* check auto-mic setups */ 4118 alc_auto_mic_check_imux(codec); /* check auto-mic setups */
4116 else if (spec->input_mux->num_items == 1) 4119 else if (spec->input_mux->num_items == 1 || spec->shared_mic_hp)
4117 spec->num_adc_nids = 1; /* reduce to a single ADC */ 4120 spec->num_adc_nids = 1; /* reduce to a single ADC */
4118} 4121}
4119 4122