ALSA: compress_core: Update calc_avail to use cumulative values
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 18 Apr 2013 09:59:23 +0000 (10:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 21 Apr 2013 07:52:23 +0000 (09:52 +0200)
commit4c28e32d6c4da1d2bc92d3062690e770c18493e6
treebf310ae5beff3de311f5fe50e55f29d70869884f
parent8dd2b66d1a961231685a3bfe5937c85d846fbf5d
ALSA: compress_core: Update calc_avail to use cumulative values

The app_pointer is managed locally by the compress core for memory
mapped DSPs but for DSPs that are not memory mapped this would have to
be manually updated from within the DSP driver itself, which is hardly
very idiomatic.

This patch switches to using the cumulative values to calculate the
available buffer space because these are already gracefully passed out
of the DSP driver to the compress core and otherwise should be
functionally equivalent.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/compress_offload.c