Skip to content

ASoC: SOF: Intel: lnl: Enable offload for UAOL link#5716

Open
ujfalusi wants to merge 2 commits intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/uaol_offload
Open

ASoC: SOF: Intel: lnl: Enable offload for UAOL link#5716
ujfalusi wants to merge 2 commits intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/uaol_offload

Conversation

@ujfalusi
Copy link
Copy Markdown
Collaborator

@ujfalusi ujfalusi commented Apr 1, 2026

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.

Copilot AI review requested due to automatic review settings April 1, 2026 07:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables DSP firmware offload handling for the UAOL (USB Audio Offload Link) on Intel Lunar Lake, aligning it with existing DMIC/SSP offload behavior.

Changes:

  • Renamed the offload helper to a more general hdac_bus_set_dsp_offload().
  • Extended offload enable/disable to include the UAOL alternate link in addition to SSP and DMIC.
  • Wired the new helper into probe/remove/resume/runtime-resume paths.
Comments suppressed due to low confidence (1)

sound/soc/sof/intel/lnl.c:63

  • The warning message still says "Failed to disable offload for DMIC/SSP" but the helper now also toggles UAOL. Update the message to reflect all links being handled (or use a more generic wording like "DSP offload").
	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);


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


return 0;
ret = hdac_bus_eml_enable_offload(bus, true,
AZX_REG_ML_LEPTR_ID_INTEL_UAOL, enable);
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hdac_bus_set_dsp_offload() now returns the status of enabling UAOL offload. hdac_bus_eml_enable_offload() returns -ENODEV when the UAOL link is not present, which would make probe/resume fail on platforms without UAOL. Consider treating -ENODEV for UAOL as non-fatal (or checking link presence first) so missing UAOL hardware doesn’t break audio initialization.

Suggested change
AZX_REG_ML_LEPTR_ID_INTEL_UAOL, enable);
AZX_REG_ML_LEPTR_ID_INTEL_UAOL, enable);
if (ret == -ENODEV)
ret = 0;

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LNL+ have UAOL enabled, it is part of the ACE2+ IPs, like SSP and DMIC.

@@ -21,7 +21,7 @@
#include <sound/hda-mlink.h>

/* this helps allows the DSP to setup DMIC/SSP */
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above hdac_bus_set_dsp_offload() is now inaccurate (it mentions only DMIC/SSP) and is grammatically incorrect ("helps allows"). Please update it to reflect that UAOL is also configured and fix the wording.

Suggested change
/* this helps allows the DSP to setup DMIC/SSP */
/* Enable DSP offload to set up SSP, DMIC and UAOL links */

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I missed this.

@ujfalusi ujfalusi force-pushed the peter/sof/pr/uaol_offload branch from e341872 to 3caf9dc Compare April 1, 2026 10:18
ujfalusi added 2 commits April 1, 2026 13:18
…void

hdac_bus_eml_enable_offload() can only fail in case the IP is not enabled
in the platform, which is not really an error as the ACE IP can be
configured differently when integrated into a specific SoC.

While it is unlikely, but it is a valid configuration that for example the
DMIC is disabled.
In this case we will just skip setting the offload for a link that is not
present.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
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.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi
Copy link
Copy Markdown
Collaborator Author

ujfalusi commented Apr 1, 2026

Changes since v1:

  • convert the functions for offload configuration to return void
  • add UAOL offload handling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants