提交 8c5178fc 编写于 作者: M Mark Brown

ALSA: Add params_width() helpers

Add helpers for obtaining the width of a format directly from params
since this is expected to become a common operation in ASoC.
Signed-off-by: NMark Brown <broonie@linaro.org>
Reviewed-by: NTakashi Iwai <tiwai@suse.de>
上级 6ce4eac1
...@@ -354,4 +354,16 @@ params_period_bytes(const struct snd_pcm_hw_params *p) ...@@ -354,4 +354,16 @@ params_period_bytes(const struct snd_pcm_hw_params *p)
params_channels(p)) / 8; 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 */ #endif /* __SOUND_PCM_PARAMS_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册