pcm: file: add infile read support for mmap mode
pcm: file: add infile read support for mmap mode

mmap_begin callback is used to copy data from input file to mmaped
buffer

guard for corner use of api (multiple mmap_begin calls by user) is
introduced to check if next continuous buffer was already overwritten

buffer is overwritten with input file data only in case of stream capture

Signed-off-by: Adam Miartus <aac2fafc41b89bdd843b63017274d51e42a2a336@de.adit-jv.com>
Reviewed-by: Timo Wischer <715c057449941916292d0f6d747877e2fbe7af60@de.adit-jv.com>
Signed-off-by: Takashi Iwai <4596b3305151c7ee743192a95d394341e3d3b644@suse.de>

takaswie/alsa-lib,tiwai/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,alsa-project/alsa-lib,tiwai/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,alsa-project/alsa-lib