linux/sound/soc/generic
Robert Hancock c3d87d415f 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>
History 2023-06-14 11:15:31 +02:00
..
audio-graph-card.c ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link() 2022-12-31 13:33:06 +01: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 verbose explanation 2022-07-08 11:51:44 +01:00
audio-graph-card2.c ASoC: audio-graph-card2: Add of_node_put() in fail path 2022-07-22 21:27:55 +01: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:15:31 +02:00
simple-card.c ASoC: simple-card: Fix up checks for HW param fixups 2022-10-19 13:39:34 +01:00
test-component.c ASoC: test-component: Remove now redundant non_legacy_dai_naming flag 2022-06-27 13:16:53 +01:00