* [PATCH] ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec
@ 2012-08-07 7:24 Peter Ujfalusi
2012-08-07 14:10 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2012-08-07 7:24 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Stephen Warren
The idle_bias_off flag is not configured for DAIs not mapped with a codec.
This causes the pm counter to be increased at probe time for the CPU dai
which unbalances the pm counter handling.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hello Mark,
I'm not sure if this is the correct way to fix the problem but this patch works
for me.
The issue in short:
Since commit: '18d7564 ASoC: when removing a CPU DAI, clean up its DAPM context'
After booting up the kernel on BeagleBoard for example I see that the clocks are
enabled for the McBSP CPU dai. This alone causing the first stream start to fail
due to unbalanced pm_runtime counter. Later it stabilizes, but I see failures
with full duplex operation (arecord | aplay).
The root cause of this is not commit 18d7564, but the fact that we did not
configured the dapm->idle_bias_off for the CPU dai to be 1 (we do this for the
platform driver). The pm_runtime_get_sync is called from
dapm_pre_sequence_async() - since we add the cpu_dai dapm context to the list.
With this patch we set the dapm->idle_bias_off for DAIs not linked with a codec
which means cpu_dais.
If this is not acceptable we need to set this flag in the cpu_dai driver itself.
Regards,
Peter
sound/soc/soc-core.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f81c597..f10f00b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3715,6 +3715,9 @@ int snd_soc_register_dai(struct device *dev,
}
}
+ if (!dai->codec)
+ dai->dapm.idle_bias_off = 1;
+
list_add(&dai->list, &dai_list);
mutex_unlock(&client_mutex);
@@ -3803,6 +3806,9 @@ int snd_soc_register_dais(struct device *dev,
}
}
+ if (!dai->codec)
+ dai->dapm.idle_bias_off = 1;
+
list_add(&dai->list, &dai_list);
mutex_unlock(&client_mutex);
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec
2012-08-07 7:24 [PATCH] ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec Peter Ujfalusi
@ 2012-08-07 14:10 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-08-07 14:10 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, Stephen Warren, Liam Girdwood
On Tue, Aug 07, 2012 at 10:24:13AM +0300, Peter Ujfalusi wrote:
> The idle_bias_off flag is not configured for DAIs not mapped with a codec.
> This causes the pm counter to be increased at probe time for the CPU dai
> which unbalances the pm counter handling.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-07 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-07 7:24 [PATCH] ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec Peter Ujfalusi
2012-08-07 14:10 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).