ALSA: hda - remove intelhdmi dependency on multiout

We'll be managing multiple HDMI audio sources/sinks on our own.
So remove multiout dependency from intelhdmi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
index 2dfb1ef..02be428 100644
--- a/sound/pci/hda/patch_intelhdmi.c
+++ b/sound/pci/hda/patch_intelhdmi.c
@@ -39,7 +39,6 @@
 #define INTEL_HDMI_EVENT_TAG		0x08
 
 struct intel_hdmi_spec {
-	struct hda_multi_out multiout;
 	struct hda_pcm pcm_rec;
 	struct hdmi_eld sink_eld;
 };
@@ -548,9 +547,7 @@
 					struct hda_codec *codec,
 					struct snd_pcm_substream *substream)
 {
-	struct intel_hdmi_spec *spec = codec->spec;
-
-	return snd_hda_multi_out_dig_open(codec, &spec->multiout);
+	return 0;
 }
 
 static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo,
@@ -561,7 +558,8 @@
 
 	hdmi_stop_infoframe_trans(codec, pin_nid);
 
-	return snd_hda_multi_out_dig_close(codec, &spec->multiout);
+	snd_hda_codec_cleanup_stream(codec, hinfo->nid);
+	return 0;
 }
 
 static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
@@ -570,15 +568,12 @@
 					   unsigned int format,
 					   struct snd_pcm_substream *substream)
 {
-	struct intel_hdmi_spec *spec = codec->spec;
-
-	snd_hda_multi_out_dig_prepare(codec, &spec->multiout, stream_tag,
-					     format, substream);
-
-	hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels);
+	hdmi_set_channel_count(codec, cvt_nid,
+			       substream->runtime->channels);
 
 	hdmi_setup_audio_infoframe(codec, cvt_nid, substream);
 
+	snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format);
 	return 0;
 }
 
@@ -616,7 +611,7 @@
 	struct intel_hdmi_spec *spec = codec->spec;
 	int err;
 
-	err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid);
+	err = snd_hda_create_spdif_out_ctls(codec, cvt_nid);
 	if (err < 0)
 		return err;
 
@@ -657,10 +652,6 @@
 	if (spec == NULL)
 		return -ENOMEM;
 
-	spec->multiout.num_dacs = 0;	  /* no analog */
-	spec->multiout.max_channels = 8;
-	spec->multiout.dig_out_nid = cvt_nid;
-
 	codec->spec = spec;
 	codec->patch_ops = intel_hdmi_patch_ops;