14 Jun
2008
14 Jun
'08
11:51 a.m.
Lennart Poettering wrote:
I could agree to that. However, to be useful it must be possible to query those three pointers atomically. i.e. in a single call:
typedef struct snd_ptr_info { snd_uframes_t curr_ptr; snd_uframes_t hw_ptr; snd_uframes_t appl_ptr; } snd_ptr_info_t;
int snd_pcm_get_ptr_info(snd_pcm_t *pcm, snd_ptr_info_t *i);
We would have to be careful. The current snd_pcm_delay() sorts out all the wrap around detection etc. for us. Having the raw pointers would require the application to do the wrap around detection but the driver has extra information in order for it to detect wrap around.