aboutsummaryrefslogtreecommitdiff
path: root/include/pcm.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2012-06-12 14:36:40 -0500
committerTakashi Iwai <tiwai@suse.de>2012-10-25 00:13:51 +0200
commitcf40ea169aad366b222283f431addafea6327149 (patch)
tree0ed3637b87387716284d1821b1f4c0b3449d34c7 /include/pcm.h
parent4bdb09126a32feb4394eaeb1d400d87e7c968770 (diff)
pcm: support for audio timestamps
add new snd_pcm_status_get_audio_htstamp() routine to query the audio timestamps provided by the kernel. This change provides applications with better ways to track elapsed time. Before this patch, applications would subtract queued samples (delay) from written samples, resulting in a 1-2 sample error. Also add snd_pcm_hw_params_supports_audio_wallclock_ts() to query what the hardware supports. TODO: check protocol compatibility? Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/pcm.h')
-rw-r--r--include/pcm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/pcm.h b/include/pcm.h
index 290593b9..1ce91e7d 100644
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -631,6 +631,7 @@ int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params);
+int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
unsigned int *rate_num,
unsigned int *rate_den);
@@ -939,6 +940,7 @@ void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t *obj, snd_timestam
void snd_pcm_status_get_trigger_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
void snd_pcm_status_get_tstamp(const snd_pcm_status_t *obj, snd_timestamp_t *ptr);
void snd_pcm_status_get_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
+void snd_pcm_status_get_audio_htstamp(const snd_pcm_status_t *obj, snd_htimestamp_t *ptr);
snd_pcm_sframes_t snd_pcm_status_get_delay(const snd_pcm_status_t *obj);
snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t *obj);
snd_pcm_uframes_t snd_pcm_status_get_avail_max(const snd_pcm_status_t *obj);