X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=include%2Fsound%2Fpcm_params.h;h=c704357775fc4ef077ef52fb27cfb97c75b378ee;hb=2d2474a194652f55c7af51068db3c1b851f16711;hp=3c45f3924ba7e779a4d32a357665d0359abcbaaf;hpb=05f6d02521d4c7a656c5135d6d81c345ce531ac0;p=cascardo%2Flinux.git diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 3c45f3924ba7..c704357775fc 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h @@ -366,4 +366,11 @@ static inline int params_physical_width(const struct snd_pcm_hw_params *p) return snd_pcm_format_physical_width(params_format(p)); } +static inline void +params_set_format(struct snd_pcm_hw_params *p, snd_pcm_format_t fmt) +{ + snd_mask_set(hw_param_mask(p, SNDRV_PCM_HW_PARAM_FORMAT), + (__force int)fmt); +} + #endif /* __SOUND_PCM_PARAMS_H */