summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-05 19:36:11 +0100
committerMark Brown <broonie@linaro.org>2013-06-07 15:54:50 +0100
commit4616274d3382fa7698536d61b351e63cf0ce27f0 (patch)
tree8e95ffc206ad5f33eacfd19539e4ba0b16b48f25 /sound/soc/soc-pcm.c
parent056790923e1c4eed5d8cc502e1092944a2b23025 (diff)
downloadop-kernel-dev-4616274d3382fa7698536d61b351e63cf0ce27f0.zip
op-kernel-dev-4616274d3382fa7698536d61b351e63cf0ce27f0.tar.gz
ASoC: dapm: Treat DAI widgets like AIF widgets for power
Even though they are virtual widgets DAI widgets still get counted for the DAPM context power management so we can't just use the active state to check if they should be powered as they may not be part of a complete path. Instead split them into input and output widgets and do the same power checks as we perform on AIFs. Reported-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index a9fddf0..ccb6be4 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -928,8 +928,13 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
/* Create any new FE <--> BE connections */
for (i = 0; i < list->num_widgets; i++) {
- if (list->widgets[i]->id != snd_soc_dapm_dai)
+ switch (list->widgets[i]->id) {
+ case snd_soc_dapm_dai_in:
+ case snd_soc_dapm_dai_out:
+ break;
+ default:
continue;
+ }
/* is there a valid BE rtd for this widget */
be = dpcm_get_be(card, list->widgets[i], stream);
OpenPOWER on IntegriCloud