Skip to content

ipc: ipc4: dai: do not set the direction bit for UAOL - #11087

Open
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/uaol-dir-fix
Open

ipc: ipc4: dai: do not set the direction bit for UAOL#11087
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/uaol-dir-fix

Conversation

@ujfalusi

Copy link
Copy Markdown
Contributor

The link_config computed here is handed to the UAOL driver as the stream channel map and written to UAOLxPCMSyCM. On ACE 2.x and later that register only defines the lchan, hchan and strm fields, its two upper bits are reserved, and union hdalink_cfg keeps the direction in the topmost of them.

Setting the direction therefore wrote a reserved bit for every capture stream, after which the link transferred no data at all and reported no error. Playback was unaffected because its direction is zero.

The link does not need to be told the direction: transmit and receive streams have separate indices, so the stream already implies it.

Fixes: ddd5c64 ("dai: uaol: add support for Intel UAOL")

The link_config computed here is handed to the UAOL driver as the stream
channel map and written to UAOLxPCMSyCM. On ACE 2.x and later that register
only defines the lchan, hchan and strm fields, its two upper bits are
reserved, and union hdalink_cfg keeps the direction in the topmost of them.

Setting the direction therefore wrote a reserved bit for every capture
stream, after which the link transferred no data at all and reported no
error. Playback was unaffected because its direction is zero.

The link does not need to be told the direction: transmit and receive
streams have separate indices, so the stream already implies it.

Fixes: ddd5c64 ("dai: uaol: add support for Intel UAOL")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

Copilot AI 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

Removes programming of the dir (direction) bit in the UAOL HD-A link configuration built by dai_set_link_hda_config() (IPC4 path), because on ACE 2.x+ the UAOLxPCMSyCM register reserves the upper bits and the stream index already implies direction. This prevents capture streams from silently failing due to writing a reserved bit.

Changes:

  • Stop setting link_cfg.part.dir for SOF_DAI_INTEL_UAOL link config (leave it at 0 via link_cfg.full = 0).
  • Add an in-code comment clarifying that UAOLxPCMSyCM has no direction bit and the stream selects direction.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

4 participants