aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_intelhdmi.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-10-30 06:41:44 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-30 06:41:44 -0400
commit7bedb011ef4db93b15049ece8d50b29d6fe6af9d (patch)
treebbec95703a624c97dcada709287e17cb91f3cb96 /sound/pci/hda/patch_intelhdmi.c
parent6797cf2bfcbf2fa1fd05c0b785dc1402f73e2ce5 (diff)
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>
Diffstat (limited to 'sound/pci/hda/patch_intelhdmi.c')
-rw-r--r--sound/pci/hda/patch_intelhdmi.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
index 2dfb1efc2d08..02be428be667 100644
--- a/sound/pci/hda/patch_intelhdmi.c
+++ b/sound/pci/hda/patch_intelhdmi.c
@@ -39,7 +39,6 @@ static hda_nid_t pin_nid; /* HDMI output pin */
39#define INTEL_HDMI_EVENT_TAG 0x08 39#define INTEL_HDMI_EVENT_TAG 0x08
40 40
41struct intel_hdmi_spec { 41struct intel_hdmi_spec {
42 struct hda_multi_out multiout;
43 struct hda_pcm pcm_rec; 42 struct hda_pcm pcm_rec;
44 struct hdmi_eld sink_eld; 43 struct hdmi_eld sink_eld;
45}; 44};
@@ -548,9 +547,7 @@ static int intel_hdmi_playback_pcm_open(struct hda_pcm_stream *hinfo,
548 struct hda_codec *codec, 547 struct hda_codec *codec,
549 struct snd_pcm_substream *substream) 548 struct snd_pcm_substream *substream)
550{ 549{
551 struct intel_hdmi_spec *spec = codec->spec; 550 return 0;
552
553 return snd_hda_multi_out_dig_open(codec, &spec->multiout);
554} 551}
555 552
556static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo, 553static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo,
@@ -561,7 +558,8 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo,
561 558
562 hdmi_stop_infoframe_trans(codec, pin_nid); 559 hdmi_stop_infoframe_trans(codec, pin_nid);
563 560
564 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 561 snd_hda_codec_cleanup_stream(codec, hinfo->nid);
562 return 0;
565} 563}
566 564
567static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, 565static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
@@ -570,15 +568,12 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
570 unsigned int format, 568 unsigned int format,
571 struct snd_pcm_substream *substream) 569 struct snd_pcm_substream *substream)
572{ 570{
573 struct intel_hdmi_spec *spec = codec->spec; 571 hdmi_set_channel_count(codec, cvt_nid,
574 572 substream->runtime->channels);
575 snd_hda_multi_out_dig_prepare(codec, &spec->multiout, stream_tag,
576 format, substream);
577
578 hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels);
579 573
580 hdmi_setup_audio_infoframe(codec, cvt_nid, substream); 574 hdmi_setup_audio_infoframe(codec, cvt_nid, substream);
581 575
576 snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format);
582 return 0; 577 return 0;
583} 578}
584 579
@@ -616,7 +611,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec)
616 struct intel_hdmi_spec *spec = codec->spec; 611 struct intel_hdmi_spec *spec = codec->spec;
617 int err; 612 int err;
618 613
619 err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid); 614 err = snd_hda_create_spdif_out_ctls(codec, cvt_nid);
620 if (err < 0) 615 if (err < 0)
621 return err; 616 return err;
622 617
@@ -657,10 +652,6 @@ static int do_patch_intel_hdmi(struct hda_codec *codec)
657 if (spec == NULL) 652 if (spec == NULL)
658 return -ENOMEM; 653 return -ENOMEM;
659 654
660 spec->multiout.num_dacs = 0; /* no analog */
661 spec->multiout.max_channels = 8;
662 spec->multiout.dig_out_nid = cvt_nid;
663
664 codec->spec = spec; 655 codec->spec = spec;
665 codec->patch_ops = intel_hdmi_patch_ops; 656 codec->patch_ops = intel_hdmi_patch_ops;
666 657