Home
last modified time | relevance | path

Searched hist:"33 e59e50ee7610473c85030edca73ad3df60b5c1" (Results 1 – 1 of 1) sorted by relevance

/linux/sound/soc/intel/boards/
H A Dskl_hda_dsp_generic.cdiff 33e59e50ee7610473c85030edca73ad3df60b5c1 Fri Apr 26 17:21:12 CEST 2024 Peter Ujfalusi <peter.ujfalusi@linux.intel.com> ASoC: Intel: skl_hda_dsp_generic: Allocate snd_soc_card dynamically

The static hda_soc_card might be modified during runtime which might cause
issues on next time when the card is created.
For example if the dmic_num was set with module parameter then removed for
the next module loading then the card's components will still going to
point to the previous boot's cfg-dmics:X string.

There might be other places where devm allocated memory have been freed but
the hda_soc_card still pointing to the now unallocated memory (the memory
is freed when the platform device is removed).

Fix this issue by moving the snd_soc_card into skl_hda_private and use it
for the card registration to ensure that it is correctly initialized every
time.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>