[alsa-devel] [PATCH v3 2/3] ASoC: soc-dapm: API to attach DAPM_SUPPLY to be used for dai

Péter Ujfalusi peter.ujfalusi at ti.com
Mon Aug 29 10:22:52 CEST 2011


On Friday 26 August 2011 21:05:02 Mark Brown wrote:
> This wasn't really what I meant - what I meant was that we ought to be
> able to change the ordering of DAPM with regard to the stream shutdown
> without having to have anything more than flags in the devices that can
> or need to do it (I'd expect more the CODECs more than the CPUs).

I see, but this is not what I'm trying to achieve here.
Even, if we could re-order the stream shutdown (for DAIs mostly) and DAPM 
sequence it won't work for me:
I need to make sure that the cpu_dai (McPDM) is shut down _after the DAC/ADC, 
and _before_ the codec is powered down - which would stop the McPDM clocks - 
which in turn used by McPDM as functional clock.
So if we would somehow execute the DAPM first followed by the stream shutdown, 
I can be in a situation, when McPDM is not accessible (missing clocks).

If we really want to reorder the stream shutdown and DAPM, we need to quite a 
bit of change, since we need to be able to 'delay' the shutdown operations for 
DAIs/platforms at least. But. Since the stream has been already closed, we can 
not refer to it anymore in case of pmdown_time > 0 (playback only issue).

One way would be to have special DAPM widget for DAI/platform event, and hook 
that up somewhere at some point that it will do what it is intended to be 
doing.
Or some callback function for DAIs/platforms, which would be called from the  
dapm_power_widgets function.

These would work, mostly, but I'm not convinced, that it would work for me, so 
I anyway need to do something similar as in this series.

--
Péter


More information about the Alsa-devel mailing list