ASoC: ux500: mop500: consider CPU-Platform possibility
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 28 Jun 2019 01:49:40 +0000 (10:49 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 28 Jun 2019 14:19:55 +0000 (15:19 +0100)
commit 9ae6cdb184b6 ("ASoC: ux500: mop500: don't select unnecessary
Platform")

Current ALSA SoC avoid to add duplicate component to rtd,
and this driver was selecting CPU component as Platform component.
Thus, above patch removed Platform settings from this driver,
because it assumed these are same component.

But, some CPU driver is using generic DMAEngine, in such case, both
CPU component and Platform component will have same of_node/name.
In other words, there are some components which are different but
have same of_node/name.

In such case, Card driver definitely need to select Platform even
though it is same as CPU.
It is depends on CPU driver, but is difficult to know it from Card driver.
This patch reverts above patch.

Fixes: commit 9ae6cdb184b6 ("ASoC: ux500: mop500: don't select unnecessary Platform")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ux500/mop500.c

index 6f66d395e24e27ed89c9c146b646a378d3dc8257..2873e8e6f02beb4300d5b970aa046b416bb71c14 100644 (file)
 /* Define the whole MOP500 soundcard, linking platform to the codec-drivers  */
 SND_SOC_DAILINK_DEFS(link1,
        DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.1")),
-       DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")));
+       DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")),
+       DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.1")));
 
 SND_SOC_DAILINK_DEFS(link2,
        DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.3")),
-       DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")));
+       DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")),
+       DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.3")));
 
 static struct snd_soc_dai_link mop500_dai_links[] = {
        {
@@ -86,6 +88,8 @@ static int mop500_of_probe(struct platform_device *pdev,
        for (i = 0; i < 2; i++) {
                mop500_dai_links[i].cpus->of_node = msp_np[i];
                mop500_dai_links[i].cpus->dai_name = NULL;
+               mop500_dai_links[i].platforms->of_node = msp_np[i];
+               mop500_dai_links[i].platforms->name = NULL;
                mop500_dai_links[i].codecs->of_node = codec_np;
                mop500_dai_links[i].codecs->name = NULL;
        }