mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH stable 6.12.y backport] ASoC: SOF: Intel: lnl: Enable offload for UAOL link
@ 2026-11-25 15:26 Peter Ujfalusi
  0 siblings, 0 replies; only message in thread
From: Peter Ujfalusi @ 2026-11-25 15:26 UTC (permalink / raw)
  To: stable; +Cc: linux-kernel, kai.vehmanen, yung-chuan.liao, broonie

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: <stable@vger.kernel.org> # 6.12.x
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20260520150639.25301-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
[ 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(-)

diff --git a/sound/soc/sof/intel/lnl.c b/sound/soc/sof/intel/lnl.c
index 3d5a1f8b17e5..48202b4d8069 100644
--- a/sound/soc/sof/intel/lnl.c
+++ b/sound/soc/sof/intel/lnl.c
@@ -31,8 +31,8 @@ static const struct snd_sof_debugfs_map lnl_dsp_debugfs[] = {
 	{"fw_regs", HDA_DSP_BAR,  MTL_SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY},
 };
 
-/* 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;
 
@@ -46,7 +46,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)
@@ -57,17 +58,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);
 }
@@ -80,7 +81,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)
@@ -91,7 +92,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)
-- 
2.56.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 15:26 [PATCH stable 6.12.y backport] ASoC: SOF: Intel: lnl: Enable offload for UAOL link Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®