Home
last modified time | relevance | path

Searched hist:ce8ffc1bac7bee5015eb68faf214b39fcbd65d15 (Results 1 – 2 of 2) sorted by relevance

/linux/sound/soc/codecs/
H A Drt1308-sdw.hdiff ce8ffc1bac7bee5015eb68faf214b39fcbd65d15 Fri Mar 24 02:43:59 CET 2023 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> ASoC: codecs: rt1308-sdw: simplify set_stream

Using a dynamic allocation to store a single pointer is not very
efficient/useful.

Worse, the memory is released in the SoundWire stream.c file, but
still accessed in the DAI shutdown, leading to kmemleak reports.

And last the API requires the previous stream information to be
cleared when the argument is NULL.

Simplify the code to address all 3 problems.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230324014408.1677505-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
H A Drt1308-sdw.cdiff ce8ffc1bac7bee5015eb68faf214b39fcbd65d15 Fri Mar 24 02:43:59 CET 2023 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> ASoC: codecs: rt1308-sdw: simplify set_stream

Using a dynamic allocation to store a single pointer is not very
efficient/useful.

Worse, the memory is released in the SoundWire stream.c file, but
still accessed in the DAI shutdown, leading to kmemleak reports.

And last the API requires the previous stream information to be
cleared when the argument is NULL.

Simplify the code to address all 3 problems.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230324014408.1677505-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>