OSDN Git Service

pcm: ioplug: Transfer all available data
authorRob Duncan <rduncan@teslamotors.com>
Mon, 16 Jul 2018 23:35:23 +0000 (16:35 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 Jul 2018 15:52:52 +0000 (17:52 +0200)
commit1714332719fc91507ca24dd3567e50d7094b3001
treeb12855268002c9e865b48b41d3fa3f0474df765f
parentb0fc68511562c3e690abd322f7a673ec43164c81
pcm: ioplug: Transfer all available data

The snd_pcm_mmap_begin() call returns the amount of contiguous data,
which is less than the total available if it wraps around the buffer
boundary.

If we don't handle this split we leave stale data in the buffer that
should have been overwritten, as well as unread data in the io_plugin
that gets transferred on a subsequent call at the wrong offset.

Signed-off-by: Rob Duncan <rduncan@teslamotors.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_ioplug.c