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.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 73334e0f823f..5e9cc460075e 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -3,7 +3,7 @@
3 3
4/* 4/*
5 * Digital Audio (PCM) abstract layer 5 * Digital Audio (PCM) abstract layer
6 * Copyright (c) by Jaroslav Kysela <perex@suse.cz> 6 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
7 * Abramo Bagnara <abramo@alsa-project.org> 7 * Abramo Bagnara <abramo@alsa-project.org>
8 * 8 *
9 * 9 *
@@ -301,8 +301,8 @@ struct snd_pcm_runtime {
301 union snd_pcm_sync_id sync; /* hardware synchronization ID */ 301 union snd_pcm_sync_id sync; /* hardware synchronization ID */
302 302
303 /* -- mmap -- */ 303 /* -- mmap -- */
304 volatile struct snd_pcm_mmap_status *status; 304 struct snd_pcm_mmap_status *status;
305 volatile struct snd_pcm_mmap_control *control; 305 struct snd_pcm_mmap_control *control;
306 306
307 /* -- locking / scheduling -- */ 307 /* -- locking / scheduling -- */
308 wait_queue_head_t sleep; 308 wait_queue_head_t sleep;
@@ -791,13 +791,13 @@ static inline struct snd_interval *hw_param_interval(struct snd_pcm_hw_params *p
791static inline const struct snd_mask *hw_param_mask_c(const struct snd_pcm_hw_params *params, 791static inline const struct snd_mask *hw_param_mask_c(const struct snd_pcm_hw_params *params,
792 snd_pcm_hw_param_t var) 792 snd_pcm_hw_param_t var)
793{ 793{
794 return (const struct snd_mask *)hw_param_mask((struct snd_pcm_hw_params*) params, var); 794 return &params->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
795} 795}
796 796
797static inline const struct snd_interval *hw_param_interval_c(const struct snd_pcm_hw_params *params, 797static inline const struct snd_interval *hw_param_interval_c(const struct snd_pcm_hw_params *params,
798 snd_pcm_hw_param_t var) 798 snd_pcm_hw_param_t var)
799{ 799{
800 return (const struct snd_interval *)hw_param_interval((struct snd_pcm_hw_params*) params, var); 800 return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL];
801} 801}
802 802
803#define params_access(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS)) 803#define params_access(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))
@@ -922,7 +922,10 @@ snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
922snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream, 922snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
923 void __user **bufs, snd_pcm_uframes_t frames); 923 void __user **bufs, snd_pcm_uframes_t frames);
924 924
925extern const struct snd_pcm_hw_constraint_list snd_pcm_known_rates;
926
925int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime); 927int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime);
928unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate);
926 929
927static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream, 930static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
928 struct snd_dma_buffer *bufp) 931 struct snd_dma_buffer *bufp)