All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Backport a fix for broken avs audio
@ 2024-12-11 11:10 Amadeusz Sławiński
  2024-12-11 11:10 ` [PATCH 1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init() Amadeusz Sławiński
  0 siblings, 1 reply; 3+ messages in thread
From: Amadeusz Sławiński @ 2024-12-11 11:10 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman, Sasha Levin, linux-kernel,
	linux-sound
  Cc: Linux kernel regressions list, Takashi Iwai, Jaroslav Kysela,
	Mark Brown, Cezary Rojewski, Amadeusz Sławiński

Patch fixing the broken audio issue for avs apparently didn't make it
into v6.12 stable tree and playing audio results in NULL pointer
dereference.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=219577

Backport a fix.

Amadeusz Sławiński (1):
  ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()

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

-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
  2024-12-11 11:10 [PATCH 0/1] Backport a fix for broken avs audio Amadeusz Sławiński
@ 2024-12-11 11:10 ` Amadeusz Sławiński
  2024-12-11 16:31   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Amadeusz Sławiński @ 2024-12-11 11:10 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman, Sasha Levin, linux-kernel,
	linux-sound
  Cc: Linux kernel regressions list, Takashi Iwai, Jaroslav Kysela,
	Mark Brown, Cezary Rojewski, Amadeusz Sławiński

[ Upstream commit a0aae96be5ffc5b456ca07bfe1385b721c20e184 ]

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.

Link: https://patch.msgid.link/20241010112008.545526-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/avs/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
  2024-12-11 11:10 ` [PATCH 1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init() Amadeusz Sławiński
@ 2024-12-11 16:31   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-12-11 16:31 UTC (permalink / raw)
  To: stable; +Cc: Amadeusz Sławiński, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: a0aae96be5ffc5b456ca07bfe1385b721c20e184

WARNING: Author mismatch between patch and upstream commit:
Backport author: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amadeuszx.slawinski@linux.intel.com>
Commit author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>


Status in newer kernel trees:
6.12.y | Not found

Note: The patch differs from the upstream commit:
---
1:  a0aae96be5ffc ! 1:  d1a437a075512 ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
    @@ Metadata
      ## Commit message ##
         ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
     
    +    [ Upstream commit a0aae96be5ffc5b456ca07bfe1385b721c20e184 ]
    +
         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.
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.12.y       |  Success    |  Success   |
| stable/linux-6.6.y        |  Failed     |  N/A       |
| stable/linux-6.1.y        |  Failed     |  N/A       |
| stable/linux-5.15.y       |  Failed     |  N/A       |
| stable/linux-5.10.y       |  Failed     |  N/A       |
| stable/linux-5.4.y        |  Failed     |  N/A       |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-11 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 11:10 [PATCH 0/1] Backport a fix for broken avs audio Amadeusz Sławiński
2024-12-11 11:10 ` [PATCH 1/1] ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init() Amadeusz Sławiński
2024-12-11 16:31   ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.