[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251020131208.22734-1-srinivas.kandagatla@oss.qualcomm.com>
Date: Mon, 20 Oct 2025 14:12:06 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
To: broonie@...nel.org
Cc: perex@...ex.cz, tiwai@...e.com, srini@...nel.org, alexey.klimov@...aro.org,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Subject: [PATCH 0/2] ASoC: qcom: sdw: fix memory leak
While testing for memoryleaks on T14s, it was found that the
struct sdw_stream_runtime was leaking very frequently.
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.
This patch series fix the issue, and while we are at it, it also remove
some redundant code from machine drivers.
Thanks,
Srini
Srinivas Kandagatla (2):
ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime
ASoC: qcom: sdw: remove redundant code
sound/soc/qcom/sc7280.c | 2 +-
sound/soc/qcom/sc8280xp.c | 33 +----------
sound/soc/qcom/sdw.c | 116 +++++++++++++++++++++-----------------
sound/soc/qcom/sdw.h | 7 +--
sound/soc/qcom/sm8250.c | 33 +----------
sound/soc/qcom/x1e80100.c | 33 +----------
6 files changed, 76 insertions(+), 148 deletions(-)
--
2.51.0
Powered by blists - more mailing lists