aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-10-31 12:24:01 -0400
committerTakashi Iwai <tiwai@suse.de>2008-10-31 12:24:01 -0400
commitafecd78cd2ec81512d6ec451906f71d9671a0b3b (patch)
treecac6cba97ae90c4e509f05686de22aafc8264862 /sound/pci/hda/patch_realtek.c
parent1b063c3d090c45298a37ebc879c71379cf845d9c (diff)
parentee956e090e114ede6542c76a7465ed6ce118ad52 (diff)
Merge branch 'topic/fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b60187688bd0..d300fc49f7e1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -828,6 +828,7 @@ static void alc_sku_automute(struct hda_codec *codec)
828 spec->jack_present ? 0 : PIN_OUT); 828 spec->jack_present ? 0 : PIN_OUT);
829} 829}
830 830
831#if 0 /* it's broken in some acses -- temporarily disabled */
831static void alc_mic_automute(struct hda_codec *codec) 832static void alc_mic_automute(struct hda_codec *codec)
832{ 833{
833 struct alc_spec *spec = codec->spec; 834 struct alc_spec *spec = codec->spec;
@@ -848,6 +849,9 @@ static void alc_mic_automute(struct hda_codec *codec)
848 snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic, 849 snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic,
849 HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); 850 HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0);
850} 851}
852#else
853#define alc_mic_automute(codec) /* NOP */
854#endif /* disabled */
851 855
852/* unsolicited event for HP jack sensing */ 856/* unsolicited event for HP jack sensing */
853static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) 857static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
@@ -1057,12 +1061,14 @@ do_sku:
1057 AC_VERB_SET_UNSOLICITED_ENABLE, 1061 AC_VERB_SET_UNSOLICITED_ENABLE,
1058 AC_USRSP_EN | ALC880_HP_EVENT); 1062 AC_USRSP_EN | ALC880_HP_EVENT);
1059 1063
1064#if 0 /* it's broken in some acses -- temporarily disabled */
1060 if (spec->autocfg.input_pins[AUTO_PIN_MIC] && 1065 if (spec->autocfg.input_pins[AUTO_PIN_MIC] &&
1061 spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]) 1066 spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC])
1062 snd_hda_codec_write(codec, 1067 snd_hda_codec_write(codec,
1063 spec->autocfg.input_pins[AUTO_PIN_MIC], 0, 1068 spec->autocfg.input_pins[AUTO_PIN_MIC], 0,
1064 AC_VERB_SET_UNSOLICITED_ENABLE, 1069 AC_VERB_SET_UNSOLICITED_ENABLE,
1065 AC_USRSP_EN | ALC880_MIC_EVENT); 1070 AC_USRSP_EN | ALC880_MIC_EVENT);
1071#endif /* disabled */
1066 1072
1067 spec->unsol_event = alc_sku_unsol_event; 1073 spec->unsol_event = alc_sku_unsol_event;
1068} 1074}
@@ -12232,8 +12238,26 @@ static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec,
12232 return 0; 12238 return 0;
12233} 12239}
12234 12240
12235#define alc269_auto_create_analog_input_ctls \ 12241static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec,
12236 alc880_auto_create_analog_input_ctls 12242 const struct auto_pin_cfg *cfg)
12243{
12244 int err;
12245
12246 err = alc880_auto_create_analog_input_ctls(spec, cfg);
12247 if (err < 0)
12248 return err;
12249 /* digital-mic input pin is excluded in alc880_auto_create..()
12250 * because it's under 0x18
12251 */
12252 if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 ||
12253 cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) {
12254 struct hda_input_mux *imux = &spec->private_imux;
12255 imux->items[imux->num_items].label = "Int Mic";
12256 imux->items[imux->num_items].index = 0x05;
12257 imux->num_items++;
12258 }
12259 return 0;
12260}
12237 12261
12238#ifdef CONFIG_SND_HDA_POWER_SAVE 12262#ifdef CONFIG_SND_HDA_POWER_SAVE
12239#define alc269_loopbacks alc880_loopbacks 12263#define alc269_loopbacks alc880_loopbacks