]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: compress: fix drain calls blocking other compress functions
authorVinod Koul <vinod.koul@intel.com>
Thu, 24 Oct 2013 11:07:31 +0000 (16:37 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Oct 2013 12:50:37 +0000 (14:50 +0200)
commitcc2a4ce45bf7379225b1f3a3ec3501601a228dde
treee84f98c5c5ea708b205e1ef34684b778d16c5a67
parentd523af8837657ad6b95643d6eb6b5763a0ac7176
ALSA: compress: fix drain calls blocking other compress functions

The drain and drain_notify callback were blocked by low level driver untill the
draining was complete. Due to this being invoked with big fat mutex held, others
ops like reading timestamp, calling pause, drop were blocked.

So to fix this we add a new snd_compr_drain_notify() API. This would be required
to be invoked by low level driver when drain or partial drain has been completed
by the DSP. Thus we make the drain and partial_drain callback as non blocking
and driver returns immediately after notifying DSP.
The waiting is done while relasing the lock so that other ops can go ahead.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
CC: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/compress_driver.h
sound/core/compress_offload.c