[alsa-devel] snd_pcm_htimestamp & more PCM mmap timestamping in driver

Jaroslav Kysela perex at perex.cz
Wed Jan 9 14:17:28 CET 2008


Hi all,

	I just added snd_pcm_htimestamp() function to alsa-lib:

int snd_pcm_htimestamp(snd_pcm_t *pcm, snd_pcm_uframes_t *avail, 
		       snd_htimestamp_t *tstamp);

	If you have any complaints, please, do now.

	Also, I would like to change SNDRV_PCM_TSTAMP_MMAP semantics to 
SNDRV_PCM_TSTAMP_ENABLE - when hw_ptr is updated in the driver, a 
timestamp would be always grabbed to ensure that we have always a valid 
timestamp & position pair. In current implementation, if an application 
updates hw_ptr in driver (using for example PCM delay ioctl), timestamp 
grabbed in the interrupt handler won't be associated with any real ring 
buffer position which makes things complicated and not too much abstract. 
Opinions?

						Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.



More information about the Alsa-devel mailing list