Sound Open Firmware 2.0 is available, a set of open firmware for DSP chips

The release of the Sound Open Firmware 2.0 (SOF) project, originally created by Intel to abandon the practice of supplying closed firmware for DSP chips related to sound processing, has been published. Subsequently, the project was transferred under the wing of the Linux Foundation and is now being developed with the involvement of the community and with the participation of AMD, Google and NXP. The project develops an SDK to simplify firmware development, a sound driver for the Linux kernel and a set of ready-made firmware for various DSP chips, for which, among other things, digitally signed binary assemblies are generated. The firmware code is written in C language with assembler inserts and is distributed under the BSD license.

Due to its modular structure, Sound Open Firmware can be ported to various DSP architectures and hardware platforms. For example, among the supported platforms, support for various Intel (Broadwell, Icelake, Tigerlake, Alderlake, etc.), Mediatek (mt8195), NXP (i.MX8 *) and AMD (Renoir) chips equipped with DSP based on Xtensa HiFi architectures is declared. 2, 3 and 4. A special emulator or QEMU can be used during development. The use of open firmware for DSP allows you to more quickly fix and diagnose problems in the firmware, and also gives users the opportunity to independently adapt the firmware to their needs, make specific optimizations and create lightweight firmware versions that contain only the functionality needed in the product.

The project provides a framework for developing, optimizing and testing solutions related to sound processing, as well as creating drivers and programs for interacting with the DSP. The package includes firmware implementations, firmware testing tools, utilities for converting ELF files into firmware images suitable for installation on hardware, debugging tools, a DSP emulator, a host platform emulator (based on QEMU), tools for tracing firmware, scripts for MATLAB/Octave for fine-tuning coefficients for audio components, applications for organizing interaction and data exchange with firmware, ready-made examples of audio processing topologies.

Sound Open Firmware 2.0 is available, a set of open firmware for DSP chips
Sound Open Firmware 2.0 is available, a set of open firmware for DSP chips

The project also develops a universal driver that can be used with devices using Sound Open Firmware based firmware. The driver has already been included in the core Linux kernel since release 5.2 and is available under a dual license - BSD and GPLv2. The driver is responsible for loading firmware into the DSP memory, loading audio topologies into the DSP, organizing the audio device (responsible for calling DSP functions from applications), and providing application access points to audio data. The driver also provides an IPC mechanism for communication between the host system and the DSP, and a layer for accessing the hardware capabilities of the DSP through a generic API. A DSP with Sound Open Firmware looks to applications like a regular ALSA device, which can be controlled using a standard software interface.

Sound Open Firmware 2.0 is available, a set of open firmware for DSP chips

Key innovations in Sound Open Firmware 2.0:

  • The performance of audio data copying functions has been significantly improved and the number of memory accesses has been reduced. In some audio processing scenarios, there is a reduction in load of up to 40% while maintaining the same sound quality.
  • Improved stability on Intel multi-core platforms (cAVS), including support for running handlers on any DSP core.
  • For the Apollo Lake (APL) platform, the Zephyr RTOS environment is used as the basis for the firmware instead of XTOS. Zephyr's OS integration level has reached feature parity for some Intel platforms. Using Zephyr allows you to significantly simplify and reduce the code of Sound Open Firmware applications.
  • Implemented the ability to use the IPC4 protocol for basic support for capturing and playing sound on some Tiger Lake (TGL) devices with Windows OS (IPC4 support allows Windows to interact with DSPs based on Sound Open Firmware without using a specific driver).

Source: opennet.ru

Add a comment