summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-05 12:28:01 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-05 21:55:49 +0100
commit3fec6b6d5a53d37194735268b9e220f75ca37f19 (patch)
treeedcb23d4d93356bfa2b4158f80978f539ab30bd9 /sound
parent66bb2a7f835a28a9405f3f6571fbf34156e6bc1e (diff)
downloadlinux-stable-3fec6b6d5a53d37194735268b9e220f75ca37f19.tar.gz
linux-stable-3fec6b6d5a53d37194735268b9e220f75ca37f19.tar.bz2
linux-stable-3fec6b6d5a53d37194735268b9e220f75ca37f19.zip
ASoC: set idle_bias_off=1 for all platform DAPM contexts
The ASoC core currently defaults to using STANDBY rather than OFF for idle ASoC platform devices, which causes a permanent pm_runtime_get() on them. This keeps the device active unnecessarily. This can be especially problematic when the ASoC platform device and DAI device are the same device. The distinction between OFF and STANDBY is likely not relevant for ASoC platform drivers, since they aren't analog devices. So, solve this issue by hard-coding idle_bias_off = 1 for all ASoC platform devices. If this turns out to be a problem, this value could be sourced from the snd_soc_platform_driver, similarly to soc_probe_codec(). Note: Prior to this change, this caused a large (10) runtime_active count for the Tegra I2S controller even when not in use, and a leak in that value as streams were started and stopped. This change probably hides a bug. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a4deebc0801a..8d2ebf502df4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1087,6 +1087,8 @@ static int soc_probe_platform(struct snd_soc_card *card,
snd_soc_dapm_new_controls(&platform->dapm,
driver->dapm_widgets, driver->num_dapm_widgets);
+ platform->dapm.idle_bias_off = 1;
+
if (driver->probe) {
ret = driver->probe(platform);
if (ret < 0) {