Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: hdmi-codec: pass data to get_dai_id too

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>

+15 -8
+2 -1
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
··· 204 204 } 205 205 206 206 static int adv7511_hdmi_i2s_get_dai_id(struct snd_soc_component *component, 207 - struct device_node *endpoint) 207 + struct device_node *endpoint, 208 + void *data) 208 209 { 209 210 struct of_endpoint of_ep; 210 211 int ret;
+2 -1
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 1952 1952 } 1953 1953 1954 1954 static int anx7625_hdmi_i2s_get_dai_id(struct snd_soc_component *component, 1955 - struct device_node *endpoint) 1955 + struct device_node *endpoint, 1956 + void *data) 1956 1957 { 1957 1958 struct of_endpoint of_ep; 1958 1959 int ret;
+2 -1
drivers/gpu/drm/bridge/lontium-lt9611.c
··· 1047 1047 } 1048 1048 1049 1049 static int lt9611_hdmi_i2s_get_dai_id(struct snd_soc_component *component, 1050 - struct device_node *endpoint) 1050 + struct device_node *endpoint, 1051 + void *data) 1051 1052 { 1052 1053 struct of_endpoint of_ep; 1053 1054 int ret;
+2 -1
drivers/gpu/drm/bridge/lontium-lt9611uxc.c
··· 522 522 } 523 523 524 524 static int lt9611uxc_hdmi_i2s_get_dai_id(struct snd_soc_component *component, 525 - struct device_node *endpoint) 525 + struct device_node *endpoint, 526 + void *data) 526 527 { 527 528 struct of_endpoint of_ep; 528 529 int ret;
+2 -1
drivers/gpu/drm/bridge/sii902x.c
··· 815 815 } 816 816 817 817 static int sii902x_audio_get_dai_id(struct snd_soc_component *component, 818 - struct device_node *endpoint) 818 + struct device_node *endpoint, 819 + void *data) 819 820 { 820 821 struct of_endpoint of_ep; 821 822 int ret;
+2 -1
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
··· 148 148 } 149 149 150 150 static int dw_hdmi_i2s_get_dai_id(struct snd_soc_component *component, 151 - struct device_node *endpoint) 151 + struct device_node *endpoint, 152 + void *data) 152 153 { 153 154 struct of_endpoint of_ep; 154 155 int ret;
+2 -1
include/sound/hdmi-codec.h
··· 105 105 * Optional 106 106 */ 107 107 int (*get_dai_id)(struct snd_soc_component *comment, 108 - struct device_node *endpoint); 108 + struct device_node *endpoint, 109 + void *data); 109 110 110 111 /* 111 112 * Hook callback function to handle connector plug event.
+1 -1
sound/soc/codecs/hdmi-codec.c
··· 995 995 int ret = -ENOTSUPP; /* see snd_soc_get_dai_id() */ 996 996 997 997 if (hcp->hcd.ops->get_dai_id) 998 - ret = hcp->hcd.ops->get_dai_id(component, endpoint); 998 + ret = hcp->hcd.ops->get_dai_id(component, endpoint, hcp->hcd.data); 999 999 1000 1000 return ret; 1001 1001 }