]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/hda_codec.c
ALSA: hda - Don't reset SPDIF in each status change
[linux-2.6-omap-h63xx.git] / sound / pci / hda / hda_codec.c
index 77fbcd4a69b71f828df7d51b8a3ef8c31a4b6c15..529bd5f6521f2b0ff5b94cdec4f877930ef7f4ca 100644 (file)
@@ -2590,12 +2590,12 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid,
                                 unsigned int stream_tag, unsigned int format)
 {
        /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
-       if (codec->spdif_ctls & AC_DIG1_ENABLE)
+       if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
                snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1,
                                    codec->spdif_ctls & ~AC_DIG1_ENABLE & 0xff);
        snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
        /* turn on again (if needed) */
-       if (codec->spdif_ctls & AC_DIG1_ENABLE)
+       if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
                snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1,
                                    codec->spdif_ctls & 0xff);
 }