Skip to content

topology2: resonance_audio: add RT722, nocodec, and DMA metadata targets - #11569

Draft
lgirdwood wants to merge 2 commits into
thesofproject:mainfrom
lgirdwood:topic/resonance-audio-topology
Draft

lgirdwood wants to merge 2 commits into
thesofproject:mainfrom
lgirdwood:topic/resonance-audio-topology

Conversation

@lgirdwood

@lgirdwood lgirdwood commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Add Topology2 widget, pipeline, and platform definitions for Google Resonance Audio binaural rendering with Phase 1 ALSA kcontrols and Phase 2 ALSA compress mmap DMA spatial pose metadata:

  • include/components/resonance-audio.conf: RESAUD processing component definition, Phase 1 head-tracking/room/speaker-mode kcontrols, and IPC4 dual-pin input_pin_binding (Pin 0 PCM + Pin 1 Spatial Metadata).
  • include/pipelines/cavs/host-copier-resonance-gain-mixin-playback.conf & resonance-playback.conf: playback pipelines integrating the Resonance Audio spatializer.
  • platform/intel/sdw-jack-resonance.conf: RT722 SoundWire jack topology wiring Pin 0 PCM playback (hw:0,0) and Pin 1 Spatial Metadata compress stream (pcm_id 55).
  • development/cavs-nocodec-resonance.conf & development/tplg-targets.cmake: adds sof-ptl-nocodec-resonance, sof-wcl-nocodec-resonance, sof-ptl-rt722-4ch-resonance, and sof-wcl-rt722-4ch-resonance targets.

Related Draft PRs

Verification

  • Built and validated with alsatplg (0 errors) on build-tplg-resonance:
    • topology2_dev_sof-ptl-rt722-4ch-resonance
    • topology2_dev_sof-wcl-rt722-4ch-resonance
    • topology2_dev_sof-ptl-nocodec-resonance
    • topology2_dev_sof-wcl-nocodec-resonance
    • Regression check on topology2_prod_sof-ptl-rt722-4ch and topology2_dev_sof-ptl-rt722-4ch-bt (0 errors).

Add Topology2 definitions and targets for Google Resonance Audio binaural rendering:
- include/components/resonance-audio.conf: Resonance Audio processing widget with Phase 1 head-tracking/room/speaker-mode kcontrols and dual-pin IPC4 input bindings
- include/pipelines/cavs/host-copier-resonance-gain-mixin-playback.conf and resonance-playback.conf: PCM + Resonance playback pipelines
- platform/intel/sdw-jack-resonance.conf: RT722 SoundWire jack topology wiring Pin 0 (2ch/4ch/6ch PCM playback on hw:0,0) and Pin 1 (Spatial Metadata ALSA compress stream on pcm_id 55)
- development/cavs-nocodec-resonance.conf and development/tplg-targets.cmake: PTL/WCL nocodec and RT722 4ch resonance topology targets

Signed-off-by: Liam Girdwood <liam.r.girdwood@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.

🟡 Changes recommended

Two critical format mismatches prevent advertised multichannel streams from preparing: the 5.1 nocodec instance exposes incompatible outputs, and PCM_FORMAT_ALL host inputs default to stereo, causing Linux to reject four- and six-channel streams.

2 open issues
What changed in this PR

Adds Topology2 support for Google Resonance Audio binaural playback on PTL/WCL nocodec and RT722 systems, complementing the linked DSP module and Linux compress mmap work.

Changes:

  • Defines the Resonance processing widget, ALSA controls, and reusable playback pipelines.
  • Adds RT722 routing for PCM audio and a separate spatial-pose metadata stream.
  • Registers PTL/WCL development targets, including a WCL RT722 alias.
File Description
tools/​topology/​topology2/​platform/​intel/​sdw-jack-resonance.conf Adds SoundWire jack playback and dual-input audio/metadata routing.
tools/​topology/​topology2/​include/​pipelines/​cavs/​resonance-playback.conf Defines a copier-based spatializer pipeline for nocodec playback.
tools/​topology/​topology2/​include/​pipelines/​cavs/​host-copier-resonance-gain-mixin-playback.conf Adds a host-to-mixer playback pipeline with Resonance processing.
tools/​topology/​topology2/​include/​components/​resonance-audio.conf Defines the widget, controls, formats, and resource requirements.
tools/​topology/​topology2/​development/​tplg-targets.cmake Registers nocodec and RT722 development targets and the WCL alias.
tools/​topology/​topology2/​development/​cavs-nocodec-resonance.conf Connects spatialized playback to a stereo SSP output.
tools/​topology/​topology2/​cavs-sdw.conf Adds class includes and the Resonance jack-pipeline selection.

Review effort: Balanced

]
}

resonance-audio."1" {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 54550a1: removed default format arrays from Class.Widget.resonance-audio and Class.Pipeline.host-copier-resonance-gain-mixin-playback's resonance-audio widget (so alsatplg does not append stale inherited class arrays), and configured resonance-playback resonance-audio.1 with explicit 2 inputs (2ch/6ch S16) and a single 16/16 stereo output matching module-copier.2. Verified via tplgparse: NUM_IN=[2] (entries=2), NUM_OUT=[1] (entries=1).

Comment on lines +66 to +67
num_input_audio_formats 5
Object.Base.input_audio_format [

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 54550a1: expanded the PCM_FORMAT_ALL=true branch in sdw-jack-resonance.conf across 2ch, 4ch, and 6ch layouts (15 input formats total matching the 5 sample types and output capabilities), and removed the duplicated 32-bit stereo output entry on resonance-audio.1. Verified PCM_FORMAT_ALL=true builds with NUM_IN=[15] and 0 errors in tplg_validate.py.

Address Topology2 review feedback:
- Clear default input/output_audio_format arrays from Class.Widget.resonance-audio and Class.Pipeline.host-copier-resonance-gain-mixin-playback so alsatplg does not append stale class formats to per-pipeline/per-instance overrides
- Override resonance-playback resonance-audio.1 output_audio_format to single 16-bit 2ch stereo matching module-copier.2 so 6ch 5.1 nocodec streams prepare cleanly
- Expand PCM_FORMAT_ALL=true input_audio_format entries in sdw-jack-resonance.conf across 2ch, 4ch, and 6ch channel maps (15 formats total) matching the false branch and output capabilities
- Remove duplicated 32-bit stereo output entry on resonance-audio.1 in sdw-jack-resonance.conf

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@lgirdwood

Copy link
Copy Markdown
Member Author

Addressed all Copilot code review comments (commit 54550a1b1):

  • Cleared default format arrays from Class.Widget.resonance-audio and Class.Pipeline.host-copier-resonance-gain-mixin-playback's resonance-audio widget so alsatplg does not append inherited arrays to pipeline/instance overrides.
  • Set resonance-playback resonance-audio.1 to 2 inputs (2ch/6ch S16) and a single 16/16 stereo output matching module-copier.2 (verified NUM_IN=[2] (entries=2), NUM_OUT=[1] (entries=1)).
  • Expanded PCM_FORMAT_ALL=true host input_audio_format in sdw-jack-resonance.conf across 2ch/4ch/6ch layouts (NUM_IN=[15], 0 errors in tplg_validate.py) and removed the duplicate 32-bit stereo output entry.
  • Verified sof-ptl-rt722-4ch-resonance, sof-wcl-rt722-4ch-resonance, sof-ptl-nocodec-resonance, sof-wcl-nocodec-resonance, sof-ptl-rt722-4ch, and sof-ptl-rt722-4ch-bt all compile and validate with 0 errors, and verified live HDA Analog playback + Resonance Audio kcontrols on Damsel Fly (PTL / ALC888-VD).

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.

3 participants