Skip to contentSkip to conversation

snd_pcm_ioplug_avail_update() confusion

DISCUSSION Rob Duncan 2 participants 2 messages Oct 18, 2017 – Oct 24, 2017

lore
Share & tools
lore

Rob Duncan

author
#0 lore raw

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.

#1 lore raw
Quoted 10 lines · Rob Duncan

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