diff options
Diffstat (limited to 'include/sound/pcm_params.h')
| -rw-r--r-- | include/sound/pcm_params.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index f494f1e3c90..6b1c78f05fa 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h @@ -22,6 +22,8 @@ * */ +#include <sound/pcm.h> + int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, int *dir); @@ -352,4 +354,16 @@ params_period_bytes(const struct snd_pcm_hw_params *p) params_channels(p)) / 8; } +static inline int +params_width(const struct snd_pcm_hw_params *p) +{ + return snd_pcm_format_width(params_format(p)); +} + +static inline int +params_physical_width(const struct snd_pcm_hw_params *p) +{ + return snd_pcm_format_physical_width(params_format(p)); +} + #endif /* __SOUND_PCM_PARAMS_H */ |
