[alsa-devel] [PATCH] ASoC: core: Don't schedule deferred_resume_work twice
lrg at ti.com
Thu May 26 12:56:46 CEST 2011
On 25/05/11 21:06, Stephen Warren wrote:
> For cards that have two or more DAIs, snd_soc_resume's loop over all
> DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
> Since this is the same work item each time, the 2nd and subsequent
> calls return 0 (work item already queued), and trigger the dev_err
> message below stating that a work item may have been lost.
> Solve this by adjusting the loop to simply calculate whether to run the
> resume work immediately or defer it, and then call schedule work (or not)
> one time based on that.
> Note: This has not been tested in mainline, but only in chromeos-2.6.38;
> mainline doesn't support suspend/resume on Tegra, nor does the mainline
> Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> sound/soc/soc-core.c | 19 ++++++++++---------
> 1 files changed, 10 insertions(+), 9 deletions(-)
This looks fine for 2.6.41.
Acked-by: Liam girdwood <lrg at ti.com>
More information about the Alsa-devel