At Fri, 26 Jul 2002 13:51:01 -0700 (PDT), Guilhem Tardy wrote: > > > I am getting to know all the internals (although I didn't really want to)... > the ops->pointer() is called only from snd_pcm_update_hw_ptr(), which updates > the runtime->status->hw_ptr. But it doesn't: > > playback_copy() on sound dev0, hwoff:0 pos:0 ->160 > > playback_pointer() on sound dev0, last:160 pos:160 > ptr:160 {hw:0, appl:160} > hw_ptr_base:0 min_align:1 avail_min:160 avail_max:0 > > So far, so good. In snd_pcm_update_hw_ptr(), new_hw_ptr = runtime->hw_ptr_base > + pos = 160, so the next time around it should read "hw:160"... > > playback_prepare() on sound dev0, bsize:320 boundary:1342177280 > > Is it normal that boundary is so high?
the boundary is not the buffer size (although it's aligned to the buffer size). it's the maximal size of the buffer pointer which is countable by an (long) integer. the buffer pointer will be rewound to zero after it reaches this value. > > playback_copy() on sound dev0, hwoff:0 pos:160 ->320 > > playback_pointer() on sound dev0, last:160 pos:320 ptr:160 > {hw:0, appl:160} > hw_ptr_base:0 min_align:1 avail_min:160 avail_max:320 > > Ouch! "hw:0"... Why didn't change? And runtime->control->appl_ptr hasn't > changed either? because the prepare() was called before this operation. > > playback_copy() on sound dev0, hwoff:160 pos:0 ->160 > > Keep copying to the buffer in runtime->dma_area... > > playback_prepare() on sound dev0, bsize:320 boundary:1342177280 > playback_copy() on sound dev0, hwoff:0 pos:160 ->320 > > Ouch! This one hasn't been sent to the card yet. again prepare() was called. hence, the hwoff was rewound. but i don't know what happens here: why prepare() is called. does your application calls snd_pcm_prepare() so often? basically, prepare callback is called only from snd_pcm_prepare() in pcm_native.c, i.e. only via ioctl. (or, in the case of OSS emulation, via snd_pcm_oss_prepare(), which can be called multiple times at each change of configuration). ciao, Takashi ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel