On 12/05/2011 01:39 PM, Mark Brown wrote:
This increases the amount of time we are sitting with the pcm_mutex held and I can't see a reason why we should need to do that. If there is a problem here I'd rather improve the drivers so that they can cope with having the power management happening after the lock, the main reason the drivers were doing this previously is that the lock happened to be held by the caller.
It is just that the pm_runtime calls might need the same protection as the other operations for dais/codecs/driver. I just thought about this series, and it might broke the omap-mcpdm driver as soon as we have the BIAS_OFF support for the twl6040 codec driver. The functional clock is coming from the external codec. If we power down the external fclk we will see external abort crash, since the McPDM IP does not have the needed clocks at the time of the pm_runtime_put_sync call (which will try to configure some McPDM registers). Need to check this. Can we hold this series back for a while?