Skip to content

topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER - #11156

Open
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/uaol-tplg-msb
Open

topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER#11156
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/uaol-tplg-msb

Conversation

@ujfalusi

@ujfalusi ujfalusi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The UAOL DAI copier's wire-facing audio formats never set out_sample_type/in_sample_type, so they defaulted to SAMPLE_TYPE_LSB_INTEGER. Every other link type (HDA, SoundWire, SSP, DMIC) tags its DAI copier side SAMPLE_TYPE_MSB_INTEGER instead, which is what makes the copier left-justify 24-bit samples before handing them to the link. Without it, 24-bit UAOL audio played back right shifted by a byte: quiet and missing the top bits of resolution.

Add uaol_output_audio_formats_msb.conf and
uaol_input_audio_formats_msb.conf, copies of the existing tables with SAMPLE_TYPE_MSB_INTEGER added, and point only the two DAI-copier widgets (playback output, capture input) at them. The host-copier widgets keep the original tables, since their host-facing side has to stay in the standard LSB-aligned ALSA convention.

@ujfalusi
ujfalusi requested review from kv2019i, lgirdwood and singalsu and a lite review from Copilot September 2, 2026 09:30
@ujfalusi

ujfalusi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@kv2019i, @lgirdwood, 2.15 candidate

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.

🟢 Approval recommended

The change is narrowly scoped, consistent with existing topology2 conventions for MSB-tagged link-facing formats, and cleanly isolates the behavior to the UAOL DAI-copier widgets without affecting host-facing formats.

Pull request overview

This PR fixes UAOL DAI-copier sample alignment by explicitly tagging the wire-facing side audio formats as SAMPLE_TYPE_MSB_INTEGER, bringing UAOL in line with other link types (HDA/SDW/SSP/DMIC) and preventing 24-bit audio from being effectively byte-shifted (quiet / reduced resolution).

Changes:

  • Switch UAOL DAI-copier widgets in uaol-generic.conf to use new MSB-tagged format tables on their wire-facing side.
  • Add uaol_output_audio_formats_msb.conf and uaol_input_audio_formats_msb.conf as MSB-tagged counterparts of the existing UAOL format tables.
  • Keep host-facing UAOL copier format tables unchanged (still defaulting to LSB alignment) to preserve standard ALSA conventions.
File summaries
File Description
tools/topology/topology2/platform/intel/uaol-generic.conf Updates only the UAOL DAI-copier widgets to reference MSB-tagged format tables on the link-facing side.
tools/topology/topology2/include/formats/uaol_output_audio_formats_msb.conf New MSB-tagged output audio format table (315 expanded formats) for UAOL wire-facing playback side.
tools/topology/topology2/include/formats/uaol_input_audio_formats_msb.conf New MSB-tagged input audio format table (315 expanded formats) for UAOL wire-facing capture side.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

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

Good catch!

@ujfalusi ujfalusi changed the title topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER [DNM] topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER Sep 2, 2026
@ujfalusi

ujfalusi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I need to remove the MSB flag for the S32 formats.

@ujfalusi
ujfalusi force-pushed the peter/pr/uaol-tplg-msb branch from afa5b77 to 2b1c8cf Compare September 2, 2026 11:23
The UAOL DAI copier's wire-facing audio formats never set
out_sample_type/in_sample_type, so they defaulted to
SAMPLE_TYPE_LSB_INTEGER. Every other link type (HDA, SoundWire, SSP,
DMIC) tags its DAI copier side SAMPLE_TYPE_MSB_INTEGER instead, which
is what makes the copier left-justify 24-bit samples before handing
them to the link. Without it, 24-bit UAOL audio played back right
shifted by a byte: quiet and missing the top bits of resolution.

Add uaol_output_audio_formats_msb.conf and
uaol_input_audio_formats_msb.conf, copies of the existing tables with
SAMPLE_TYPE_MSB_INTEGER added, and point only the two DAI-copier
widgets (playback output, capture input) at them. The host-copier
widgets keep the original tables, since their host-facing side has to
stay in the standard LSB-aligned ALSA convention.

The 32 bit valid depth stays LSB-tagged. Left-justifying is a no-op
when every bit is valid, and sof_ipc4_fmt_cfg_to_type() only takes the
tag into account for 8 and 32 bits, so an MSB tag there would never
match the LSB reference the driver derives from an S32_LE PCM: every
S32_LE stream failed with "Unsupported audio format", at any rate.
Split the 24 32 valid depth list into an MSB-tagged 24 bit entry and
an LSB-tagged 32 bit one, which leaves the format count unchanged.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi ujfalusi changed the title [DNM] topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER topology2: uaol-generic: Tag DAI-copier formats as MSB_INTEGER Sep 2, 2026
@ujfalusi

ujfalusi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Changes since v1:

  • separate the 32/32 and 24/32 formats and mark on the 24/32 as MSB

@intel-sofci

Copy link
Copy Markdown

PR 11156: test results

Run date: 2026-09-02 12:22 UTC

Tested commit: 2b1c8cfd4e3b05acc91d564ab8346ef3a62292f0

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

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.

5 participants