OSDN Git Service

ALSA: compress: allow pause and resume during draining
authorGyeongtaek Lee <gt82.lee@samsung.com>
Thu, 26 Nov 2020 12:34:52 +0000 (21:34 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 27 Nov 2020 18:45:05 +0000 (19:45 +0100)
commit9be9f2d3d073ef42127475f4fb6a392ab133f629
treecc66b6c342eeaf909e91972e71e5b99b5b7576b6
parent43906287380f962a7178059cf8da1e03d94da3e0
ALSA: compress: allow pause and resume during draining

With a stream with low bitrate, user can't pause or resume the stream
near the end of the stream because current ALSA doesn't allow it.
If the stream has very low bitrate enough to store whole stream into
the buffer, user can't do anything except stop the stream and then
restart it from the first because most of applications call draining
after sending last frame to the kernel.
If pause, resume are allowed during draining, user experience can be
enhanced.
To prevent malfunction in HW drivers which don't support pause
during draining, pause during draining will only work if HW driver
enable this feature explicitly by calling
snd_compr_use_pause_in_draining().

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/000101d6c3f0$89b312b0$9d193810$@samsung.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/compress_driver.h
sound/core/compress_offload.c