alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Accurate delay reporting from dshare
@ 2016-10-27 10:15 Alan Young
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Young @ 2016-10-27 10:15 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

Hi,

When the kernel reports current (playback) delay via a call to 
snd_pcm_status() or snd_pcm_delay() for a normal hardware PCM, then the 
delay value reported is the sum of space used in the ring buffer plus 
any delay reported from the underlying runtime driver.

snd_pcm_dshare_status() and snd_pcm_dshare_delay() discard this 
refinement and simply report the use of some ring buffer. Why does it do 
this and how could the reporting be improved? In particular I am 
struggling to understand the relationship between a dshare instance's 
(view of a) ring buffer and the slave (hw) PCM's ring buffer.

I understand that the *slowptr* configuration item can be set to get 
more accurate position updates as part of this reporting but I get the 
feeling that this will not on its own solve the problem. If it did then 
one could simply use the delay value reported by the slave PCM.

The context of these questions is using dshare to expose 4 logical 
stereo devices on a platform using an ARM-based SoC with a single 
8-channel hardware driver. I need to get the same level of delay report 
accuracy as I would do without using dshare.

Alan.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Accurate delay reporting from dshare
@ 2016-10-26 14:30 Alan Young
  2016-10-27 10:52 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Young @ 2016-10-26 14:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

Hi,

When the kernel reports current (playback) delay via a call to 
snd_pcm_status() or snd_pcm_delay() for a normal hardware PCM, then the 
delay value reported is the sum of space used in the ring buffer plus 
any delay reported from the underlying runtime driver.

snd_pcm_dshare_status() and snd_pcm_dshare_delay() discard this 
refinement and simply report the use of some ring buffer. Why does it do 
this and how could the reporting be improved? In particular I am 
struggling to understand the relationship between a dshare instance's 
(view of a) ring buffer and the slave (hw) PCM's ring buffer.

I understand that the *slowptr* configuration item can be set to get 
more accurate position updates as part of this reporting but I get the 
feeling that this will not on its own solve the problem. If it did then 
one could simply use the delay value reported by the slave PCM.

The context of these questions is using dshare to expose 4 logical 
stereo devices on a platform using an ARM-based SoC with a single 
8-channel hardware driver. I need to get the same level of delay report 
accuracy as I would do without using dshare.

Alan.

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

end of thread, other threads:[~2016-11-02 17:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 10:15 Accurate delay reporting from dshare Alan Young
  -- strict thread matches above, loose matches on Subject: below --
2016-10-26 14:30 Alan Young
2016-10-27 10:52 ` Takashi Iwai
2016-11-02 14:17   ` Alan Young
2016-11-02 17:34     ` Alan Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).