Home
last modified time | relevance | path

Searched hist:"395 e52b7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/soc/
H A Dsoc-ops.c395e52b7 Mon Dec 04 06:47:35 CST 2023 Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ASoC: ops: add correct range check for limiting volume

commit fb9ad24485087e0f00d84bee7a5914640b2b9024 upstream.

Volume can have ranges that start with negative values, ex: -84dB to
+40dB. Apply correct range check in snd_soc_limit_volume before setting
the platform_max. Without this patch, for example setting a 0dB limit on
a volume range of -84dB to +40dB would fail.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231204124736.132185-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>