diff options
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 69b928449789..8f23374fa642 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -877,8 +877,6 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
| 877 | struct hdmi_eld *eld; | 877 | struct hdmi_eld *eld; |
| 878 | struct hdmi_spec_per_cvt *per_cvt = NULL; | 878 | struct hdmi_spec_per_cvt *per_cvt = NULL; |
| 879 | 879 | ||
| 880 | hinfo->nid = 0; /* clear the leftover value */ | ||
| 881 | |||
| 882 | /* Validate hinfo */ | 880 | /* Validate hinfo */ |
| 883 | pin_idx = hinfo_to_pin_index(spec, hinfo); | 881 | pin_idx = hinfo_to_pin_index(spec, hinfo); |
| 884 | if (snd_BUG_ON(pin_idx < 0)) | 882 | if (snd_BUG_ON(pin_idx < 0)) |
| @@ -1163,6 +1161,14 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
| 1163 | 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); |
| 1164 | } | 1162 | } |
| 1165 | 1163 | ||
| 1164 | static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
| 1165 | struct hda_codec *codec, | ||
| 1166 | struct snd_pcm_substream *substream) | ||
| 1167 | { | ||
| 1168 | snd_hda_codec_cleanup_stream(codec, hinfo->nid); | ||
| 1169 | return 0; | ||
| 1170 | } | ||
| 1171 | |||
| 1166 | static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, | 1172 | static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, |
| 1167 | struct hda_codec *codec, | 1173 | struct hda_codec *codec, |
| 1168 | struct snd_pcm_substream *substream) | 1174 | struct snd_pcm_substream *substream) |
| @@ -1202,6 +1208,7 @@ static const struct hda_pcm_ops generic_ops = { | |||
| 1202 | .open = hdmi_pcm_open, | 1208 | .open = hdmi_pcm_open, |
| 1203 | .close = hdmi_pcm_close, | 1209 | .close = hdmi_pcm_close, |
| 1204 | .prepare = generic_hdmi_playback_pcm_prepare, | 1210 | .prepare = generic_hdmi_playback_pcm_prepare, |
| 1211 | .cleanup = generic_hdmi_playback_pcm_cleanup, | ||
| 1205 | }; | 1212 | }; |
| 1206 | 1213 | ||
| 1207 | static int generic_hdmi_build_pcms(struct hda_codec *codec) | 1214 | static int generic_hdmi_build_pcms(struct hda_codec *codec) |
| @@ -1220,7 +1227,6 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec) | |||
| 1220 | pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; | 1227 | pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; |
| 1221 | pstr->substreams = 1; | 1228 | pstr->substreams = 1; |
| 1222 | pstr->ops = generic_ops; | 1229 | pstr->ops = generic_ops; |
| 1223 | pstr->nid = 1; /* FIXME: just for avoiding a debug WARNING */ | ||
| 1224 | /* other pstr fields are set in open */ | 1230 | /* other pstr fields are set in open */ |
| 1225 | } | 1231 | } |
| 1226 | 1232 | ||
