All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org
Cc: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	rakesh.a.ughreja@intel.com,
	"Jerome Anand" <jerome.anand@intel.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH 4/7] drm/i915: Pass pipe to LPE audio notification
Date: Tue, 31 Jan 2017 22:36:46 +0100	[thread overview]
Message-ID: <20170131213649.13689-5-tiwai@suse.de> (raw)
In-Reply-To: <20170131213649.13689-1-tiwai@suse.de>

The LPE audio configuration depends on the pipe, thus we need to pass
the currently used pipe.  It's now embedded in struct
intel_hdmi_lpe_audio_eld as well as port id.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/i915/i915_drv.h        | 2 +-
 drivers/gpu/drm/i915/intel_audio.c     | 6 +++---
 drivers/gpu/drm/i915/intel_lpe_audio.c | 3 ++-
 include/drm/intel_lpe_audio.h          | 1 +
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 836d823d476b..27311a337e2b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3401,7 +3401,7 @@ int  intel_lpe_audio_init(struct drm_i915_private *dev_priv);
 void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv);
 void intel_lpe_audio_irq_handler(struct drm_i915_private *dev_priv);
 void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
-			    void *eld, int port, int tmds_clk_speed,
+			    void *eld, int port, int pipe, int tmds_clk_speed,
 			    bool dp_output, int link_rate);
 
 /* intel_i2c.c */
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index d4e6d1136cfe..892169b7952b 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -634,12 +634,12 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder,
 
 	switch (intel_encoder->type) {
 	case INTEL_OUTPUT_HDMI:
-		intel_lpe_audio_notify(dev_priv, connector->eld, port,
+		intel_lpe_audio_notify(dev_priv, connector->eld, port, pipe,
 				       crtc_state->port_clock,
 				       false, 0);
 		break;
 	case INTEL_OUTPUT_DP:
-		intel_lpe_audio_notify(dev_priv, connector->eld, port,
+		intel_lpe_audio_notify(dev_priv, connector->eld, port, pipe,
 				       adjusted_mode->crtc_clock,
 				       true, crtc_state->port_clock);
 		break;
@@ -680,7 +680,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder)
 						 (int) port, (int) pipe);
 	}
 
-	intel_lpe_audio_notify(dev_priv, NULL, port, 0, false, 0);
+	intel_lpe_audio_notify(dev_priv, NULL, port, pipe, 0, false, 0);
 }
 
 /**
diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c
index f95624a46f27..2ca3c775c6b1 100644
--- a/drivers/gpu/drm/i915/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/intel_lpe_audio.c
@@ -332,7 +332,7 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv)
  * Notify lpe audio driver of eld change.
  */
 void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
-			    void *eld, int port, int tmds_clk_speed,
+			    void *eld, int port, int pipe, int tmds_clk_speed,
 			    bool dp_output, int link_rate)
 {
 	unsigned long irq_flags;
@@ -360,6 +360,7 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
 		memcpy(pdata->eld.eld_data, eld,
 			HDMI_MAX_ELD_BYTES);
 		pdata->eld.port_id = port;
+		pdata->eld.pipe_id = pipe;
 		pdata->hdmi_connected = true;
 
 		pdata->dp_output = dp_output;
diff --git a/include/drm/intel_lpe_audio.h b/include/drm/intel_lpe_audio.h
index 857e0eafed79..410128e4cd70 100644
--- a/include/drm/intel_lpe_audio.h
+++ b/include/drm/intel_lpe_audio.h
@@ -31,6 +31,7 @@
 
 struct intel_hdmi_lpe_audio_eld {
 	int port_id;
+	int pipe_id;
 	unsigned char eld_data[HDMI_MAX_ELD_BYTES];
 };
 
-- 
2.11.0

  parent reply	other threads:[~2017-01-31 21:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 21:36 [PATCH 0/7] DisplayPort audio support on Cherrytrail Takashi Iwai
2017-01-31 21:36 ` [PATCH 1/7] drm/i915: add DP support in LPE audio mode Takashi Iwai
2017-01-31 21:36 ` [PATCH 2/7] drm/i915: add DisplayPort amp unmute for " Takashi Iwai
2017-02-01 14:45   ` Ville Syrjälä
2017-02-01 14:53     ` Takashi Iwai
2017-02-01 15:11       ` Ville Syrjälä
2017-02-01 15:24         ` Takashi Iwai
2017-02-02  9:57   ` Takashi Iwai
2017-02-02 10:06     ` Ville Syrjälä
2017-02-02 10:13       ` Takashi Iwai
2017-01-31 21:36 ` [PATCH 3/7] drm/i915: Avoid MST pipe handling for LPE audio Takashi Iwai
2017-01-31 21:36 ` Takashi Iwai [this message]
2017-01-31 21:36 ` [PATCH 5/7] ALSA: x86: intel_hdmi: add definitions and logic for DP audio Takashi Iwai
2017-01-31 21:36 ` [PATCH 6/7] ALSA: x86: Use config base depending on the pipe Takashi Iwai
2017-01-31 21:36 ` [PATCH 7/7] drm/i915: Pass platform device to LPE audio notifier Takashi Iwai
2017-01-31 22:24 ` ✓ Fi.CI.BAT: success for DisplayPort audio support on Cherrytrail Patchwork
2017-03-13  8:33 ` [PATCH 0/7] " Daniel Vetter
2017-03-31  6:29   ` Daniel Vetter
2017-03-31  6:40     ` 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=20170131213649.13689-5-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jerome.anand@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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.