aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-11 04:04:40 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:59 -0400
commit963f803fb1bbce87f6049c22c737ae379e1047d3 (patch)
tree9af7cb772e9202e40385520748f0b15b37bc5f3c /sound/pci/hda/hda_codec.c
parent6e8d90cd3418f18f3913c8ae558eee1ba21e4d6c (diff)
ALSA: hda - Don't reset SPDIF in each status change
The SPDIF output is toggled at each time any SPDIF status bits are changed because of the known problems on some codecs. But, this also results in loosing the sync, and the problem is more obvious on HDMI output over SPDIF. Since the toggle is necessary only for some codecs, we should check whether this workaround is needed and skip if unnecessary. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 77fbcd4a69b7..529bd5f6521f 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2590,12 +2590,12 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid,
2590 unsigned int stream_tag, unsigned int format) 2590 unsigned int stream_tag, unsigned int format)
2591{ 2591{
2592 /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */ 2592 /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
2593 if (codec->spdif_ctls & AC_DIG1_ENABLE) 2593 if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
2594 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, 2594 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1,
2595 codec->spdif_ctls & ~AC_DIG1_ENABLE & 0xff); 2595 codec->spdif_ctls & ~AC_DIG1_ENABLE & 0xff);
2596 snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format); 2596 snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
2597 /* turn on again (if needed) */ 2597 /* turn on again (if needed) */
2598 if (codec->spdif_ctls & AC_DIG1_ENABLE) 2598 if (codec->spdif_status_reset && (codec->spdif_ctls & AC_DIG1_ENABLE))
2599 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, 2599 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1,
2600 codec->spdif_ctls & 0xff); 2600 codec->spdif_ctls & 0xff);
2601} 2601}