ASoC: rsnd: use DAI driver ID instead of DAI ID
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 24 Jul 2023 00:21:22 +0000 (00:21 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jul 2023 11:44:47 +0000 (12:44 +0100)
Current rsnd is using DAI ID to get own priv data without setting
driver->id. It was no problem for Single Component, but will be problem
in case of Multi Component, because it is not a DAI serial number.

struct snd_soc_dai *snd_soc_register_dai(...)
{
...
if (dai_drv->id)
dai->id = dai_drv->id;
else
dai->id = component->num_dai;
...
}

This patch sets driver->id, and get serial number.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wmyqb1mm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c

index 6a522e6dd85ab27c2e90faa091fd8bf6a1ada274..f3f17b78402550a72df1d758e4188adf75c5a2a2 100644 (file)
@@ -1378,6 +1378,7 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv,
        drv->name       = rdai->name;
        drv->ops        = &rsnd_soc_dai_ops;
        drv->pcm_new    = rsnd_pcm_new;
+       drv->id         = dai_i;
 
        io_playback->rdai               = rdai;
        io_capture->rdai                = rdai;