diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bf7e64e2c468..8dcbb04e57b5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4207,7 +4207,8 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec) | |||
4207 | hda_nid_t nid = spec->autocfg.input_pins[i]; | 4207 | hda_nid_t nid = spec->autocfg.input_pins[i]; |
4208 | if (alc880_is_input_pin(nid)) { | 4208 | if (alc880_is_input_pin(nid)) { |
4209 | alc_set_input_pin(codec, nid, i); | 4209 | alc_set_input_pin(codec, nid, i); |
4210 | if (nid != ALC880_PIN_CD_NID) | 4210 | if (nid != ALC880_PIN_CD_NID && |
4211 | (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) | ||
4211 | snd_hda_codec_write(codec, nid, 0, | 4212 | snd_hda_codec_write(codec, nid, 0, |
4212 | AC_VERB_SET_AMP_GAIN_MUTE, | 4213 | AC_VERB_SET_AMP_GAIN_MUTE, |
4213 | AMP_OUT_MUTE); | 4214 | AMP_OUT_MUTE); |
@@ -5673,7 +5674,8 @@ static void alc260_auto_init_analog_input(struct hda_codec *codec) | |||
5673 | hda_nid_t nid = spec->autocfg.input_pins[i]; | 5674 | hda_nid_t nid = spec->autocfg.input_pins[i]; |
5674 | if (nid >= 0x12) { | 5675 | if (nid >= 0x12) { |
5675 | alc_set_input_pin(codec, nid, i); | 5676 | alc_set_input_pin(codec, nid, i); |
5676 | if (nid != ALC260_PIN_CD_NID) | 5677 | if (nid != ALC260_PIN_CD_NID && |
5678 | (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) | ||
5677 | snd_hda_codec_write(codec, nid, 0, | 5679 | snd_hda_codec_write(codec, nid, 0, |
5678 | AC_VERB_SET_AMP_GAIN_MUTE, | 5680 | AC_VERB_SET_AMP_GAIN_MUTE, |
5679 | AMP_OUT_MUTE); | 5681 | AMP_OUT_MUTE); |
@@ -9153,7 +9155,8 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec) | |||
9153 | hda_nid_t nid = spec->autocfg.input_pins[i]; | 9155 | hda_nid_t nid = spec->autocfg.input_pins[i]; |
9154 | if (alc883_is_input_pin(nid)) { | 9156 | if (alc883_is_input_pin(nid)) { |
9155 | alc_set_input_pin(codec, nid, i); | 9157 | alc_set_input_pin(codec, nid, i); |
9156 | if (nid != ALC883_PIN_CD_NID) | 9158 | if (nid != ALC883_PIN_CD_NID && |
9159 | (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) | ||
9157 | snd_hda_codec_write(codec, nid, 0, | 9160 | snd_hda_codec_write(codec, nid, 0, |
9158 | AC_VERB_SET_AMP_GAIN_MUTE, | 9161 | AC_VERB_SET_AMP_GAIN_MUTE, |
9159 | AMP_OUT_MUTE); | 9162 | AMP_OUT_MUTE); |
@@ -14880,7 +14883,8 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) | |||
14880 | hda_nid_t nid = spec->autocfg.input_pins[i]; | 14883 | hda_nid_t nid = spec->autocfg.input_pins[i]; |
14881 | if (alc861vd_is_input_pin(nid)) { | 14884 | if (alc861vd_is_input_pin(nid)) { |
14882 | alc_set_input_pin(codec, nid, i); | 14885 | alc_set_input_pin(codec, nid, i); |
14883 | if (nid != ALC861VD_PIN_CD_NID) | 14886 | if (nid != ALC861VD_PIN_CD_NID && |
14887 | (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) | ||
14884 | snd_hda_codec_write(codec, nid, 0, | 14888 | snd_hda_codec_write(codec, nid, 0, |
14885 | AC_VERB_SET_AMP_GAIN_MUTE, | 14889 | AC_VERB_SET_AMP_GAIN_MUTE, |
14886 | AMP_OUT_MUTE); | 14890 | AMP_OUT_MUTE); |
@@ -16750,12 +16754,6 @@ static int alc662_is_input_pin(struct hda_codec *codec, hda_nid_t nid) | |||
16750 | return (pincap & AC_PINCAP_IN) != 0; | 16754 | return (pincap & AC_PINCAP_IN) != 0; |
16751 | } | 16755 | } |
16752 | 16756 | ||
16753 | static int alc662_is_output_pin(struct hda_codec *codec, hda_nid_t nid) | ||
16754 | { | ||
16755 | unsigned int pincap = snd_hda_query_pin_caps(codec, nid); | ||
16756 | return (pincap & AC_PINCAP_OUT) != 0; | ||
16757 | } | ||
16758 | |||
16759 | /* create playback/capture controls for input pins */ | 16757 | /* create playback/capture controls for input pins */ |
16760 | static int alc662_auto_create_analog_input_ctls(struct hda_codec *codec, | 16758 | static int alc662_auto_create_analog_input_ctls(struct hda_codec *codec, |
16761 | const struct auto_pin_cfg *cfg) | 16759 | const struct auto_pin_cfg *cfg) |
@@ -16844,7 +16842,7 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec) | |||
16844 | if (alc662_is_input_pin(codec, nid)) { | 16842 | if (alc662_is_input_pin(codec, nid)) { |
16845 | alc_set_input_pin(codec, nid, i); | 16843 | alc_set_input_pin(codec, nid, i); |
16846 | if (nid != ALC662_PIN_CD_NID && | 16844 | if (nid != ALC662_PIN_CD_NID && |
16847 | alc662_is_output_pin(codec, nid)) | 16845 | (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) |
16848 | snd_hda_codec_write(codec, nid, 0, | 16846 | snd_hda_codec_write(codec, nid, 0, |
16849 | AC_VERB_SET_AMP_GAIN_MUTE, | 16847 | AC_VERB_SET_AMP_GAIN_MUTE, |
16850 | AMP_OUT_MUTE); | 16848 | AMP_OUT_MUTE); |