All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Miartus, Adam (Arion Recruitment; ADITG/ESM)" <amiartus@de.adit-jv.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [ALSA patch] [PATCH - alsa-lib 4/4] pcm_file: add infile read support for mmap mode
Date: Tue, 21 May 2019 10:51:04 +0200	[thread overview]
Message-ID: <s5hr28s5gxz.wl-tiwai@suse.de> (raw)
In-Reply-To: <B174E9FCEE9A8C46B11E4DF2E329936277F364@HI2EXCH01.adit-jv.com>

On Tue, 21 May 2019 10:37:43 +0200,
Miartus, Adam (Arion Recruitment; ADITG/ESM) wrote:
> 
> > On Mon, 20 May 2019 18:51:06 +0200,
> > Miartus, Adam (Arion Recruitment; ADITG/ESM) wrote:
> > >
> > > From: Adam Miartus <amiartus@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@de.adit-jv.com>
> > > Reviewed-by: Timo Wischer <twischer@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. 

Hm, OK.  I basically hate to add a new ops, but this might be the only
way if we have to implement that.

OTOH, is this mmap support mandatory?  IOW, is wrapping with the plug
and mmap_emul performance-wise so bad?


thanks,

Takashi

  reply	other threads:[~2019-05-21  8:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1558370831-15960-1-git-send-email-adam.miartus@gmail.com>
     [not found] ` <1558370831-15960-4-git-send-email-adam.miartus@gmail.com>
     [not found]   ` <B174E9FCEE9A8C46B11E4DF2E329936277F234@HI2EXCH01.adit-jv.com>
2019-05-21  8:23     ` [ALSA patch] [PATCH - alsa-lib 4/4] pcm_file: add infile read support for mmap mode Takashi Iwai
2019-05-21  8:37       ` Miartus, Adam (Arion Recruitment; ADITG/ESM)
2019-05-21  8:51         ` Takashi Iwai [this message]
2019-05-21  9:19           ` Takashi Sakamoto
2019-05-21 10:36           ` Miartus, Adam (Arion Recruitment; ADITG/ESM)
     [not found] ` <B174E9FCEE9A8C46B11E4DF2E329936277F1EC@HI2EXCH01.adit-jv.com>
2019-05-21  8:27   ` [ALSA patch] FW: [PATCH - alsa-lib 1/4] pcm_file: add support for infile reading in non interleaved mode Takashi Iwai
2019-05-21 11:48     ` Miartus, Adam (Arion Recruitment; ADITG/ESM)
2019-05-21 11:59       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hr28s5gxz.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=amiartus@de.adit-jv.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.