Skip to content

Conversation

@SurajSonawane2415
Copy link
Contributor

@SurajSonawane2415 SurajSonawane2415 commented Sep 1, 2025

This PR is part of the GSoC 2025 Project: Add Virtual DAI Component to SOF and is based on SOF Issue #9349.

We introduce a new SOF_DAI_VIRTUAL type and its associated support to enable audio pipelines that do not rely on physical DAI hardware. This is useful in the following scenarios:

  • Debugging and rapid prototyping: Quickly create and test audio pipelines without needing actual hardware.
  • Software loopback preparation: Lays the groundwork for a memory-to-memory audio pipeline within SOF.

Motivation

  • Debugging & prototyping: Create/test pipelines without hardware.
  • Loopback preparation: Foundation for memory-to-memory audio pipelines.

Key Changes

  • Add SOF_DAI_VIRTUAL type and config struct.
  • Define topology tokens for Virtual DAI.
  • Extend IPC3 topology parsing for Virtual DAI.
  • Add Virtual DAI entry in i.MX8M SOF backend.
  • Update sof_ipc3_pcm_dai_link_fixup to handle Virtual DAI.

Tested above changes on IMX8MP EVK board

Logs:

[   10.300681] sof-audio-of-imx8m 3b6e8000.dsp: Topology: ABI 3:29:1 Kernel ABI 3:23:1
[   10.300750] sof-audio-of-imx8m 3b6e8000.dsp: DAI connect: widget name=DAI_VIRTUAL7.OUT, sname=NoCodec-0, id=27
[   10.300758] sof-audio-of-imx8m 3b6e8000.dsp: DAI connect: expect id dai_in=27 or dai_out=28
[   10.300763] sof-audio-of-imx8m 3b6e8000.dsp: DAI connect: checking stream_name='NoCodec-0' for link='NoCodec-0'
[   10.300768] sof-audio-of-imx8m 3b6e8000.dsp: DAI connect: MATCH found for NoCodec-0
[   10.300773] sof-audio-of-imx8m 3b6e8000.dsp: DAI connect: widget DAI_VIRTUAL7.OUT set on CPU DAI virtual_dai (stream 0)
[   10.300778] sof-audio-of-imx8m 3b6e8000.dsp: tplg: connected widget DAI_VIRTUAL7.OUT -> DAI link NoCodec-0
[   10.300980] sof-nocodec sof-nocodec: ASoC: Parent card not yet available, widget card binding deferred
[   10.300996] sof-audio-of-imx8m 3b6e8000.dsp: tplg: config VIRTUAL_DAI7 fmt 0x1

Related Work

Current Status

  • Verified on i.MX8MP EVK with NoCodec: probe/config/removal working.
  • Playback/capture validation ongoing.
  • emul_dma integrated, but data copy still incomplete.

Future Work

Implement proper playback (log/discard) and capture (zero-filled).

Introduce a new SOF_DAI_VIRTUAL type and associated configuration
to enable audio pipelines without requiring physical DAI hardware.
This provides a foundation for rapid prototyping, debugging, and
future memory-to-memory audio pipelines in SOF.

Signed-off-by: Suraj Sonawane <[email protected]>
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.

1 participant