All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Rob Duncan <rduncan@tesla.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: snd_pcm_ioplug_avail_update() confusion
Date: Tue, 24 Oct 2017 21:50:49 +0200	[thread overview]
Message-ID: <s5hmv4gpbom.wl-tiwai@suse.de> (raw)
In-Reply-To: <dw77emh8ux0z76.fsf@tesla.com>

On Wed, 18 Oct 2017 08:03:57 +0200,
Rob Duncan wrote:
> 
> I'm working on an external IO plugin based on ioplug and I'm confused
> about the behavior of snd_pcm_ioplug_avail_update().  Specifically this
> call (src/pcm/pcm_ioplug.c:657):
> 
>     result = io->data->callback->transfer(io->data, areas, offset, size);
> 
> Why isn't there a subsequent call to snd_pcm_mmap_appl_forward() like
> there is in ioplug_priv_transfer_areas()?  It seems that without such a
> call the captured data will be lost, or have I missed something?

This is the code to only fetch the data for the capture stream at
avail update.  What happens there is to just fills the gap made by
updating the hw_ptr (right before this transfer call).  And, the
avail_udpate call itself doesn't change appl_ptr.

That said, the current behavior is intentional.


HTH,

Takashi

      reply	other threads:[~2017-10-24 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18  6:03 snd_pcm_ioplug_avail_update() confusion Rob Duncan
2017-10-24 19:50 ` Takashi Iwai [this message]

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=s5hmv4gpbom.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=rduncan@tesla.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.