All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Wu Fengguang <fengguang.wu@intel.com>
Subject: [PATCH 05/11] hda - remove intelhdmi dependency on multiout
Date: Thu, 15 Oct 2009 15:03:53 +0800	[thread overview]
Message-ID: <20091015070918.431446053@intel.com> (raw)
In-Reply-To: 20091015070348.390451250@intel.com

[-- Attachment #1: hdmi-remove-multiout.patch --]
[-- Type: text/plain, Size: 2487 bytes --]

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>
---
 sound/pci/hda/patch_intelhdmi.c |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

--- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c	2009-10-15 12:31:57.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_intelhdmi.c	2009-10-15 12:33:18.000000000 +0800
@@ -39,7 +39,6 @@ static hda_nid_t pin_nid;	/* HDMI output
 #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 @@ static int intel_hdmi_playback_pcm_open(
 					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 @@ static int intel_hdmi_playback_pcm_close
 
 	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 @@ static int intel_hdmi_playback_pcm_prepa
 					   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 @@ static int intel_hdmi_build_controls(str
 	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 @@ static int do_patch_intel_hdmi(struct hd
 	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;

  parent reply	other threads:[~2009-10-15  7:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15  7:03 [PATCH 00/11] Intel IbexPeak HDMI codec support Wu Fengguang
2009-10-15  7:03 ` [PATCH 01/11] hda - select IbexPeak handler for Calpella Wu Fengguang
2009-10-15  7:03 ` [PATCH 02/11] hda - vectorize get_empty_pcm_device() Wu Fengguang
2009-10-15  7:03 ` [PATCH 03/11] hda - allow up to 4 HDMI devices Wu Fengguang
2009-10-15  7:03 ` [PATCH 04/11] hda - convert intelhdmi global references to local parameters Wu Fengguang
2009-10-15  7:03 ` Wu Fengguang [this message]
2009-10-15  7:03 ` [PATCH 06/11] hda - use pcm prepare/cleanup callbacks for intelhdmi Wu Fengguang
2009-10-15  7:03 ` [PATCH 07/11] hda - reorder intelhdmi prepare/cleanup callbacks Wu Fengguang
2009-10-15  7:03 ` [PATCH 08/11] hda - vectorize intelhdmi Wu Fengguang
2009-10-15  7:03 ` [PATCH 09/11] hda - get intelhdmi max channels from widget caps Wu Fengguang
2009-10-15  7:03 ` [PATCH 10/11] hda - auto parse intelhdmi cvt/pin configurations Wu Fengguang
2009-10-15  7:03 ` [PATCH 11/11] hda - remove static intelhdmi configurations Wu Fengguang
2009-10-30 10:47 ` [PATCH 00/11] Intel IbexPeak HDMI codec support Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091015070918.431446053@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.