aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-23 14:27:02 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-23 14:27:02 -0400
commit313d2c065253a7549f5e7f43409f1da455329acd (patch)
treef2b5dfaee9efa19cbc3140f4153d337fbde8cd3b /sound
parent506a4196d44218eca20db529c84410dc1095e457 (diff)
ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parser
Fix the initialization of capture-source route when auto-mic is enabled for Conexant auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_conexant.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index cd1a93ae2170..e8dc736b2fc4 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3697,13 +3697,14 @@ static int cx_auto_mux_enum_update(struct hda_codec *codec,
3697{ 3697{
3698 struct conexant_spec *spec = codec->spec; 3698 struct conexant_spec *spec = codec->spec;
3699 hda_nid_t adc; 3699 hda_nid_t adc;
3700 int changed = 1;
3700 3701
3701 if (!imux->num_items) 3702 if (!imux->num_items)
3702 return 0; 3703 return 0;
3703 if (idx >= imux->num_items) 3704 if (idx >= imux->num_items)
3704 idx = imux->num_items - 1; 3705 idx = imux->num_items - 1;
3705 if (spec->cur_mux[0] == idx) 3706 if (spec->cur_mux[0] == idx)
3706 return 0; 3707 changed = 0;
3707 adc = spec->imux_info[idx].adc; 3708 adc = spec->imux_info[idx].adc;
3708 select_input_connection(codec, spec->imux_info[idx].adc, 3709 select_input_connection(codec, spec->imux_info[idx].adc,
3709 spec->imux_info[idx].pin); 3710 spec->imux_info[idx].pin);
@@ -3716,7 +3717,7 @@ static int cx_auto_mux_enum_update(struct hda_codec *codec,
3716 spec->cur_adc_format); 3717 spec->cur_adc_format);
3717 } 3718 }
3718 spec->cur_mux[0] = idx; 3719 spec->cur_mux[0] = idx;
3719 return 1; 3720 return changed;
3720} 3721}
3721 3722
3722static int cx_auto_mux_enum_put(struct snd_kcontrol *kcontrol, 3723static int cx_auto_mux_enum_put(struct snd_kcontrol *kcontrol,