Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* dsnoop, hwpointer and avail
@ 2017-11-10 12:29 Henrik Eriksson
  2017-11-13 10:12 ` Henrik Eriksson
  0 siblings, 1 reply; 3+ messages in thread
From: Henrik Eriksson @ 2017-11-10 12:29 UTC (permalink / raw)
  To: alsa-devel

Hello

Is there any documentation/rationale for how pcm_dsnoop works in
snd_pcm_{dsnoop_}status?  I am particularly wondering about the ordering
of the snd_pcm_dsnoop_sync_ptr and the snd_pcm_status call on the slave
pcm.

I see occasional spikes (>1000 frames) of difference between the slave
pcm hwpointer after the snd_pcm_status call on it and the pointers in
the dsnoop pcm, and a correspondingly bad avail count.  I suspect the
mismatches are due to process scheduling (the slave pcm status is
delayed because the application process not running and the hardware
progresses during that delay).  Does this seem plausible?  If so, could
the code be simplified to reduce the the number of systemcalls needed?
The status of the slave pcm seems to provide much of the information
used to sync the pointers.  Or is there some other way to get a tighter
coupling between the dsnoop status htstamp and avail count?

Regards,
/henrik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-14 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-10 12:29 dsnoop, hwpointer and avail Henrik Eriksson
2017-11-13 10:12 ` Henrik Eriksson
2017-11-14 16:29   ` Henrik Eriksson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox