Skip to content

Commit

Permalink
[ALSA] hda-codec - Enable VIA SPDIF input pin
Browse files Browse the repository at this point in the history
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: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 3866f0b commit 12b74c8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,25 +566,27 @@ static int via_init(struct hda_codec *codec)
if (IS_VT1708_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40);
PIN_OUT);
snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
AC_VERB_SET_EAPD_BTLENABLE, 0x02);
} else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) ||
IS_VT1709_6CH_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40);
PIN_OUT);
snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
AC_VERB_SET_EAPD_BTLENABLE, 0x02);
} else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) ||
IS_VT1708B_4CH_VENDORID(codec->vendor_id)) {
snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
0x40);
PIN_OUT);
snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
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;
}
Expand Down

0 comments on commit 12b74c8

Please sign in to comment.