On Mon, Jun 03, 2013 at 07:51:20PM +0100, Mark Brown wrote:
I would expect us to be dealing with this as part of quiescing the DMA operations on the links - it's not just the CODEC that needs handling here. This feels like it ought to be more joined up somewhere along the line.
So having grovelled a bit this is of course more annoying than it should be; the trigger operation is in atomic context and there's nowhere convenient to react to it outside of suspend and resume. That said the active flag is only being used for links started and stopped from userspace so this change *ought* to be safe to do what you're doing but it still doesn't seem terribly clever.
Another way of looking at things here is that the DAI widgets are unusual in that they don't require a complete path to power them as widgets generally do (including DACs and ADCs). If we fixed that instead then everything would work just fine. This should just be a case of splitting the playback and capture DAIs into separate widget types and then using the existing DAC and ADC functions. I can't recall why we didn't do that in the first place, it's probably just an oversight...