mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
ALSA: pcm: Simplify params_period_bytes()
The hw_params struct has a parameter that contains the period size in bytes. This can be used instead of deriving the value from other parameters. This is similar to e.g. params_buffer_bytes() Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
89827ca9dd
commit
cd9978f1d3
1 changed files with 1 additions and 3 deletions
|
@ -363,9 +363,7 @@ params_subformat(const struct snd_pcm_hw_params *p)
|
||||||
static inline unsigned int
|
static inline unsigned int
|
||||||
params_period_bytes(const struct snd_pcm_hw_params *p)
|
params_period_bytes(const struct snd_pcm_hw_params *p)
|
||||||
{
|
{
|
||||||
return (params_period_size(p) *
|
return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_PERIOD_BYTES)->min;
|
||||||
snd_pcm_format_physical_width(params_format(p)) *
|
|
||||||
params_channels(p)) / 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue