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

The release of the Sound Open Firmware 2.2 (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.2 is available, a set of open firmware for DSP chips
Sound Open Firmware 2.2 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.2 is available, a set of open firmware for DSP chips

Key innovations in Sound Open Firmware 2.2:

  • The component for working with external codec libraries has been renamed from codec_adapter to module_adapter and brought into line with the API of signal processing modules, which will allow you to use code from Windows handlers without changing it.
  • The Frag API has been deprecated, improving the performance of each component by approximately 1 MCPS (million cycles per second).
  • Added the Frame API, which performs forward calculation of block sizes for handlers based on SIMD and non-SIMD instructions. Optimization made it possible to increase performance by approximately 0.25 MCPS.
  • Added a new mixer with HiFi4 support to reduce or increase the number of audio channels in a stream.
  • The possibilities of using Zephyr RTOS instead of XTOS as the basis for firmware for the environment have been expanded. Using Zephyr can significantly simplify and reduce the code of Sound Open Firmware applications. The new version adds support for native Zephyr APIs for logging and introducing delays. Full native support for Zephyr is expected in the next release.
  • The ability to use the IPC4 protocol for capturing and playing sound on devices running Windows has been expanded (IPC4 support allows Windows to interact with DSPs based on Sound Open Firmware without using a specific driver).

Source: opennet.ru

Add a comment