aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_hdmi.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-22 17:21:38 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-22 17:21:38 -0400
commit1304a7343b30fc4f16045412efdbb4179a3d9255 (patch)
tree83d667ac4f62e30f70305ce4cc7e030e3465f92e /sound/pci/hda/patch_hdmi.c
parent1d76efe1577b4323609b1bcbfafa8b731eda071a (diff)
parent23dcfa61bac244e1200ff9ad19c6e9144dcb6bb5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r--sound/pci/hda/patch_hdmi.c12
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
1164static 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
1166static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, 1172static 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
1207static int generic_hdmi_build_pcms(struct hda_codec *codec) 1214static 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