aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 27f8ef48b5ec..76b34b5841eb 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -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))