summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>2025-10-22 17:33:46 +0300
committerMark Brown <broonie@kernel.org>2025-10-29 17:54:38 +0300
commitbcba17279327c6e85dee6a97014dc642e2dc93cc (patch)
treead7d3414fc45dda811981286311df9c1a7179340 /include/linux
parent45f5c9eec43a9bf448f46562f146810831916cc9 (diff)
downloadlinux-bcba17279327c6e85dee6a97014dc642e2dc93cc.tar.xz
ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime
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. Fix this by 1. adding a helper function to get sdw_runtime for substream which can be used by shutdown callback to get hold of sruntime to free. 2. only allocate sdw_runtime for soundwire dais. Fixes: d32bac9cb09c ("ASoC: qcom: Add helper for allocating Soundwire stream runtime") Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Steev Klimaszewski <threeway@gmail.com> # Thinkpad X13s Link: https://patch.msgid.link/20251022143349.1081513-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions