diff options
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r-- | include/sound/pcm.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 5e9cc460075e..51d58ccda2d8 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -274,7 +274,6 @@ struct snd_pcm_runtime { | |||
274 | snd_pcm_uframes_t period_size; /* period size */ | 274 | snd_pcm_uframes_t period_size; /* period size */ |
275 | unsigned int periods; /* periods */ | 275 | unsigned int periods; /* periods */ |
276 | snd_pcm_uframes_t buffer_size; /* buffer size */ | 276 | snd_pcm_uframes_t buffer_size; /* buffer size */ |
277 | unsigned int tick_time; /* tick time */ | ||
278 | snd_pcm_uframes_t min_align; /* Min alignment for the format */ | 277 | snd_pcm_uframes_t min_align; /* Min alignment for the format */ |
279 | size_t byte_align; | 278 | size_t byte_align; |
280 | unsigned int frame_bits; | 279 | unsigned int frame_bits; |
@@ -286,8 +285,6 @@ struct snd_pcm_runtime { | |||
286 | /* -- SW params -- */ | 285 | /* -- SW params -- */ |
287 | int tstamp_mode; /* mmap timestamp is updated */ | 286 | int tstamp_mode; /* mmap timestamp is updated */ |
288 | unsigned int period_step; | 287 | unsigned int period_step; |
289 | unsigned int sleep_min; /* min ticks to sleep */ | ||
290 | snd_pcm_uframes_t xfer_align; /* xfer size need to be a multiple */ | ||
291 | snd_pcm_uframes_t start_threshold; | 288 | snd_pcm_uframes_t start_threshold; |
292 | snd_pcm_uframes_t stop_threshold; | 289 | snd_pcm_uframes_t stop_threshold; |
293 | snd_pcm_uframes_t silence_threshold; /* Silence filling happens when | 290 | snd_pcm_uframes_t silence_threshold; /* Silence filling happens when |
@@ -306,7 +303,6 @@ struct snd_pcm_runtime { | |||
306 | 303 | ||
307 | /* -- locking / scheduling -- */ | 304 | /* -- locking / scheduling -- */ |
308 | wait_queue_head_t sleep; | 305 | wait_queue_head_t sleep; |
309 | struct timer_list tick_timer; | ||
310 | struct fasync_struct *fasync; | 306 | struct fasync_struct *fasync; |
311 | 307 | ||
312 | /* -- private section -- */ | 308 | /* -- private section -- */ |
@@ -323,6 +319,7 @@ struct snd_pcm_runtime { | |||
323 | 319 | ||
324 | /* -- timer -- */ | 320 | /* -- timer -- */ |
325 | unsigned int timer_resolution; /* timer resolution */ | 321 | unsigned int timer_resolution; /* timer resolution */ |
322 | int tstamp_type; /* timestamp type */ | ||
326 | 323 | ||
327 | /* -- DMA -- */ | 324 | /* -- DMA -- */ |
328 | unsigned char *dma_area; /* DMA area */ | 325 | unsigned char *dma_area; /* DMA area */ |
@@ -810,7 +807,6 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc | |||
810 | #define params_periods(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIODS)->min | 807 | #define params_periods(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIODS)->min |
811 | #define params_buffer_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min | 808 | #define params_buffer_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min |
812 | #define params_buffer_bytes(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min | 809 | #define params_buffer_bytes(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min |
813 | #define params_tick_time(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_TICK_TIME)->min | ||
814 | 810 | ||
815 | 811 | ||
816 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); | 812 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); |
@@ -908,9 +904,6 @@ int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); | |||
908 | int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream); | 904 | int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream); |
909 | int snd_pcm_capture_xrun_asap(struct snd_pcm_substream *substream); | 905 | int snd_pcm_capture_xrun_asap(struct snd_pcm_substream *substream); |
910 | void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr); | 906 | void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr); |
911 | void snd_pcm_tick_prepare(struct snd_pcm_substream *substream); | ||
912 | void snd_pcm_tick_set(struct snd_pcm_substream *substream, unsigned long ticks); | ||
913 | void snd_pcm_tick_elapsed(struct snd_pcm_substream *substream); | ||
914 | void snd_pcm_period_elapsed(struct snd_pcm_substream *substream); | 907 | void snd_pcm_period_elapsed(struct snd_pcm_substream *substream); |
915 | snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, | 908 | snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, |
916 | const void __user *buf, | 909 | const void __user *buf, |
@@ -952,6 +945,15 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream); | |||
952 | void snd_pcm_timer_init(struct snd_pcm_substream *substream); | 945 | void snd_pcm_timer_init(struct snd_pcm_substream *substream); |
953 | void snd_pcm_timer_done(struct snd_pcm_substream *substream); | 946 | void snd_pcm_timer_done(struct snd_pcm_substream *substream); |
954 | 947 | ||
948 | static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, | ||
949 | struct timespec *tv) | ||
950 | { | ||
951 | if (runtime->tstamp_type == SNDRV_PCM_TSTAMP_TYPE_MONOTONIC) | ||
952 | do_posix_clock_monotonic_gettime(tv); | ||
953 | else | ||
954 | getnstimeofday(tv); | ||
955 | } | ||
956 | |||
955 | /* | 957 | /* |
956 | * Memory | 958 | * Memory |
957 | */ | 959 | */ |