]> git.alsa-project.org Git - tinycompress.git/commit
compress: do not poll if enough space to write remaining data
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Wed, 5 Jun 2013 12:11:44 +0000 (13:11 +0100)
committerVinod Koul <vinod.koul@intel.com>
Fri, 7 Jun 2013 00:29:51 +0000 (05:59 +0530)
commit0e0c39e2beb9c55db1394c61c054078666a716cc
tree1ffb36aa1b28e69121bbac0ff6d64a21b08b21e9
parent78672ce0046c036183290b649ff072d49bb7cd0c
compress: do not poll if enough space to write remaining data

Changes the poll logic in compress_write() to prevent
it polling if there is enough available space to write
all remaining data. Previously the logic always polled for
an entire fragment to become available before starting the
first write.

This change allows short writes of < frag_size, which is likely
at the end of a stream.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
compress.c