diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-23 07:51:55 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-23 07:51:55 -0400 |
commit | 52ca15b7c0c711eb37f5e4b769e8488e5c516d43 (patch) | |
tree | d76572afec2ea99d4a095eb6cdee27626f21506f /sound/pci/hda/patch_realtek.c | |
parent | 234b4346a064f8a2a488da10b3c1e640fb778a17 (diff) |
ALSA: hda - Avoid output amp manipulation to digital mic pins
Don't set amp-out values to pins without PINCAP_OUT capability,
which are usually assigned for digital mics on ALC663/ALC272.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b69d9864f6f3..965a531d2fba 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -16750,6 +16750,12 @@ static int alc662_is_input_pin(struct hda_codec *codec, hda_nid_t nid) | |||
16750 | return (pincap & AC_PINCAP_IN) != 0; | 16750 | return (pincap & AC_PINCAP_IN) != 0; |
16751 | } | 16751 | } |
16752 | 16752 | ||
16753 | static int alc662_is_output_pin(struct hda_codec *codec, hda_nid_t nid) | ||
16754 | { | ||
16755 | unsigned int pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); | ||
16756 | return (pincap & AC_PINCAP_OUT) != 0; | ||
16757 | } | ||
16758 | |||
16753 | /* create playback/capture controls for input pins */ | 16759 | /* create playback/capture controls for input pins */ |
16754 | static int alc662_auto_create_analog_input_ctls(struct hda_codec *codec, | 16760 | static int alc662_auto_create_analog_input_ctls(struct hda_codec *codec, |
16755 | const struct auto_pin_cfg *cfg) | 16761 | const struct auto_pin_cfg *cfg) |
@@ -16837,7 +16843,8 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec) | |||
16837 | hda_nid_t nid = spec->autocfg.input_pins[i]; | 16843 | hda_nid_t nid = spec->autocfg.input_pins[i]; |
16838 | if (alc662_is_input_pin(codec, nid)) { | 16844 | if (alc662_is_input_pin(codec, nid)) { |
16839 | alc_set_input_pin(codec, nid, i); | 16845 | alc_set_input_pin(codec, nid, i); |
16840 | if (nid != ALC662_PIN_CD_NID) | 16846 | if (nid != ALC662_PIN_CD_NID && |
16847 | alc662_is_output_pin(codec, nid)) | ||
16841 | snd_hda_codec_write(codec, nid, 0, | 16848 | snd_hda_codec_write(codec, nid, 0, |
16842 | AC_VERB_SET_AMP_GAIN_MUTE, | 16849 | AC_VERB_SET_AMP_GAIN_MUTE, |
16843 | AMP_OUT_MUTE); | 16850 | AMP_OUT_MUTE); |