Skip to content

[DNM] dai: add support for Intel UAOL DAI - #9227

Closed
tlissows wants to merge 4 commits into
thesofproject:mainfrom
tlissows:uaol-dai-upstream
Closed

[DNM] dai: add support for Intel UAOL DAI#9227
tlissows wants to merge 4 commits into
thesofproject:mainfrom
tlissows:uaol-dai-upstream

Conversation

@tlissows

@tlissowstlissows commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

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

This PR needs another (Zephyr) PR drivers: dai: add DAI driver for Intel UAOL to be merged first.

Comment threadsrc/audio/base_fw_intel.c Outdated
Comment threadsrc/audio/base_fw_intel.c
Comment threadsrc/audio/base_fw_intel.c Outdated
Comment threadsrc/audio/base_fw_intel.c Outdated
Comment threadsrc/audio/copier/copier_dai.c Outdated
Comment threadsrc/lib/dai.c

@plbossartplbossart 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.

Not following the directions, this doesn't seem aligned with what we previously did for ALH / SoundWire.

Comment threadsrc/ipc/ipc4/dai.c
#else
channel = copier_cfg->gtw_cfg.node_id.f.v_index;
#endif
break;

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.

I don't fully understand this.

for LNL+ all the DMA stuff is handled in the same way with an HDaudio-based solution.

We just moved some of the ALH stuff into the HDaudio prodessing - see line 94 the test for ALH.

so shouldn't the UAOL stuff also be moved under the HDAudio category? Why special case what looks identical?

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.

my comment still stands.

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.

@tlissows any update here ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Removed support for MTL, so the line is no longer present.
However the concept of handling UAOL by HDA code (and removing of all UAOL related stuff from SOF) seems not to be applicable. This is because of UAOL being a type of DAI handled by separate Zephyr driver with the specific API.

@tlissowstlissows changed the title dai: add support for Intel UAOL DAI[DNM] dai: add support for Intel UAOL DAIJul 19, 2024

@plbossartplbossart 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.

we really need to make UAOL support dependent on a version of silicon (pick one), e.g. ACE2.0, and not add code that will never be used on previous generations.

There's really no point in supporting anything older than ACE2.0?

Comment threadsrc/ipc/ipc4/dai.c Outdated
Comment threadsrc/ipc/ipc4/dai.c
#else
channel = copier_cfg->gtw_cfg.node_id.f.v_index;
#endif
break;

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.

my comment still stands.

Comment threadsrc/audio/copier/copier_dai.c Outdated
Comment threadsrc/lib/dai.c Outdated
@lgirdwood

Copy link
Copy Markdown
Member

@tlissows ping ?

@tlissows

tlissows commented Oct 2, 2024

Copy link
Copy Markdown
ContributorAuthor

Removed support for ACE1.x platform from this PR. Also aligned to the changes introduced by PR basefw: Add handling of IPC4_DMA_CONTROL messages.

@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.

@tlissows I assume still undergoing testing hence the DNM ? Pls also respond to open from @plbossart

Comment threadsrc/audio/dai-zephyr.c Outdated
case SOF_DAI_INTEL_SSP:
cfg.type = is_blob ? DAI_INTEL_SSP_NHLT : DAI_INTEL_SSP;
cfg_params = is_blob ? spec_config : &sof_cfg->ssp;
cfg_params = is_blob ? (void *)&gtw_cfg->config_data : &sof_cfg->ssp;

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.

Do we need the void* cast here or is the compiler throwing up a warning in this case ? cfg_params is also const too.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

The cast was added to avoid compiler warning like this (being not related to cfg_params):

pointer type mismatch ('uint32_t const (*)[1]' and 'const struct sof_ipc_dai_ssp_params *') [-Wpointer-type-mismatch]
cfg_params = is_blob ? &gtw_cfg->config_data : &sof_cfg->ssp;
^ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

Changing for two casts for better readability:
cfg_params = is_blob ? (void *)&gtw_cfg->config_data : (void *)&sof_cfg->ssp;

Comment threadsrc/audio/base_fw_intel.c Outdated
Comment threadsrc/ipc/ipc4/dai.c
#else
channel = copier_cfg->gtw_cfg.node_id.f.v_index;
#endif
break;

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.

@tlissows any update here ?

@tmlemantmleman 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.

I have no remarks regarding the code, but I would like to see that the whole thing passes through CI. There is a temporary commit missing here that would indicate the Zephyr version from your second pull request:

--- a/west.yml+++ b/west.yml@@ -43,7 +43,7 @@ manifest:
- name: zephyr
repo-path: zephyr
- revision: 99e6280d7e22552de9a94992b626acdcbde00fee+ revision: pull/69906/head
remote: zephyrproject
# Import some projects listed in zephyr/west.yml@revision

@lgirdwood

Copy link
Copy Markdown
Member

@tlissows@tmleman it looks like this is good to go once it passes CI - I think @plbossart comments have now been addressed. Are we blocking on any Zephyr PRs before we can merge ?

Currently, the dai_set_config() function is called with copier gateway
config data passed but without the config length, possibly making the
config not parsable for some DAI drivers. This patch adds passing of the
full ipc4_copier_gateway_cfg structure, giving DAI drivers the ability
to access config length if needed.
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
Add strict use of dai_type enum items as a call parameter for
dai_get_device() function. Currently, both the dai_type and
sof_ipc_dai_type items are used inconsistently.
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
This adds support for Intel USB Audio Offload Link (UAOL) DAI.
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>

@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.

@tlissows looks like we have a panic in a legacy playback use case test reported by CI.

@lgirdwood

Copy link
Copy Markdown
Member

@tlissows@abonislawski are we able to target this for PTL only in the next sprint ? I dont think there is too much left todo ?

@lgirdwoodlgirdwood added this to the v2.13 milestone Feb 12, 2025
@lgirdwood

Copy link
Copy Markdown
Member

@abonislawski@tlissows ping ?

@kv2019i

Copy link
Copy Markdown
Collaborator

@abonislawski@tlissows ping? I'll move this to v2.14 for now.

@kv2019ikv2019i modified the milestones: v2.13, v2.14Apr 23, 2025
@abonislawski

Copy link
Copy Markdown
Member

@lgirdwood@kv2019i Tomasz is no longer working on this, I will try to find a new owner

@abonislawski

Copy link
Copy Markdown
Member

Unfortunately team decided to drop this feature and PR

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.

7 participants

@tlissows@lgirdwood@kv2019i@abonislawski@plbossart@lyakh@tmleman