ASoC: hdmi-codec: pass data to get_dai_id too
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 24 Dec 2024 01:47:53 +0000 (03:47 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 4 Jan 2025 06:47:10 +0000 (08:47 +0200)
The upcoming DRM connector HDMI codec implementation is going to use
codec-specific data in the .get_dai_id to get drm_connector. Pass data
to the callback, as it is done with other hdmi_codec_ops callbacks.

Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-1-dc89577cd438@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
drivers/gpu/drm/bridge/analogix/anx7625.c
drivers/gpu/drm/bridge/lontium-lt9611.c
drivers/gpu/drm/bridge/lontium-lt9611uxc.c
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
include/sound/hdmi-codec.h
sound/soc/codecs/hdmi-codec.c

index 61f4a38e7d2bf6905683cbc9e762b28ecc999d05..51fb9a574b4e28450b2598a92e2930ace5128b71 100644 (file)
@@ -204,7 +204,8 @@ static void audio_shutdown(struct device *dev, void *data)
 }
 
 static int adv7511_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
-                                       struct device_node *endpoint)
+                                       struct device_node *endpoint,
+                                       void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index 6c409f4f17788d92bf2044238ca3b9aff09c6de9..4be34d5c7a3b8295f6b4593b3734ec8131bb3a4a 100644 (file)
@@ -1952,7 +1952,8 @@ static void anx7625_audio_shutdown(struct device *dev, void *data)
 }
 
 static int anx7625_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
-                                      struct device_node *endpoint)
+                                      struct device_node *endpoint,
+                                      void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index f7fa4e763b5929b785e971224402ba162bc2094e..7241b5a1d98529d025a3e25f2c0af5d5027a60d7 100644 (file)
@@ -1047,7 +1047,8 @@ static void lt9611_audio_shutdown(struct device *dev, void *data)
 }
 
 static int lt9611_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
-                                     struct device_node *endpoint)
+                                     struct device_node *endpoint,
+                                     void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index db9a5466060b663e88d58e85f24bf2d58d74a81c..f4c3ff1fdc6923eb7a8c0d8f7f92e7649c797d77 100644 (file)
@@ -522,7 +522,8 @@ static void lt9611uxc_audio_shutdown(struct device *dev, void *data)
 }
 
 static int lt9611uxc_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
-                                        struct device_node *endpoint)
+                                        struct device_node *endpoint,
+                                        void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index fc3554d1ebe224ccdffd2eae651a106fe29ca7f8..2b90b22bf7d61e11e8381a25f5b1da8547db6323 100644 (file)
@@ -815,7 +815,8 @@ static int sii902x_audio_get_eld(struct device *dev, void *data,
 }
 
 static int sii902x_audio_get_dai_id(struct snd_soc_component *component,
-                                   struct device_node *endpoint)
+                                   struct device_node *endpoint,
+                                   void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index f1c5a8d0fa90e2eb2ee488b6a5871b005f797ea1..2c903c9fe8052ab721445188fd2b75270a55f2b0 100644 (file)
@@ -148,7 +148,8 @@ static int dw_hdmi_i2s_get_eld(struct device *dev, void *data, uint8_t *buf,
 }
 
 static int dw_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
-                                 struct device_node *endpoint)
+                                 struct device_node *endpoint,
+                                 void *data)
 {
        struct of_endpoint of_ep;
        int ret;
index 5e1a9eafd10f5d4f831abbb6f4c0fff661909584..b3407b47b4a7878532ecf3b08eeecd443d6fdb07 100644 (file)
@@ -105,7 +105,8 @@ struct hdmi_codec_ops {
         * Optional
         */
        int (*get_dai_id)(struct snd_soc_component *comment,
-                         struct device_node *endpoint);
+                         struct device_node *endpoint,
+                         void *data);
 
        /*
         * Hook callback function to handle connector plug event.
index d9df29a26f4f213a30a2ebcdb63a593f9cf4b901..f536ca60e162dca6b50b37854ca6de2c114bc2a1 100644 (file)
@@ -995,7 +995,7 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
        int ret = -ENOTSUPP; /* see snd_soc_get_dai_id() */
 
        if (hcp->hcd.ops->get_dai_id)
-               ret = hcp->hcd.ops->get_dai_id(component, endpoint);
+               ret = hcp->hcd.ops->get_dai_id(component, endpoint, hcp->hcd.data);
 
        return ret;
 }