Skip to content

Commit 6af45d7

Browse files
committed
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 <[email protected]> Tested-by: Dave Stevenson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent fee7aae commit 6af45d7

File tree

8 files changed

+15
-8
lines changed

8 files changed

+15
-8
lines changed

drivers/gpu/drm/bridge/adv7511/adv7511_audio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ static void audio_shutdown(struct device *dev, void *data)
204204
}
205205

206206
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)
208209
{
209210
struct of_endpoint of_ep;
210211
int ret;

drivers/gpu/drm/bridge/analogix/anx7625.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,8 @@ static void anx7625_audio_shutdown(struct device *dev, void *data)
19521952
}
19531953

19541954
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)
19561957
{
19571958
struct of_endpoint of_ep;
19581959
int ret;

drivers/gpu/drm/bridge/lontium-lt9611.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,8 @@ static void lt9611_audio_shutdown(struct device *dev, void *data)
10471047
}
10481048

10491049
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)
10511052
{
10521053
struct of_endpoint of_ep;
10531054
int ret;

drivers/gpu/drm/bridge/lontium-lt9611uxc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ static void lt9611uxc_audio_shutdown(struct device *dev, void *data)
522522
}
523523

524524
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)
526527
{
527528
struct of_endpoint of_ep;
528529
int ret;

drivers/gpu/drm/bridge/sii902x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@ static int sii902x_audio_get_eld(struct device *dev, void *data,
815815
}
816816

817817
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)
819820
{
820821
struct of_endpoint of_ep;
821822
int ret;

drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ static int dw_hdmi_i2s_get_eld(struct device *dev, void *data, uint8_t *buf,
148148
}
149149

150150
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)
152153
{
153154
struct of_endpoint of_ep;
154155
int ret;

include/sound/hdmi-codec.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ struct hdmi_codec_ops {
105105
* Optional
106106
*/
107107
int (*get_dai_id)(struct snd_soc_component *comment,
108-
struct device_node *endpoint);
108+
struct device_node *endpoint,
109+
void *data);
109110

110111
/*
111112
* Hook callback function to handle connector plug event.

sound/soc/codecs/hdmi-codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
995995
int ret = -ENOTSUPP; /* see snd_soc_get_dai_id() */
996996

997997
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);
999999

10001000
return ret;
10011001
}

0 commit comments

Comments
 (0)