[alsa-devel] [ALSA patch] [PATCH - alsa-lib 4/4] pcm_file: add infile read support for mmap mode
Miartus, Adam (Arion Recruitment; ADITG/ESM)
amiartus at de.adit-jv.com
Tue May 21 10:37:43 CEST 2019
> On Mon, 20 May 2019 18:51:06 +0200,
> Miartus, Adam (Arion Recruitment; ADITG/ESM) wrote:
> >
> > From: Adam Miartus <amiartus at de.adit-jv.com>
> >
> > 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 <amiartus at de.adit-jv.com>
> > Reviewed-by: Timo Wischer <twischer at de.adit-jv.com>
>
> Can't we copy the data in snd_pcm_file_mmap_commit() just like the
> playback case?
>
>
> thanks,
>
> Takashi
My understanding is that in case of reading data in mmap mode user
would call mmap_begin, read the buffer and then call mmap_commit.
In this case overwriting the buffer in mmap_commit with data from
Input file would be too late.
Best regards,
Adam
More information about the Alsa-devel
mailing list