aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-06-04 17:06:58 +0900
committerMark Brown <broonie@kernel.org>2020-06-15 18:21:22 +0100
commit4f39514f36980a4b20a754a5d51486a5999c8380 (patch)
tree12805c140f28a5fd21edfa8aede6cfc04418b84c /sound/soc/soc-pcm.c
parente2329eeba45fdad5eeb2bec5c61f8cefbee69cb8 (diff)
ASoC: soc-component: add snd_soc_pcm_component_prepare()
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_prepare() to snd_soc_pcm_component_prepare(). This patch do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87o8pzw8yl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index c517064f5391..8ba0f14a2f2f 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -850,7 +850,6 @@ static void codec2codec_close_delayed_work(struct snd_soc_pcm_runtime *rtd)
static int soc_pcm_prepare(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_component *component;
struct snd_soc_dai *dai;
int i, ret = 0;
@@ -860,14 +859,9 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
if (ret < 0)
goto out;
- for_each_rtd_components(rtd, i, component) {
- ret = snd_soc_component_prepare(component, substream);
- if (ret < 0) {
- dev_err(component->dev,
- "ASoC: platform prepare error: %d\n", ret);
- goto out;
- }
- }
+ ret = snd_soc_pcm_component_prepare(substream);
+ if (ret < 0)
+ goto out;
ret = snd_soc_pcm_dai_prepare(substream);
if (ret < 0) {