linux-stable/sound/soc/generic
Robert Hancock 721b78b745 ASoC: simple-card-utils: fix PCM constraint error check
[ Upstream commit 635071f5fe ]

The code in asoc_simple_startup was treating any non-zero return from
snd_pcm_hw_constraint_minmax as an error, when this can return 1 in some
normal cases and only negative values indicate an error.

When this happened, it caused asoc_simple_startup to disable the clocks
it just enabled and return 1, which was not treated as an error by the
calling code which only checks for negative return values. Then when the
PCM is eventually shut down, it causes the clock framework to complain
about disabling clocks that were not enabled.

Fix the check for snd_pcm_hw_constraint_minmax return value to only
treat negative values as an error.

Fixes: 5ca2ab4598 ("ASoC: simple-card-utils: Add new system-clock-fixed flag")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20230602011936.231931-1-robert.hancock@calian.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-14 11:17:02 +02:00
..
audio-graph-card.c ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link() 2022-12-07 14:19:12 +00:00
audio-graph-card2-custom-sample.c ASoC: add Audio Graph Card2 Custom Sample 2021-10-15 16:10:43 +01:00
audio-graph-card2-custom-sample.dtsi ASoC: audio-graph-card2-custom-sample.dtsi: add convert-rate for DPCM (MIXer) 2022-11-07 13:58:06 +00:00
audio-graph-card2.c ASoC: audio-graph-card2: remove Experimental announce 2022-11-11 17:26:52 +00:00
Kconfig ASoC: add Audio Graph Card2 Custom Sample 2021-10-15 16:10:43 +01:00
Makefile ASoC: add Audio Graph Card2 Custom Sample 2021-10-15 16:10:43 +01:00
simple-card-utils.c ASoC: simple-card-utils: fix PCM constraint error check 2023-06-14 11:17:02 +02:00
simple-card.c ASoC: simple-card-utils: create jack inputs for aux_devs 2023-01-27 12:20:55 +00:00
test-component.c ASoC: test-component: Remove now redundant non_legacy_dai_naming flag 2022-06-27 13:16:53 +01:00