diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-07-26 12:08:14 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-26 12:08:14 -0400 |
commit | f2ad24fa575dd4b392f123744f7c80c82c079ef9 (patch) | |
tree | bdaa59cd157bef956b51ec95e236e769957b9cd1 | |
parent | a3e199732b8e2b272e82cc1ccc49c35239ed6c5a (diff) |
ALSA: hda - Detach from converter at closing in patch_hdmi.c
The generic HDMI code detaches the converter from the stream when
unused, but it must be done rather in the close callback instead of
the cleanup callback.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 641408dc28c0..85853b4e42dc 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1161,9 +1161,9 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1161 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); | 1161 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | 1164 | static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, |
1165 | struct hda_codec *codec, | 1165 | struct hda_codec *codec, |
1166 | struct snd_pcm_substream *substream) | 1166 | struct snd_pcm_substream *substream) |
1167 | { | 1167 | { |
1168 | struct hdmi_spec *spec = codec->spec; | 1168 | struct hdmi_spec *spec = codec->spec; |
1169 | int cvt_idx, pin_idx; | 1169 | int cvt_idx, pin_idx; |
@@ -1171,8 +1171,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
1171 | struct hdmi_spec_per_pin *per_pin; | 1171 | struct hdmi_spec_per_pin *per_pin; |
1172 | int pinctl; | 1172 | int pinctl; |
1173 | 1173 | ||
1174 | snd_hda_codec_cleanup_stream(codec, hinfo->nid); | ||
1175 | |||
1176 | if (hinfo->nid) { | 1174 | if (hinfo->nid) { |
1177 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); | 1175 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); |
1178 | if (snd_BUG_ON(cvt_idx < 0)) | 1176 | if (snd_BUG_ON(cvt_idx < 0)) |
@@ -1195,14 +1193,13 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
1195 | pinctl & ~PIN_OUT); | 1193 | pinctl & ~PIN_OUT); |
1196 | snd_hda_spdif_ctls_unassign(codec, pin_idx); | 1194 | snd_hda_spdif_ctls_unassign(codec, pin_idx); |
1197 | } | 1195 | } |
1198 | |||
1199 | return 0; | 1196 | return 0; |
1200 | } | 1197 | } |
1201 | 1198 | ||
1202 | static const struct hda_pcm_ops generic_ops = { | 1199 | static const struct hda_pcm_ops generic_ops = { |
1203 | .open = hdmi_pcm_open, | 1200 | .open = hdmi_pcm_open, |
1201 | .close = hdmi_pcm_close, | ||
1204 | .prepare = generic_hdmi_playback_pcm_prepare, | 1202 | .prepare = generic_hdmi_playback_pcm_prepare, |
1205 | .cleanup = generic_hdmi_playback_pcm_cleanup, | ||
1206 | }; | 1203 | }; |
1207 | 1204 | ||
1208 | static int generic_hdmi_build_pcms(struct hda_codec *codec) | 1205 | static int generic_hdmi_build_pcms(struct hda_codec *codec) |