Commit f2ad24fa authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent a3e19973
...@@ -1161,7 +1161,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, ...@@ -1161,7 +1161,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
} }
static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec, struct hda_codec *codec,
struct snd_pcm_substream *substream) struct snd_pcm_substream *substream)
{ {
...@@ -1171,8 +1171,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, ...@@ -1171,8 +1171,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hdmi_spec_per_pin *per_pin; struct hdmi_spec_per_pin *per_pin;
int pinctl; int pinctl;
snd_hda_codec_cleanup_stream(codec, hinfo->nid);
if (hinfo->nid) { if (hinfo->nid) {
cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
if (snd_BUG_ON(cvt_idx < 0)) if (snd_BUG_ON(cvt_idx < 0))
...@@ -1195,14 +1193,13 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, ...@@ -1195,14 +1193,13 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
pinctl & ~PIN_OUT); pinctl & ~PIN_OUT);
snd_hda_spdif_ctls_unassign(codec, pin_idx); snd_hda_spdif_ctls_unassign(codec, pin_idx);
} }
return 0; return 0;
} }
static const struct hda_pcm_ops generic_ops = { static const struct hda_pcm_ops generic_ops = {
.open = hdmi_pcm_open, .open = hdmi_pcm_open,
.close = hdmi_pcm_close,
.prepare = generic_hdmi_playback_pcm_prepare, .prepare = generic_hdmi_playback_pcm_prepare,
.cleanup = generic_hdmi_playback_pcm_cleanup,
}; };
static int generic_hdmi_build_pcms(struct hda_codec *codec) static int generic_hdmi_build_pcms(struct hda_codec *codec)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment