]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: pcm: Fix rate_max calculation
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 27 Nov 2013 08:58:17 +0000 (09:58 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 27 Nov 2013 16:42:37 +0000 (16:42 +0000)
commitd23423747dce2e23895ad88b49ca8f6648a7f6d4
tree650b0fcb23bc682c49e02b54f6812712e6564648
parent1386d2af13b0b2ba423da1adf79ceabb7ea834e9
ASoC: pcm: Fix rate_max calculation

In order to make sure that the sample rate is in the supported range of both
components the maximum rate of the card should be the minimum of the maximum
rate of each components. There is one special case to consider though, if
max_rate is set to 0 this means there is no maximum specified, so use
min_not_zero() macro which will give use the desired result.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Takashi iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-pcm.c