summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-06-27 21:48:58 -0400
committerMark Brown <broonie@kernel.org>2019-06-28 10:18:06 -0400
commitbe2428f3219c4eb32655a3e0db3f28d46e9d7986 (patch)
tree87cb61bfba702a6499888aa695d24903ae9db948
parent1dd2e91b08d52eced666e1c1343960ac6374c6a7 (diff)
ASoC: tegra: tegra_sgtl5000: consider CPU-Platform possibility
commit cee1cf3f9f9e ("ASoC: tegra: tegra_sgtl5000: 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 cee1cf3f9f9e ("ASoC: tegra: tegra_sgtl5000: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/tegra/tegra_sgtl5000.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
index 07504a2a7afc..e13b81d29cf3 100644
--- a/sound/soc/tegra/tegra_sgtl5000.c
+++ b/sound/soc/tegra/tegra_sgtl5000.c
@@ -83,7 +83,8 @@ static const struct snd_soc_dapm_widget tegra_sgtl5000_dapm_widgets[] = {
83 83
84SND_SOC_DAILINK_DEFS(hifi, 84SND_SOC_DAILINK_DEFS(hifi,
85 DAILINK_COMP_ARRAY(COMP_EMPTY()), 85 DAILINK_COMP_ARRAY(COMP_EMPTY()),
86 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000"))); 86 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")),
87 DAILINK_COMP_ARRAY(COMP_EMPTY()));
87 88
88static struct snd_soc_dai_link tegra_sgtl5000_dai = { 89static struct snd_soc_dai_link tegra_sgtl5000_dai = {
89 .name = "sgtl5000", 90 .name = "sgtl5000",
@@ -145,6 +146,8 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
145 goto err_put_codec_of_node; 146 goto err_put_codec_of_node;
146 } 147 }
147 148
149 tegra_sgtl5000_dai.platforms->of_node = tegra_sgtl5000_dai.cpus->of_node;
150
148 ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); 151 ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
149 if (ret) 152 if (ret)
150 goto err_put_cpu_of_node; 153 goto err_put_cpu_of_node;
@@ -163,6 +166,7 @@ err_fini_utils:
163err_put_cpu_of_node: 166err_put_cpu_of_node:
164 of_node_put(tegra_sgtl5000_dai.cpus->of_node); 167 of_node_put(tegra_sgtl5000_dai.cpus->of_node);
165 tegra_sgtl5000_dai.cpus->of_node = NULL; 168 tegra_sgtl5000_dai.cpus->of_node = NULL;
169 tegra_sgtl5000_dai.platforms->of_node = NULL;
166err_put_codec_of_node: 170err_put_codec_of_node:
167 of_node_put(tegra_sgtl5000_dai.codecs->of_node); 171 of_node_put(tegra_sgtl5000_dai.codecs->of_node);
168 tegra_sgtl5000_dai.codecs->of_node = NULL; 172 tegra_sgtl5000_dai.codecs->of_node = NULL;
@@ -182,6 +186,7 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev)
182 186
183 of_node_put(tegra_sgtl5000_dai.cpus->of_node); 187 of_node_put(tegra_sgtl5000_dai.cpus->of_node);
184 tegra_sgtl5000_dai.cpus->of_node = NULL; 188 tegra_sgtl5000_dai.cpus->of_node = NULL;
189 tegra_sgtl5000_dai.platforms->of_node = NULL;
185 of_node_put(tegra_sgtl5000_dai.codecs->of_node); 190 of_node_put(tegra_sgtl5000_dai.codecs->of_node);
186 tegra_sgtl5000_dai.codecs->of_node = NULL; 191 tegra_sgtl5000_dai.codecs->of_node = NULL;
187 192