ASoC: SOF: Intel: hda-loader: change signature of code loader helpers
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 4 Apr 2024 18:54:46 +0000 (13:54 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 4 Apr 2024 18:58:26 +0000 (19:58 +0100)
commit6cbf086143cf9674c7f029e1cf435c65a537066a
treecdea86a906f8d8bd0d4aa6209d378737fda5a9fa
parente9ae5adce99e27ef29ea9ccb01afe260bf1c1408
ASoC: SOF: Intel: hda-loader: change signature of code loader helpers

We need to reuse cl_prepare, cl_trigger and cl_cleanup helpers from a
SoundWire context where only the device information is
available. Rather than pass the 'sdev' argument, use get_drvdata() to
retrieve the required structure.

For consistency, rename hda_cl_stream_prepare() as hda_cl_prepare().

These three helpers are also exported so that they can be referenced
from another module.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240404185448.136157-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-loader.c
sound/soc/sof/intel/hda.h