summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-06-04 17:07:40 +0900
committerMark Brown <broonie@kernel.org>2020-06-15 18:21:24 +0100
commit32fd120475c1b8a83d28bfedc2b95ec981fbb809 (patch)
tree7ae89d71bbc62ab4fcb03c91cf9c321fd5016217 /sound/soc/soc-pcm.c
parent047511198639649bdaacb1a34d9691429ccc5698 (diff)
downloadlinux-32fd120475c1b8a83d28bfedc2b95ec981fbb809.tar.bz2
ASoC: soc-component: add snd_soc_pcm_component_trigger()
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_trigger() to snd_soc_pcm_component_trigger(). 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/87k10nw8xf.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.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index cbce15c5721e..be5c83f1ab0c 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1074,38 +1074,30 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
static int soc_pcm_trigger_start(struct snd_pcm_substream *substream, int cmd)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_component *component;
- int i, ret;
+ int ret;
ret = snd_soc_link_trigger(substream, cmd);
if (ret < 0)
return ret;
- for_each_rtd_components(rtd, i, component) {
- ret = snd_soc_component_trigger(component, substream, cmd);
- if (ret < 0)
- return ret;
- }
+ ret = snd_soc_pcm_component_trigger(substream, cmd);
+ if (ret < 0)
+ return ret;
return snd_soc_pcm_dai_trigger(substream, cmd);
}
static int soc_pcm_trigger_stop(struct snd_pcm_substream *substream, int cmd)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_component *component;
- int i, ret;
+ int ret;
ret = snd_soc_pcm_dai_trigger(substream, cmd);
if (ret < 0)
return ret;
- for_each_rtd_components(rtd, i, component) {
- ret = snd_soc_component_trigger(component, substream, cmd);
- if (ret < 0)
- return ret;
- }
+ ret = snd_soc_pcm_component_trigger(substream, cmd);
+ if (ret < 0)
+ return ret;
ret = snd_soc_link_trigger(substream, cmd);
if (ret < 0)