All pastes #823069 Raw Edit

Something

public text v1 · immutable
·published 2007-12-19 03:52 UTC
rendered paste body
diff -r 2d3893cf030c pci/hda/patch_via.c
--- a/pci/hda/patch_via.c       Tue Dec 18 15:42:53 2007 +0100
+++ b/pci/hda/patch_via.c       Tue Dec 18 17:48:00 2007 +0100
@@ -568,25 +568,27 @@ static int via_init(struct hda_codec *co
                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;
 }