ASoC: dpcm: Properly initialise hw->rate_max
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 27 Aug 2018 13:26:47 +0000 (14:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2019 08:52:02 +0000 (09:52 +0100)
commit807bd32150bb6c431205bd73bad5f684ba81a991
tree7ff27b9591d81e65e1e1fbbfc31f060cea16f67e
parent89a4a131246a98ee0f1986b10a92ca55af022187
ASoC: dpcm: Properly initialise hw->rate_max

[ Upstream commit e33ffbd9cd39da09831ce62c11025d830bf78d9e ]

If the CPU DAI does not initialise rate_max, say if using
using KNOT or CONTINUOUS, then the rate_max field will be
initialised to 0. A value of zero in the rate_max field of
the hardware runtime will cause the sound card to support no
sample rates at all. Obviously this is not desired, just a
different mechanism is being used to apply the constraints. As
such update the setting of rate_max in dpcm_init_runtime_hw
to be consistent with the non-DPCM cases and set rate_max to
UINT_MAX if nothing is defined on the CPU DAI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-pcm.c