[alsa-devel] DAPM widget power off
Gabriel M. Beddingfield
gabrbedd at gmail.com
Sat Apr 20 19:19:15 CEST 2013
On 04/18/2013 12:02 AM, yuvaraj r wrote:
> Hi All,
> I have two different dais
> 1. Hifi Multimedia
> 2. Voice call dai
> Before opening voice call dai. I closed Hifi stream. After 5 sec Voice call
> stream dapm widget got powered off automatically. I am assuming that
> stream close event of Multimedia causing problem.
> What will issue in my cause.
The value of snd_soc_card::pmdown_time and
snd_soc_pcm_runtime::pmdown_time are initialized to 5000 (i.e. 5 secs)
by default. That means that after you close a stream, the kernel waits
5 seconds and then powers everything down.
There's a few reasons why this can happen:
1. Your DAPM routing doesn't adequately cover the Voice call case.
Something that is needed for both Voice and Multimedia isn't
properly associated with the Voice routing... so DAPM shuts
it down because it's not "in use."
2. Some of your power-down code is making a poor assumption. I.e.
you're making some decisions outside of DAPM about when a
component should be powered down, and it's the wrong decision.
3. I've seen a bug in older kernels (e.g. <= 3.1) where the DAPM
logic will accidentally shut down a capture stream while powering
down a playback stream. (E.g. see
A quick work-around is to set pmdown_time = 0. However, there will
still be a race condition... so don't consider it "fixed." (Though, I'm
pretty sure I've seen a device ship with this "fix." :-))
More information about the Alsa-devel