Re: More snd_pcm_ioplug_avail_update() questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Jul 2018 16:19:19 +0200,
Rob Duncan wrote:
> 
> 
> At 00:04 on Thu, Jul 26 2018, Takashi wrote:
> >> Is it required that all available data has been committed between calls
> >> to snd_pcm_ioplug_avail_update() on an IO plugin capture stream?
> >
> > Yes, the capture data is committed.
> > The snd_pcm_ioplug_hw_ptr_update() should have reported the amount of
> > data the slave PCM can actually transfer.  Hence the transfer call
> > thereafter must fulfill the whole requested data.
> 
> But what I see is that snd_pcm_rate_avail_update() commits data in the
> slave PCM in units of slave->period_size (via
> snd_pcm_rate_grab_next_period()), which means that if there is a partial
> period in the slave PCM mmap it will not be committed.
> 
> In other words, not all the available data will be commmitted before the
> next call to snd_pcm_ioplug_avail_update().  This means that the data
> will be discarded the next time that snd_pcm_ioplug_avail_update() is
> called.

OK, I seem to have misunderstood about what you meant as committed in
the context.  Yes, if the available is partial, it might be not
committed.  But I don't understand the next part.

How will it be discarded at the next snd_pcm_ioplug_avail_update()?
The data remains on the buffer, and applptr isn't changed.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux