aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_hdmi.c21
-rw-r--r--sound/pci/hda/patch_intelhdmi.c8
-rw-r--r--sound/pci/hda/patch_nvhdmi.c8
3 files changed, 1 insertions, 36 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 2bc0f07cf33f..afd6022a96a7 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -707,8 +707,6 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
707 u32 stream_tag, int format) 707 u32 stream_tag, int format)
708{ 708{
709 struct hdmi_spec *spec = codec->spec; 709 struct hdmi_spec *spec = codec->spec;
710 int tag;
711 int fmt;
712 int pinctl; 710 int pinctl;
713 int new_pinctl = 0; 711 int new_pinctl = 0;
714 int i; 712 int i;
@@ -745,24 +743,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
745 return -EINVAL; 743 return -EINVAL;
746 } 744 }
747 745
748 tag = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0) >> 4; 746 snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
749 fmt = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_STREAM_FORMAT, 0);
750
751 snd_printdd("hdmi_setup_stream: "
752 "NID=0x%x, %sstream=0x%x, %sformat=0x%x\n",
753 nid,
754 tag == stream_tag ? "" : "new-",
755 stream_tag,
756 fmt == format ? "" : "new-",
757 format);
758
759 if (tag != stream_tag)
760 snd_hda_codec_write(codec, nid, 0,
761 AC_VERB_SET_CHANNEL_STREAMID,
762 stream_tag << 4);
763 if (fmt != format)
764 snd_hda_codec_write(codec, nid, 0,
765 AC_VERB_SET_STREAM_FORMAT, format);
766 return 0; 747 return 0;
767} 748}
768 749
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
index d382d3c81c0f..36a9b83a6174 100644
--- a/sound/pci/hda/patch_intelhdmi.c
+++ b/sound/pci/hda/patch_intelhdmi.c
@@ -69,20 +69,12 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
69 return hdmi_setup_stream(codec, hinfo->nid, stream_tag, format); 69 return hdmi_setup_stream(codec, hinfo->nid, stream_tag, format);
70} 70}
71 71
72static int intel_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
73 struct hda_codec *codec,
74 struct snd_pcm_substream *substream)
75{
76 return 0;
77}
78
79static struct hda_pcm_stream intel_hdmi_pcm_playback = { 72static struct hda_pcm_stream intel_hdmi_pcm_playback = {
80 .substreams = 1, 73 .substreams = 1,
81 .channels_min = 2, 74 .channels_min = 2,
82 .ops = { 75 .ops = {
83 .open = hdmi_pcm_open, 76 .open = hdmi_pcm_open,
84 .prepare = intel_hdmi_playback_pcm_prepare, 77 .prepare = intel_hdmi_playback_pcm_prepare,
85 .cleanup = intel_hdmi_playback_pcm_cleanup,
86 }, 78 },
87}; 79};
88 80
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
index f636870dc718..69b950d527c3 100644
--- a/sound/pci/hda/patch_nvhdmi.c
+++ b/sound/pci/hda/patch_nvhdmi.c
@@ -326,13 +326,6 @@ static int nvhdmi_dig_playback_pcm_prepare_8ch(struct hda_pcm_stream *hinfo,
326 return 0; 326 return 0;
327} 327}
328 328
329static int nvhdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
330 struct hda_codec *codec,
331 struct snd_pcm_substream *substream)
332{
333 return 0;
334}
335
336static int nvhdmi_dig_playback_pcm_prepare_2ch(struct hda_pcm_stream *hinfo, 329static int nvhdmi_dig_playback_pcm_prepare_2ch(struct hda_pcm_stream *hinfo,
337 struct hda_codec *codec, 330 struct hda_codec *codec,
338 unsigned int stream_tag, 331 unsigned int stream_tag,
@@ -350,7 +343,6 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch_89 = {
350 .ops = { 343 .ops = {
351 .open = hdmi_pcm_open, 344 .open = hdmi_pcm_open,
352 .prepare = nvhdmi_dig_playback_pcm_prepare_8ch_89, 345 .prepare = nvhdmi_dig_playback_pcm_prepare_8ch_89,
353 .cleanup = nvhdmi_playback_pcm_cleanup,
354 }, 346 },
355}; 347};
356 348