ASoC: SOF: Intel: lnl: Enable offload for UAOL link
PATCH 1/1 ASoC: SOF: Intel: lnl: Enable offload for UAOL link
commit fdfbd9ff86a145f09978ab49305ed7acfad66a1d upstream.
The handling of UAOL (USB Audio Offload Link) is similar to SSP and DMIC, it is handled by the DSP firmware.
Set the offload enable for it similar to SSP and DMIC.
Cc <[email protected]> # 6.18.x
Signed-off-by Peter Ujfalusi <[email protected]>
Reviewed-by Bard Liao <[email protected]>
Reviewed-by Kai Vehmanen <[email protected]>
Signed-off-by Mark Brown <[email protected]>
[ Peter: Adjusted to the int returning hdac_bus_eml_enable_offload() as
commit 978152b2cab5 ("ASoC: SOF: Intel: hda-mlink/lnl: Convert offload enable functions to void") is not backported. The helper is renamed from hdac_bus_offload_dmic_ssp() to hdac_bus_set_dsp_offload() to match upstream, since it now also handles UAOL.
Firmware built with UAOL support reads the UAOL registers and crashes if the host has not granted the DSP access to them. ]
--- sound/soc/sof/intel/lnl.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
sound/soc/sof/intel/lnl.c +9 -8
@@ -20,8 +20,8 @@#include "lnl.h" #include <sound/hda-mlink.h> -/* this helps allows the DSP to setup DMIC/SSP */ -static int hdac_bus_offload_dmic_ssp (struct hdac_bus *bus,bool enable) +/* Configure DSP offload for DMIC/SSP/UAOL */ +static int hdac_bus_set_dsp_offload (struct hdac_bus *bus,bool enable) {int ret;
@@ -35,7 +35,8 @@ static int hdac_bus_offload_dmic_ssp(struct hdac_bus *bus, bool enable)if (ret <0 )return ret; -return 0 ; +return hdac_bus_eml_enable_offload (bus, true, +AZX_REG_ML_LEPTR_ID_INTEL_UAOL , enable); }static int lnl_hda_dsp_probe (struct snd_sof_dev *sdev)
@@ -46,17 +47,17 @@ static int lnl_hda_dsp_probe(struct snd_sof_dev *sdev)if (ret <0 )return ret; -return hdac_bus_offload_dmic_ssp (sof_to_bus (sdev), true); +return hdac_bus_set_dsp_offload (sof_to_bus (sdev), true); }static void lnl_hda_dsp_remove (struct snd_sof_dev *sdev) {int ret; - ret =hdac_bus_offload_dmic_ssp (sof_to_bus (sdev), false); + ret =hdac_bus_set_dsp_offload (sof_to_bus (sdev), false);if (ret <0 )dev_warn (sdev->dev, -"Failed to disable offload for DMIC/SSP: %d\n" , ret); +"Failed to disable offload for DMIC/SSP/UAOL: %d\n" , ret);hda_dsp_remove (sdev); }
@@ -69,7 +70,7 @@ static int lnl_hda_dsp_resume(struct snd_sof_dev *sdev)if (ret <0 )return ret; -return hdac_bus_offload_dmic_ssp (sof_to_bus (sdev), true); +return hdac_bus_set_dsp_offload (sof_to_bus (sdev), true); }static int lnl_hda_dsp_runtime_resume (struct snd_sof_dev *sdev)
@@ -80,7 +81,7 @@ static int lnl_hda_dsp_runtime_resume(struct snd_sof_dev *sdev)if (ret <0 )return ret; -return hdac_bus_offload_dmic_ssp (sof_to_bus (sdev), true); +return hdac_bus_set_dsp_offload (sof_to_bus (sdev), true); }static int lnl_dsp_post_fw_run (struct snd_sof_dev *sdev)
Signature · 1 line
2.56.1