public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ASoC: qcom: sdw: fix memory leak
@ 2025-10-21 10:39 Srinivas Kandagatla
  2025-10-21 10:39 ` [PATCH v2 1/4] ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime Srinivas Kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2025-10-21 10:39 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, alexey.klimov, linux-sound, linux-kernel,
	linux-arm-msm, Srinivas Kandagatla

For some reason we endedup allocating sdw_stream_runtime for every cpu dai,
this has two issues.
    1. we never set snd_soc_dai_set_stream for non soundwire dai, which
       means there is no way that we can free this, resulting in memory leak
    2. startup and shutdown callbacks can be called without
       hw_params callback called. This combination results in memory leak
    because machine driver sruntime array pointer is only set in hw_params
    callback.
    
All the machine drivers have these memory leaks, so cleanup the mess and
make them use common helpers from sdw.c

This patch series fix the issue, and while we are at it, it also remove
some redundant code from machine drivers.

Thanks,
Srini

Changes since v1:
	- added missing dais for sdm845
	- moved all the machine drivers (sdm845 and sc7280) to use
	  common helpers to avoid memory leaks.

Srinivas Kandagatla (4):
  ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime
  ASoC: qcom: sdw: remove redundant code
  ASoC: qcom: sdm845: make use of common helpers
  ASoC: qcom: sc7280: make use of common helpers

 sound/soc/qcom/sc7280.c   |  67 +-------------------
 sound/soc/qcom/sc8280xp.c |  33 +---------
 sound/soc/qcom/sdm845.c   |  53 +---------------
 sound/soc/qcom/sdw.c      | 127 ++++++++++++++++++++++----------------
 sound/soc/qcom/sdw.h      |   7 +--
 sound/soc/qcom/sm8250.c   |  33 +---------
 sound/soc/qcom/x1e80100.c |  33 +---------
 7 files changed, 92 insertions(+), 261 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-22 12:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 10:39 [PATCH v2 0/4] ASoC: qcom: sdw: fix memory leak Srinivas Kandagatla
2025-10-21 10:39 ` [PATCH v2 1/4] ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime Srinivas Kandagatla
2025-10-22  0:34   ` [PATCH v2 0/4] ASoC: qcom: sdw: fix memory leak Steev Klimaszewski
2025-10-22  9:52     ` Srinivas Kandagatla
2025-10-22 12:00       ` Steev Klimaszewski
2025-10-21 10:40 ` [PATCH v2 2/4] ASoC: qcom: sdw: remove redundant code Srinivas Kandagatla
2025-10-21 10:40 ` [PATCH v2 3/4] ASoC: qcom: sdm845: make use of common helpers Srinivas Kandagatla
2025-10-21 10:40 ` [PATCH v2 4/4] ASoC: qcom: sc7280: " Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox