ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec
PATCH 1/1 ASoC: core: Set dapm->idle_bias_off for DAIs not mapped with a codec
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.
---
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(-)
sound/soc/soc-core.c +6 -0
@@ -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);
Signature · 1 line
1.7.8.6
Mark Brown
AppliedQuoted 3 lines · Peter Ujfalusi
The
idle_bias_offflag 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.