From f7cdb2cfcaa788d7b2efbc478adde0c5346ff93f Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Thu, 21 Sep 2023 19:31:59 +0800 Subject: [PATCH] ASoC: rockchip: i2s-tdm: Use add_component_controls This patch use add_component_controls instead of dai's one to support multiple instance with name_prefix. Signed-off-by: Sugar Zhang Change-Id: I5aed3ba8e071544154f39b92c1180bbda0afe767 --- sound/soc/rockchip/rockchip_i2s_tdm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index f9f4c0fc6176..50784bb149dc 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -1959,7 +1959,9 @@ static int rockchip_i2s_tdm_dai_probe(struct snd_soc_dai *dai) dai->playback_dma_data = &i2s_tdm->playback_dma_data; if (i2s_tdm->mclk_calibrate) - snd_soc_add_dai_controls(dai, &rockchip_i2s_tdm_compensation_control, 1); + snd_soc_add_component_controls(dai->component, + &rockchip_i2s_tdm_compensation_control, + 1); return 0; }