Commit 30ea098f authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix input-pin setup for Realtek codecs

Through the transition of autocfg to individual inputs array, I forgot
to rewrite the argument passed to alc_set_input_pin().  This resulted in
wrongly setup input pins.  Fixed now.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5855fb80
...@@ -5160,7 +5160,7 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec) ...@@ -5160,7 +5160,7 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
if (alc_is_input_pin(codec, nid)) { if (alc_is_input_pin(codec, nid)) {
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
if (nid != ALC880_PIN_CD_NID && if (nid != ALC880_PIN_CD_NID &&
(get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP))
snd_hda_codec_write(codec, nid, 0, snd_hda_codec_write(codec, nid, 0,
...@@ -6793,7 +6793,7 @@ static void alc260_auto_init_analog_input(struct hda_codec *codec) ...@@ -6793,7 +6793,7 @@ static void alc260_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
if (nid >= 0x12) { if (nid >= 0x12) {
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
if (nid != ALC260_PIN_CD_NID && if (nid != ALC260_PIN_CD_NID &&
(get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP))
snd_hda_codec_write(codec, nid, 0, snd_hda_codec_write(codec, nid, 0,
...@@ -10664,7 +10664,7 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec) ...@@ -10664,7 +10664,7 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
if (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP) if (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)
snd_hda_codec_write(codec, nid, 0, snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AC_VERB_SET_AMP_GAIN_MUTE,
...@@ -15856,7 +15856,7 @@ static void alc861_auto_init_analog_input(struct hda_codec *codec) ...@@ -15856,7 +15856,7 @@ static void alc861_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
if (nid >= 0x0c && nid <= 0x11) if (nid >= 0x0c && nid <= 0x11)
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
} }
} }
...@@ -16849,7 +16849,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec) ...@@ -16849,7 +16849,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
if (alc_is_input_pin(codec, nid)) { if (alc_is_input_pin(codec, nid)) {
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
if (nid != ALC861VD_PIN_CD_NID && if (nid != ALC861VD_PIN_CD_NID &&
(get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP))
snd_hda_codec_write(codec, nid, 0, snd_hda_codec_write(codec, nid, 0,
...@@ -19086,7 +19086,7 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec) ...@@ -19086,7 +19086,7 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec)
for (i = 0; i < cfg->num_inputs; i++) { for (i = 0; i < cfg->num_inputs; i++) {
hda_nid_t nid = cfg->inputs[i].pin; hda_nid_t nid = cfg->inputs[i].pin;
if (alc_is_input_pin(codec, nid)) { if (alc_is_input_pin(codec, nid)) {
alc_set_input_pin(codec, nid, i); alc_set_input_pin(codec, nid, cfg->inputs[i].type);
if (nid != ALC662_PIN_CD_NID && if (nid != ALC662_PIN_CD_NID &&
(get_wcaps(codec, nid) & AC_WCAP_OUT_AMP)) (get_wcaps(codec, nid) & AC_WCAP_OUT_AMP))
snd_hda_codec_write(codec, nid, 0, snd_hda_codec_write(codec, nid, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment