[alsa-devel] : Question cpu_dai->active & codec_dai->active
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri Mar 11 16:31:00 CET 2011
On Fri, Mar 04, 2011 at 11:04:20AM +0000, Bensaid, Selma wrote:
> Why the cpu_dai->active and codec_dai->active are not used to check if
> the corresponding shutdown or startup callbacks should be called or not?
> This could be useful for DAIs that handle capture and playback streams by avoiding:
> - perform 2 cpu_dai or codec_dai startup when opening both streams (playback and
> Capture)
> - close a cpu_dai or codec_dai for a stream (example playback) while
> the 2nd stream (playback) is still running
It's done to allow the driver to make the decision about needing to do
anything - some drivers may need to do per-stream things, those that
don't can work out if they need to do anything. If it became very
common we could add variants that only get called once but at the minute
we have very few things that support multiple streams in the first
place.
More information about the Alsa-devel
mailing list