* snd_pcm_ioplug_avail_update() confusion
@ 2017-10-18 6:03 Rob Duncan
2017-10-24 19:50 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Rob Duncan @ 2017-10-18 6:03 UTC (permalink / raw)
To: alsa-devel
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?
Thanks,
Rob.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: snd_pcm_ioplug_avail_update() confusion
2017-10-18 6:03 snd_pcm_ioplug_avail_update() confusion Rob Duncan
@ 2017-10-24 19:50 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-10-24 19:50 UTC (permalink / raw)
To: Rob Duncan; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-24 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 6:03 snd_pcm_ioplug_avail_update() confusion Rob Duncan
2017-10-24 19:50 ` Takashi Iwai
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.