aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 5e9cc460075e..65f636223d39 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -323,6 +323,7 @@ struct snd_pcm_runtime {
323 323
324 /* -- timer -- */ 324 /* -- timer -- */
325 unsigned int timer_resolution; /* timer resolution */ 325 unsigned int timer_resolution; /* timer resolution */
326 int tstamp_type; /* timestamp type */
326 327
327 /* -- DMA -- */ 328 /* -- DMA -- */
328 unsigned char *dma_area; /* DMA area */ 329 unsigned char *dma_area; /* DMA area */
@@ -952,6 +953,15 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream);
952void snd_pcm_timer_init(struct snd_pcm_substream *substream); 953void snd_pcm_timer_init(struct snd_pcm_substream *substream);
953void snd_pcm_timer_done(struct snd_pcm_substream *substream); 954void snd_pcm_timer_done(struct snd_pcm_substream *substream);
954 955
956static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime,
957 struct timespec *tv)
958{
959 if (runtime->tstamp_type == SNDRV_PCM_TSTAMP_TYPE_MONOTONIC)
960 do_posix_clock_monotonic_gettime(tv);
961 else
962 getnstimeofday(tv);
963}
964
955/* 965/*
956 * Memory 966 * Memory
957 */ 967 */