ASoC: Intel: avs: Disconnect substream if suspend or resume fails
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 16 Nov 2022 11:55:50 +0000 (12:55 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 22 Nov 2022 19:32:27 +0000 (19:32 +0000)
commitf3fbb553f98563f692e356aca87d656baba910a0
tree51efbeb76e23cf5a22f9fcb36050065338f35379
parentc30c8f9d51ec24b36e2c65a6307a5c8cbc5a0ebc
ASoC: Intel: avs: Disconnect substream if suspend or resume fails

To improve performance and overall system stability, suspend/resume
operations for ASoC cards always return success status and defer the
actual work.

Because of that, if a substream fails to resume, userspace may still
attempt to invoke commands on it as from their perspective the operation
completed successfully. Set substream's state to DISCONNECTED to ensure
no further commands are attempted.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221116115550.1100398-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/pcm.c