Skip to content

dai: uaol: add support for Intel UAOL - #10567

Merged
lgirdwood merged 3 commits into
thesofproject:mainfrom
serhiy-katsyuba-intel:uaol
Mar 27, 2026
Merged

dai: uaol: add support for Intel UAOL#10567
lgirdwood merged 3 commits into
thesofproject:mainfrom
serhiy-katsyuba-intel:uaol

Conversation

@serhiy-katsyuba-intel

@serhiy-katsyuba-intelserhiy-katsyuba-intel commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Adds support for Intel USB Audio Offload Link (UAOL) DAI.

This is a revival of the old closed UAOL PR #9227.

Zephyr PR zephyrproject-rtos/zephyr#104137 is now merged.

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

SOFCI TEST

@lgirdwoodlgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

CopilotAI review requested due to automatic review settings March 5, 2026 16:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Intel USB Audio Offload Link (UAOL) DAI support across the SOF/Zephyr integration and IPC4 paths, including capability reporting and node-id mapping.

Changes:

  • Update West manifest to a Zephyr revision that includes UAOL-related support.
  • Introduce the SOF_DAI_INTEL_UAOL type and wire it through DAI selection/config paths.
  • Add UAOL capability advertisement and UAOL stream-id → HDA link stream-id mapping for IPC4 DMA control.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
west.ymlBumps Zephyr revision required for UAOL enablement.
src/lib/dai.cRegisters UAOL devices and maps UAOL to the Zephyr DAI type / DMA caps.
src/ipc/ipc4/dai.cAdds UAOL handling for link config and DMA channel selection.
src/include/ipc/dai.hIntroduces SOF_DAI_INTEL_UAOL enum value.
src/audio/dai-zephyr.cAdds UAOL case to Zephyr DAI configuration.
src/audio/copier/copier_dai.cAdds UAOL stream link classes to DAI creation path.
src/audio/copier/copier.cRoutes UAOL stream link classes to copier_dai_create().
src/audio/base_fw_intel.cAdvertises UAOL support/caps and maps UAOL node indices for DMA control.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment threadsrc/audio/copier/copier_dai.c
const size_t dev_count = ARRAY_SIZE(uaol_devs);
struct uaol_capabilities dev_cap;
struct ipc4_uaol_capabilities *caps = (struct ipc4_uaol_capabilities *)tuple->value;
size_t caps_size = offsetof(struct ipc4_uaol_capabilities, link_caps[dev_count]);

CopilotAIMar 5, 2026

Copy link

Choose a reason for hiding this comment

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

offsetof(struct ..., link_caps[dev_count]) uses a non-constant array index; this is not valid with standard offsetof/__builtin_offsetof and can fail to compile. Compute the size as sizeof(*caps) + dev_count * sizeof(caps->link_caps[0]) (or the equivalent using the element type) instead.

Suggested change
size_tcaps_size=offsetof(structipc4_uaol_capabilities, link_caps[dev_count]);
size_tcaps_size=sizeof(*caps) +dev_count*sizeof(caps->link_caps[0]);

Copilot uses AI. Check for mistakes.
Comment threadsrc/ipc/ipc4/dai.c
Comment on lines +63 to +68
case SOF_DAI_INTEL_UAOL:
link_cfg.full = 0;
link_cfg.part.hchan = gtw_fmt->channels_count - 1;
link_cfg.part.dir = common_config->direction;
link_cfg.part.stream = common_config->host_dma_config[0]->stream_id;
break;

CopilotAIMar 5, 2026

Copy link

Choose a reason for hiding this comment

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

hchan is derived as channels_count - 1. If channels_count is 0, this underflows and encodes an invalid hchan value. Clamp or validate the channel count before subtracting (e.g., ensure the minimum encoded value is 0 and only subtract when channels_count > 0).

Copilot uses AI. Check for mistakes.
@lgirdwood

Copy link
Copy Markdown
Member

@serhiy-katsyuba-intel I assuming CI will test this now ?

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

@serhiy-katsyuba-intel I assuming CI will test this now ?

Currently, CI does not have any UAOL tests enabled. Therefore, it can only test for potential regressions to existing functionality but cannot test the UAOL feature itself.

Unfortunately, the Zephyr folks want to revert the Zephyr UAOL PR because it introduced a new driver type apparently without proper architectural discussion: zephyrproject-rtos/zephyr#104976. As a result, I'll change this PR to draft status for now. :-(

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

Unfortunately, the Zephyr folks want to revert the Zephyr UAOL PR because it introduced a new driver type apparently without proper architectural discussion: zephyrproject-rtos/zephyr#104976. As a result, I'll change this PR to draft status for now. :-(

It seems that everything is now resolved with Zephyr's UAOL driver future. I am changing this PR from draft status to ready for review.

@kv2019ikv2019i changed the title dai: uaol: add support for Intel UAOLdai: uaol: add support for Intel UAOL (includes west.yml Zephyr update)Mar 13, 2026

@kv2019ikv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, only one change to the last patch.

caps->link_caps[i].max_rx_fifo_size = dev_cap.max_rx_fifo_size;
}

tlv_value_set(tuple, type, caps_size, caps);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not related to this PR, but reminds me we'd to add better protections against overrunning the IPC mailbox size. The overall length of the TLV is not known in these functions now, and it will be difficult to debug if we excedeed the space. Most of these are by definition ok as the structure is fixed and defined in FW.

Comment threadapp/boards/intel_adsp_ace20_lnl.conf Outdated

@kv2019ikv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment threadwest.yml Outdated
@lgirdwood

Copy link
Copy Markdown
Member

Unfortunately, the Zephyr folks want to revert the Zephyr UAOL PR because it introduced a new driver type apparently without proper architectural discussion: zephyrproject-rtos/zephyr#104976. As a result, I'll change this PR to draft status for now. :-(

It seems that everything is now resolved with Zephyr's UAOL driver future. I am changing this PR from draft status to ready for review.

@serhiy-katsyuba-intel are we now good with all dependencies or do we need a west update as I see some CI failures ?

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

@serhiy-katsyuba-intel are we now good with all dependencies or do we need a west update as I see some CI failures ?

west.yml in this PR is already updated and points to proper last UAOL commit in Zephyr.

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

I see several CI checks are failing with Could NOT find Python3: Found unsuitable version "3.10.11", but required is at least "3.12" and another few fails are related to NXP HAL. Unlikely, this PR can cause such errors.

@lgirdwood

Copy link
Copy Markdown
Member

SOFCI TEST

@lgirdwood

Copy link
Copy Markdown
Member

I see several CI checks are failing with Could NOT find Python3: Found unsuitable version "3.10.11", but required is at least "3.12" and another few fails are related to NXP HAL. Unlikely, this PR can cause such errors.

Ok, it looks like the CI did not report teh build. Trying again.

@tmleman

Copy link
Copy Markdown
Contributor

@lgirdwood What is blocking this PR?

@lgirdwood

Copy link
Copy Markdown
Member

@lgirdwood What is blocking this PR?

Not sure, there are no logs except the build fail afaict, can you ask locally ?

@kv2019i

Copy link
Copy Markdown
Collaborator

Note: the sof-ci/jenkins/pr-build is failing due to Python reqs bumped up and the jenkins builds having too old python. Internal ticket filed.

Fixes minor typo error.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Adds support for Intel USB Audio Offload Link (UAOL) DAI.
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Enables UAOL (USB Audio Offload Link) feature on ACE Intel ADSP platforms.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

Removed Zephyr update as it has been already updated by another PR.

@serhiy-katsyuba-intelserhiy-katsyuba-intel changed the title dai: uaol: add support for Intel UAOL (includes west.yml Zephyr update)dai: uaol: add support for Intel UAOLMar 27, 2026
@lgirdwood
lgirdwood merged commit b9f0800 into thesofproject:mainMar 27, 2026
45 of 48 checks passed
@kv2019i

Copy link
Copy Markdown
Collaborator

@serhiy-katsyuba-intel

I can ack @ujfalusi 's findings. This breaks DSP boot with Linux SOF kernel as UAOL is not enable. Backtrace points to:

--- Backtrace Decode ---
Frame 0: SP = 0xa012ad50
PC : 0xa008b4eb -> <uaol_intel_adsp_set_power>
sys_read32():
/home/kvehmane/work/zephyr/include/zephyr/arch/common/sys_io.h:45
a008b4eb: 0020c0 memw
Frame 1: SP = 0xa012ad80
PC : 0xa008b4d0 -> <uaol_intel_adsp_pm_action+0x23>
/home/kvehmane/work/zephyr/drivers/uaol/uaol_intel_adsp.c:869
ret = uaol_intel_adsp_set_power(dev, false);
a008b4d0: 0008e0 callx8 a8
Frame 2: SP = 0xa012ada0
PC : 0xa0040ff5 -> <pm_device_runtime_get+0x17e>
/home/kvehmane/work/zephyr/subsys/pm/device_runtime.c:288
ret = pm->base.action_cb(pm->dev, PM_DEVICE_ACTION_RESUME);
a0040ff5: 0002e0 callx8 a2
Frame 3: SP = 0xa012add0
PC : 0xa004828c -> <unknown, DT: virtualmemory@a0020000, Section: .text>
Frame 4: SP = 0xa012ae00
PC : 0xa104bc85 -> <unknown, DT: memory@a1000000, Section: .cold>
Frame 5: SP = 0xa012ae40
PC : 0xa105331b -> <basefw_get_large_config+0x814>
basefw_hw_config():
/home/kvehmane/work/sof/src/audio/base_fw.c:247
basefw_vendor_hw_config(&plat_data_offset, (char *)tuple);
a105331b: 0008e0 callx8 a8

@serhiy-katsyuba-intel

Copy link
Copy Markdown
ContributorAuthor

Thank you, Kai, Peter.

I've pushed a PR to temporarily disable UAOL until a proper fix is found: #10670

Sign up for freeto 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.

8 participants

@serhiy-katsyuba-intel@lgirdwood@tmleman@kv2019i@abonislawski@majunkier@tlissows