]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/patch_via.c
Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshi...
[linux-2.6-omap-h63xx.git] / sound / pci / hda / patch_via.c
index d42d8f753f11bc85f4ad66a690348b8f8923b8e8..4e5dd4cf36f5f6404852e9ef70a0fc7110fc5730 100644 (file)
@@ -33,7 +33,6 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
@@ -307,7 +306,6 @@ static struct snd_kcontrol_new vt1708_capture_mixer[] = {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                /* The multiple "Capture Source" controls confuse alsamixer
                 * So call somewhat different..
-                * FIXME: the controls appear in the "playback" view!
                 */
                /* .name = "Capture Source", */
                .name = "Input Source",
@@ -568,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;
 }
@@ -929,7 +929,6 @@ static struct snd_kcontrol_new vt1709_capture_mixer[] = {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                /* The multiple "Capture Source" controls confuse alsamixer
                 * So call somewhat different..
-                * FIXME: the controls appear in the "playback" view!
                 */
                /* .name = "Capture Source", */
                .name = "Input Source",
@@ -1478,7 +1477,6 @@ static struct snd_kcontrol_new vt1708B_capture_mixer[] = {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                /* The multiple "Capture Source" controls confuse alsamixer
                 * So call somewhat different..
-                * FIXME: the controls appear in the "playback" view!
                 */
                /* .name = "Capture Source", */
                .name = "Input Source",