aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-01-15 06:39:38 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:59 -0500
commit12b74c80cc20dec27b9f9eeb24ee86170c34e5a1 (patch)
treef803ca72979c3daff60282d0bf48424107d2d1d8 /sound
parent3866f0b0c2df3d179b2901d084670d3cf711b1da (diff)
[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: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_via.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index d4dc5596c946..4e5dd4cf36f5 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -566,25 +566,27 @@ static int via_init(struct hda_codec *codec)
566 if (IS_VT1708_VENDORID(codec->vendor_id)) { 566 if (IS_VT1708_VENDORID(codec->vendor_id)) {
567 snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, 567 snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
568 AC_VERB_SET_PIN_WIDGET_CONTROL, 568 AC_VERB_SET_PIN_WIDGET_CONTROL,
569 0x40); 569 PIN_OUT);
570 snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, 570 snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0,
571 AC_VERB_SET_EAPD_BTLENABLE, 0x02); 571 AC_VERB_SET_EAPD_BTLENABLE, 0x02);
572 } else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) || 572 } else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) ||
573 IS_VT1709_6CH_VENDORID(codec->vendor_id)) { 573 IS_VT1709_6CH_VENDORID(codec->vendor_id)) {
574 snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, 574 snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
575 AC_VERB_SET_PIN_WIDGET_CONTROL, 575 AC_VERB_SET_PIN_WIDGET_CONTROL,
576 0x40); 576 PIN_OUT);
577 snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, 577 snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0,
578 AC_VERB_SET_EAPD_BTLENABLE, 0x02); 578 AC_VERB_SET_EAPD_BTLENABLE, 0x02);
579 } else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) || 579 } else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) ||
580 IS_VT1708B_4CH_VENDORID(codec->vendor_id)) { 580 IS_VT1708B_4CH_VENDORID(codec->vendor_id)) {
581 snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, 581 snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
582 AC_VERB_SET_PIN_WIDGET_CONTROL, 582 AC_VERB_SET_PIN_WIDGET_CONTROL,
583 0x40); 583 PIN_OUT);
584 snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, 584 snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0,
585 AC_VERB_SET_EAPD_BTLENABLE, 0x02); 585 AC_VERB_SET_EAPD_BTLENABLE, 0x02);
586 } 586 }
587 } 587 } else /* enable SPDIF-input pin */
588 snd_hda_codec_write(codec, spec->autocfg.dig_in_pin, 0,
589 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN);
588 590
589 return 0; 591 return 0;
590} 592}