]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates
authorSamuel Holland <samuel@sholland.org>
Thu, 5 Mar 2020 05:11:41 +0000 (23:11 -0600)
committerMark Brown <broonie@kernel.org>
Fri, 6 Mar 2020 14:24:09 +0000 (14:24 +0000)
commitf3d9e9805c59e5f9ee11448889eb048bb43bd593
tree4aa8cbb12078b5351f58bfa417b66fbdffbb7faa
parent188cfbd87652764fc89e7c70cc0b944e6db86a5b
ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates

It can be useful to derive min/max rates of a snd_pcm_hardware without
having a snd_pcm_runtime, such as before constructing an ASoC DAI link.

Create a new helper that takes a pointer to a snd_pcm_hardware directly,
and refactor the original function as a wrapper around it, to avoid
needing to update any call sites.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200305051143.60691-2-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/pcm.h
sound/core/pcm_misc.c