diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-07-06 06:58:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-06 07:02:42 -0400 |
commit | ea35929b886975a240660b3ba6c61826761731ad (patch) | |
tree | 936855cbbe35e8a9b5ce3c0ab29946ec0c291f2e /sound/pci | |
parent | 21a4dc43acdd547335f59ad52efeef5160247736 (diff) |
ALSA: hda - Force to initialize input mixer setup for CS420x
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 051302e78345..8e33214abeb4 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -572,12 +572,13 @@ static struct snd_kcontrol_new cs_capture_ctls[] = { | |||
572 | HDA_BIND_VOL("Capture Volume", 0), | 572 | HDA_BIND_VOL("Capture Volume", 0), |
573 | }; | 573 | }; |
574 | 574 | ||
575 | static int change_cur_input(struct hda_codec *codec, unsigned int idx) | 575 | static int change_cur_input(struct hda_codec *codec, unsigned int idx, |
576 | int force) | ||
576 | { | 577 | { |
577 | struct cs_spec *spec = codec->spec; | 578 | struct cs_spec *spec = codec->spec; |
578 | struct auto_pin_cfg *cfg = &spec->autocfg; | 579 | struct auto_pin_cfg *cfg = &spec->autocfg; |
579 | 580 | ||
580 | if (spec->cur_input == idx) | 581 | if (spec->cur_input == idx && !force) |
581 | return 0; | 582 | return 0; |
582 | if (spec->cur_adc && spec->cur_adc != spec->adc_nid[idx]) { | 583 | if (spec->cur_adc && spec->cur_adc != spec->adc_nid[idx]) { |
583 | /* stream is running, let's swap the current ADC */ | 584 | /* stream is running, let's swap the current ADC */ |
@@ -630,7 +631,7 @@ static int cs_capture_source_put(struct snd_kcontrol *kcontrol, | |||
630 | if (idx >= spec->num_inputs) | 631 | if (idx >= spec->num_inputs) |
631 | return -EINVAL; | 632 | return -EINVAL; |
632 | idx = spec->input_idx[idx]; | 633 | idx = spec->input_idx[idx]; |
633 | return change_cur_input(codec, idx); | 634 | return change_cur_input(codec, idx, 0); |
634 | } | 635 | } |
635 | 636 | ||
636 | static struct snd_kcontrol_new cs_capture_source = { | 637 | static struct snd_kcontrol_new cs_capture_source = { |
@@ -773,11 +774,11 @@ static void cs_automic(struct hda_codec *codec) | |||
773 | present = snd_hda_codec_read(codec, nid, 0, | 774 | present = snd_hda_codec_read(codec, nid, 0, |
774 | AC_VERB_GET_PIN_SENSE, 0); | 775 | AC_VERB_GET_PIN_SENSE, 0); |
775 | if (present & AC_PINSENSE_PRESENCE) | 776 | if (present & AC_PINSENSE_PRESENCE) |
776 | change_cur_input(codec, spec->automic_idx); | 777 | change_cur_input(codec, spec->automic_idx, 0); |
777 | else { | 778 | else { |
778 | unsigned int imic = (spec->automic_idx == AUTO_PIN_MIC) ? | 779 | unsigned int imic = (spec->automic_idx == AUTO_PIN_MIC) ? |
779 | AUTO_PIN_FRONT_MIC : AUTO_PIN_MIC; | 780 | AUTO_PIN_FRONT_MIC : AUTO_PIN_MIC; |
780 | change_cur_input(codec, imic); | 781 | change_cur_input(codec, imic, 0); |
781 | } | 782 | } |
782 | } | 783 | } |
783 | 784 | ||
@@ -857,6 +858,7 @@ static void init_input(struct hda_codec *codec) | |||
857 | AC_VERB_SET_UNSOLICITED_ENABLE, | 858 | AC_VERB_SET_UNSOLICITED_ENABLE, |
858 | AC_USRSP_EN | MIC_EVENT); | 859 | AC_USRSP_EN | MIC_EVENT); |
859 | } | 860 | } |
861 | change_cur_input(codec, spec->cur_input, 1); | ||
860 | if (spec->mic_detect) | 862 | if (spec->mic_detect) |
861 | cs_automic(codec); | 863 | cs_automic(codec); |
862 | } | 864 | } |