drm/i915: Pass pipe to LPE audio notification
authorTakashi Iwai <tiwai@suse.de>
Tue, 31 Jan 2017 20:16:51 +0000 (14:16 -0600)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Feb 2017 15:22:10 +0000 (16:22 +0100)
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_audio.c
drivers/gpu/drm/i915/intel_lpe_audio.c
include/drm/intel_lpe_audio.h

index 836d823d476bc85c26662069e4e409005abbdd32..27311a337e2b94bb0015fa8bf4306fed227d4c44 100644 (file)
@@ -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 */
index d4e6d1136cfe97de93cea43e818153ef6fb84583..892169b7952b09647757e4116b890de72810989d 100644 (file)
@@ -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);
 }
 
 /**
index 5da14f40f94a32166914efa7957f3de4431fa50f..68ebf383043377cc7b8b4f1210e5440fe4dc124d 100644 (file)
@@ -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;
@@ -353,6 +353,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;
index 857e0eafed79136a127cd3840102e72136842be2..410128e4cd708fe078a1e5a86605e4e331d5ee5f 100644 (file)
@@ -31,6 +31,7 @@
 
 struct intel_hdmi_lpe_audio_eld {
        int port_id;
+       int pipe_id;
        unsigned char eld_data[HDMI_MAX_ELD_BYTES];
 };