diff mbox series

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

Message ID 20241010112008.545526-1-amadeuszx.slawinski@linux.intel.com (mailing list archive)
State Accepted
Commit a0aae96be5ffc5b456ca07bfe1385b721c20e184
Headers show
Series ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init() | expand

Commit Message

Amadeusz Sławiński Oct. 10, 2024, 11:20 a.m. UTC
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: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz 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.

---
 sound/soc/intel/avs/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Oct. 11, 2024, 10:14 a.m. UTC | #1
On Thu, 10 Oct 2024 13:20:08 +0200, Amadeusz Sławiński wrote:
> 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: Cezary Rojewski <cezary.rojewski@intel.com>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
> --
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
      commit: a0aae96be5ffc5b456ca07bfe1385b721c20e184

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Amadeusz Sławiński Oct. 11, 2024, 10:22 a.m. UTC | #2
On 10/11/2024 12:14 PM, Mark Brown wrote:
> On Thu, 10 Oct 2024 13:20:08 +0200, Amadeusz Sławiński wrote:
>> 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: Cezary Rojewski <cezary.rojewski@intel.com>
>> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
>> --
>>
>> [...]
> 
> Applied to
> 
>     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
> 

Seems like I've messed this one a bit, additional comment should've been 
below '---' instead of '--', as it is now part of patch in tree, should 
I resend?
Mark Brown Oct. 11, 2024, 10:34 a.m. UTC | #3
On Fri, Oct 11, 2024 at 12:22:14PM +0200, Amadeusz Sławiński wrote:
> On 10/11/2024 12:14 PM, Mark Brown wrote:
> > On Thu, 10 Oct 2024 13:20:08 +0200, Amadeusz Sławiński wrote:

> > Applied to

> >     https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

> Seems like I've messed this one a bit, additional comment should've been
> below '---' instead of '--', as it is now part of patch in tree, should I
> resend?

No, it's already applied now - it'll be fine.
diff mbox series

Patch

diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 4af8115803568..945f9c0a6a545 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -509,7 +509,7 @@  static int avs_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
 			    SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_CHANNELS,
 			    SNDRV_PCM_HW_PARAM_RATE, -1);
 
-	return ret;
+	return 0;
 }
 
 static int avs_dai_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)