Skip to content

[FEATURE][meta] Use Zephyr native interfaces #5794

@kv2019i

Description

@kv2019i

This is a meta issue to track work to move SOF code to use Zephyr native interfaces. The task is two-fold:

  1. move (audio) application code to use native Zephyr interfaces (this is the primary focus, affects all SOF users and configurations)
  2. move driver and hw platform code to Zephyr (this is secondary as new platforms will be Zephyr-only -- current we have some Intel and IMX platforms that support both XTOS and Zephyr and separate set of cleanups are needed for these platforms)

Change in brief: SOF application code will transition to Zephyr application interfaces. Change is done incrementally so that build with the "in-tree XTOS" continuous to work.

Guard rails:

  • code in sof/src/audio is the primary application code, should only use Zephyr interfaces
  • drivers in sof/src/drivers should be moved to Zephyr upstream
  • arch code in sof/src/arch is not used for SOF Zephyr builds, this is only for XTOS builds
  • rtos interface provided via <rtos/foo.h> interface with implmentation in
    - sof/zephyr/include/rtos/
    - sof/xtos/include/rtos/

Transition tools:

  • sof/zephyr/wrapper.c - xtos-to-zephyr wrapping that was used for initial introduction of Zephyr. this will grow smaller and smaller and eventually be removed
  • sof/src/arch/xtos-wrapper/ - zephyr-to-xtos wrapper used to maintain capability to build SOF app code on XTOS
  • when application code moves to use native Zephyr interface, XTOS fallback should be added in src/xtos/include/ (example xtos/include/rtos/spinlock.h )

Ongoing work for generic code (affects all SOF configurations):

Ongoing work for SOF platform layer (affects all SOF configurations):

Ongoing work for specific platforms (Intel cAVS, NXP IMX)

From @dbaluta - For NXP we have on roadmap to port to Zephyr:

  • DAIs (SAI and ESAI);
  • EDMA;
  • SDMA;
  • Interrupt controller (irq steer).

Metadata

Metadata

Assignees

Labels

ZephyrIssues only observed with Zephyr integratedenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions