Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd9978f1 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Takashi Iwai
Browse files

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 89827ca9
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -363,9 +363,7 @@ params_subformat(const struct snd_pcm_hw_params *p)
static inline unsigned int
params_period_bytes(const struct snd_pcm_hw_params *p)
{
	return (params_period_size(p) *
		snd_pcm_format_physical_width(params_format(p)) *
		params_channels(p)) / 8;
	return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_PERIOD_BYTES)->min;
}

/**