]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: compress: fix drain calls blocking other compress functions (v6)
authorVinod Koul <vinod.koul@intel.com>
Thu, 7 Nov 2013 09:08:22 +0000 (10:08 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Nov 2013 09:12:27 +0000 (10:12 +0100)
commit558d0b93e9e38f44e88e93a0da7a7f885840b4a8
tree4ea74e0d765b4d55429126770d72b107d66f4324
parentf33a8adaedf765b16ca7a8f95a62f44a742ee546
ALSA: compress: fix drain calls blocking other compress functions (v6)

The drain and drain_notify callback were blocked by low level driver
until 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 releasing the lock so
that other ops can go ahead.

[ The commit cc2a4ce45bf7 was wrongly applied from the preliminary
  patch.  This commit corrects to the final version.
  Sorry for inconvenience!  -- tiwai ]

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