Commit f95e29b9 authored by Takashi Iwai's avatar Takashi Iwai

drm/i915: Pass pipe to LPE audio notification

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.
Acked-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9c9191f3
...@@ -3401,7 +3401,7 @@ int intel_lpe_audio_init(struct drm_i915_private *dev_priv); ...@@ -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_teardown(struct drm_i915_private *dev_priv);
void intel_lpe_audio_irq_handler(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 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); bool dp_output, int link_rate);
/* intel_i2c.c */ /* intel_i2c.c */
......
...@@ -634,12 +634,12 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder, ...@@ -634,12 +634,12 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder,
switch (intel_encoder->type) { switch (intel_encoder->type) {
case INTEL_OUTPUT_HDMI: 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, crtc_state->port_clock,
false, 0); false, 0);
break; break;
case INTEL_OUTPUT_DP: 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, adjusted_mode->crtc_clock,
true, crtc_state->port_clock); true, crtc_state->port_clock);
break; break;
...@@ -680,7 +680,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) ...@@ -680,7 +680,7 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder)
(int) port, (int) pipe); (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);
} }
/** /**
......
...@@ -332,7 +332,7 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv) ...@@ -332,7 +332,7 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv)
* Notify lpe audio driver of eld change. * Notify lpe audio driver of eld change.
*/ */
void intel_lpe_audio_notify(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) bool dp_output, int link_rate)
{ {
unsigned long irq_flags; unsigned long irq_flags;
...@@ -353,6 +353,7 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv, ...@@ -353,6 +353,7 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv,
memcpy(pdata->eld.eld_data, eld, memcpy(pdata->eld.eld_data, eld,
HDMI_MAX_ELD_BYTES); HDMI_MAX_ELD_BYTES);
pdata->eld.port_id = port; pdata->eld.port_id = port;
pdata->eld.pipe_id = pipe;
pdata->hdmi_connected = true; pdata->hdmi_connected = true;
pdata->dp_output = dp_output; pdata->dp_output = dp_output;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
struct intel_hdmi_lpe_audio_eld { struct intel_hdmi_lpe_audio_eld {
int port_id; int port_id;
int pipe_id;
unsigned char eld_data[HDMI_MAX_ELD_BYTES]; unsigned char eld_data[HDMI_MAX_ELD_BYTES];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment