aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-04-05 08:51:48 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:55:56 -0400
commit6b97eb45f2edca51250b6c1e3142801f069245fe (patch)
treebe20e5e69f05499091ee9d83005b2712babb5431 /sound/pci/hda/patch_conexant.c
parentf9ab2b1c3ab5345f9003bf7ebc1eaa0f9b8cf99e (diff)
[ALSA] hda-codec - Fix SPDIF output
Fix SPDIF output (at least on Realtek codecs). The DIGI_CONVERT verbs have to be reset before the PCM stream is set up. Otherwise the digital setup is screwed up. Also, check the AMP capability before setting AMP of the digital out widget. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index efb95dc2d6db..2349b5eb5aaa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -136,6 +136,18 @@ static int conexant_dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
136 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 136 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
137} 137}
138 138
139static int conexant_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
140 struct hda_codec *codec,
141 unsigned int stream_tag,
142 unsigned int format,
143 struct snd_pcm_substream *substream)
144{
145 struct conexant_spec *spec = codec->spec;
146 return snd_hda_multi_out_dig_prepare(codec, &spec->multiout,
147 stream_tag,
148 format, substream);
149}
150
139/* 151/*
140 * Analog capture 152 * Analog capture
141 */ 153 */
@@ -194,7 +206,8 @@ static struct hda_pcm_stream conexant_pcm_digital_playback = {
194 .nid = 0, /* fill later */ 206 .nid = 0, /* fill later */
195 .ops = { 207 .ops = {
196 .open = conexant_dig_playback_pcm_open, 208 .open = conexant_dig_playback_pcm_open,
197 .close = conexant_dig_playback_pcm_close 209 .close = conexant_dig_playback_pcm_close,
210 .prepare = conexant_dig_playback_pcm_prepare
198 }, 211 },
199}; 212};
200 213