On Saturday 03 September 2011 07:31:19 Mark Brown wrote:
The sequence I'm looking for is:
- pcm_trigger: stop DMA
- DAPM sequence starts
- DAC is turned off on the codec side
- OMAP4 McPDM can be stopped - stop it
- DAPM finishes up
- codec can be turned off
Actually I think this is fine with my suggestion so long as you make the CODEC SYSCLK visible to DAPM and have the machine driver turn it off at some later point in the shutdown process (eg, in shutdown()). That way the data paths will still be torn down by DAPM immediately but SYSCLK will still be generated.
I need to think about this. Not sure how it will affect our system, if we do not have pmdown_time in the future, when we add full ABE support. As a side note: I have found an issue with my earlier proposal (DAPM_SUPPLY attached to the codec's DAC/ADC): I can end up turning off the host side McPDM during audio activity (by muting the outputs/inputs runtime). It has the side effect of not recovering :o (also DMA stops, since the dai is stopped)
I'll get back to you on this soon (probably with a patch).
-- Péter