summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 380f6459b5cb..150b02be0219 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -275,18 +275,6 @@ int snd_soc_component_close(struct snd_soc_component *component,
return soc_component_ret(component, ret);
}
-int snd_soc_component_trigger(struct snd_soc_component *component,
- struct snd_pcm_substream *substream,
- int cmd)
-{
- int ret = 0;
-
- if (component->driver->trigger)
- ret = component->driver->trigger(component, substream, cmd);
-
- return soc_component_ret(component, ret);
-}
-
void snd_soc_component_suspend(struct snd_soc_component *component)
{
if (component->driver->suspend)
@@ -593,3 +581,21 @@ void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream,
}
}
}
+
+int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream,
+ int cmd)
+{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_component *component;
+ int i, ret;
+
+ for_each_rtd_components(rtd, i, component) {
+ if (component->driver->trigger) {
+ ret = component->driver->trigger(component, substream, cmd);
+ if (ret < 0)
+ return soc_component_ret(component, ret);
+ }
+ }
+
+ return 0;
+}