ASoC: qcom: sdw: fix memory leak

Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>:

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.
This commit is contained in:
Mark Brown 2025-10-30 16:07:10 +00:00
commit 3d8096fd37
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
16 changed files with 118 additions and 280 deletions