Skip to content
Snippets Groups Projects
Commit 222fe147 authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Frieder Schrempf
Browse files

ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()


commit a0aae96be5ffc5b456ca07bfe1385b721c20e184 upstream.

Check for return code from avs_pcm_hw_constraints_init() in
avs_dai_fe_startup() only checks if value is different from 0. Currently
function can return positive value, change it to return 0 on success.

Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
I've observed KASAN on our setups and while patch itself is correct
regardless. Problem seems to be caused by recent changes to rates, as
this started happening after recent patchsets and doesn't reproduce with
those reverted
https://lore.kernel.org/linux-sound/20240905-alsa-12-24-128-v1-0-8371948d3921@baylibre.com/
https://lore.kernel.org/linux-sound/20240911135756.24434-1-tiwai@suse.de/
I've tested using Mark tree, where they are both applied and for some
reason snd_pcm_hw_constraint_minmax() started returning positive value,
while previously it returned 0. I'm bit worried if it signals some
potential deeper problem regarding constraints with above changes.

Link: https://patch.msgid.link/20241010112008.545526-1-amadeuszx.slawinski@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e81cf5e
No related branches found
No related tags found
1 merge request!180🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.124)
...@@ -540,7 +540,7 @@ static int avs_dai_fe_hw_free(struct snd_pcm_substream *substream, struct snd_so ...@@ -540,7 +540,7 @@ static int avs_dai_fe_hw_free(struct snd_pcm_substream *substream, struct snd_so
if (ret < 0) if (ret < 0)
dev_dbg(dai->dev, "Failed to free pages!\n"); dev_dbg(dai->dev, "Failed to free pages!\n");
return ret; return 0;
} }
static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment