linux-stable/sound/soc/generic
Robert Hancock 635071f5fe
ASoC: simple-card-utils: fix PCM constraint error check
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>
2023-06-02 12:54:06 +01:00
..
audio-graph-card.c ASoC: simple-card: add comment to indicate don't remove platforms 2023-03-22 13:17:38 +00:00
audio-graph-card2-custom-sample.c ASoC: audio-graph-card2-custom-sample.dtsi: use card->name to avoid long name 2023-03-27 13:09:49 +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: switch to use c2c_params instead of params 2023-04-05 12:16:37 +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-02 12:54:06 +01:00
simple-card.c ASoC: simple-card: Add missing of_node_put() in case of error 2023-05-26 16:35:26 +01:00
test-component.c ASoC: generic: test-component: Convert to platform remove callback returning void 2023-03-20 13:08:16 +00:00