Commit 12b74c80 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Enable VIA SPDIF input pin

Enable the SPDIF input-pin on VIA codecs when SPDIF-input is enabled
by BIOS.  Also, including a bit code clean up.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 3866f0b0
...@@ -566,25 +566,27 @@ static int via_init(struct hda_codec *codec) ...@@ -566,25 +566,27 @@ static int via_init(struct hda_codec *codec)
if (IS_VT1708_VENDORID(codec->vendor_id)) { if (IS_VT1708_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40); PIN_OUT);
snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
AC_VERB_SET_EAPD_BTLENABLE, 0x02); AC_VERB_SET_EAPD_BTLENABLE, 0x02);
} else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) || } else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) ||
IS_VT1709_6CH_VENDORID(codec->vendor_id)) { IS_VT1709_6CH_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40); PIN_OUT);
snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
AC_VERB_SET_EAPD_BTLENABLE, 0x02); AC_VERB_SET_EAPD_BTLENABLE, 0x02);
} else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) || } else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) ||
IS_VT1708B_4CH_VENDORID(codec->vendor_id)) { IS_VT1708B_4CH_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40); PIN_OUT);
snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
AC_VERB_SET_EAPD_BTLENABLE, 0x02); AC_VERB_SET_EAPD_BTLENABLE, 0x02);
} }
} } else /* enable SPDIF-input pin */
snd_hda_codec_write(codec, spec->autocfg.dig_in_pin, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN);
return 0; return 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