|
|
(75 intermediate revisions by 2 users not shown) |
Line 2: |
Line 2: |
| == '''Sound Open Firmware''' == | | == '''Sound Open Firmware''' == |
|
| |
|
| Sound Open Firmware is an open source audio DSP firmware and SDK intended to provide a generic audio firmware infrastructure and development tools to the community. The firmware is BSD licensed and is platform and architecture agnostic. The SDK is also open source and provides a toolchain, debugger, emulator and firmware image creation tools. | | Sound Open Firmware is an open source audio DSP firmware and SDK intended to provide a generic audio firmware infrastructure and development tools to the community. The firmware is BSD licensed and is platform and architecture independent. The SDK is also open source and provides a toolchain, debugger, emulator and firmware image creation tools. |
|
| |
|
| The firmware and SDK currently support the Cadence Xtensa architecture and the Intel Baytrail and Cherrytrail platforms. The current firmware audio features include multiple PCMs with gain controls and mixers. | | The firmware and SDK are intended for developers who are interested in audio or signal processing on modern DSPs or for developers who are interested in micro kernels running on small but |
| | powerful processors. |
|
| |
|
| There is a developer mailing list at http://alsa-project.org/mailman/listinfo/sound-open-firmware.
| | SOF currently targets the Cadence xtensa architecture DSPs found on some Intel and NXP based devices like the Minnowboard MAX. SOF is modular and generic so can be ported to other DSP architectures or host platforms. |
|
| |
|
| This page is currently work in progress so please expect frequent updates and corrections.
| | Please see https://thesofproject.github.io/latest/index.html for full details. |
| | |
| == '''Installing the SDK''' ==
| |
| | |
| '''1. Install the firmware image tools.'''
| |
| | |
| These tools are used to convert ELF binaries into the file format used by the kernel drivers when loading the firmware.
| |
| | |
| git clone git://git.alsa-project.org:sound-open-firmware-tools.git soft.git
| |
| cd soft.git
| |
| ./autogen.sh
| |
| ./configure
| |
| make
| |
| make install
| |
| | |
| This will install the 'rimage' and 'rmbox' tools which are used for firmware image creation and firmware debugging respectively.
| |
| | |
| '''2. Build and install the GCC xtensa cross compiler toolchain using Crosstool-NG.'''
| |
| | |
| A cross toolchain is required to build firmware binaries on x86. Please note that the xtensa GCC compiler does not build optmised Xtensa binaries (i.e. no automatic SIMD or media instructions generated without hand coding assembler). Cadence does provide a free download of their optimising compiler toolchain for the Baytrail target here (todo add link). A modified crosstool-NG is used to build the cross toolchain.
| |
| | |
| git clone https://github.com/01org/osadsp-crosstool-ng.git ct-ng.git
| |
| cd ct-ng.git
| |
| | |
| Build crosstool-NG
| |
| | |
| ./bootstrap
| |
| ./configure --prefix=`pwd`
| |
| make
| |
| make install
| |
| | |
| Now build the xtensa cross compiler.
| |
| | |
| ./ct-ng xtensa-byt-elf
| |
| ./ct-ng build
| |
| | |
| Finally add the Xtensa cross compiler to your PATH.
| |
| | |
| PATH=$PWD/builds/xtensa-byt-elf/bin:$PATH
| |
| | |
| Todo: We are missing some headers like stdint.h from cross gcc tarball. Add note on adding them.
| |
| | |
| '''3. Get the firmware source code.'''
| |
| | |
| The firmware source code is hosted using git on alsa-project.org
| |
| | |
| git clone git://git.alsa-project.org:sound-open-firmware.git sof.git
| |
| cd sof.git
| |
| ./configure --with-arch=xtensa --with-platform=baytrail --with-tool-dir=~/path/to/xtensa/gcc/xtensa-byt-elf --host=xtensa-byt-elf
| |
| make
| |
| make bin
| |
| | |
| This will create a binary firmware image in src/arch/xtensa/ called reef-byt.ri. This image can now be copied to /lib/firmware/intel where it will be loaded by the Baytrail audio DSP driver.
| |
| | |
| '''4. Get the Linux driver updates.'''
| |
| | |
| This firmware requires some driver updates and they can be found here :-
| |
| | |
| git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc.git #topic/reef-v4.8
| |
| | |
| TODO: add instructions to enable the correct kconfig options
| |
| | |
| | |
| '''5. Optional. Build the Qemu DSP emulator from source.'''
| |
| | |
| Qemu needs some extra patches to support heterogeneous virtualization of the guest x86 OS and xtensa firmware. We are using the latest qemu-2.7 release with the support for heterogeneous virtualization and audio DSP hardware on top.
| |
| | |
| sudo apt-get install libgtk-3-dev libsdl-dev libspice-protocol-dev libspice-server-dev libusb-1.0-0-dev libusbredirhost-dev libtool-bin iasl valgrind texinfo virt-manager kvm libvirt-bin virtinst
| |
| git clone https://github.com/01org/osadsp-qemu.git
| |
| cd osadsp-qemu.git
| |
| ./configure --prefix=. --target-list=xtensa-softmmu,x86_64-softmmu --enable-gtk --enable-sdl --enable-spice --audio-drv-list=alsa --enable-libusb --enable-usb-redir --enable-coroutine-pool --disable-opengl --enable-fdt
| |
| make
| |
| | |
| Please do not install this version of Qemu as it will overwrite your distro version of Qemu.
| |
| | |
| == Running the Firmware ==
| |
| | |
| TODO
| |
| | |
| == Firmware Architecture ==
| |
| | |
| TODO
| |
| | |
| == Driver Architecture ==
| |
| | |
| TODO
| |
| | |
| == Using the Qemu DSP emulator ==
| |
| | |
| TODO
| |
| | |
| == Debugging Firmware ==
| |
| | |
| TODO
| |
| | |
| == FAQ ==
| |
| | |
| '''What architectures are supported'''
| |
| | |
| '''What platforms are supported'''
| |
| | |
| '''How do I add support for architecture X'''
| |
| | |
| '''How do I add support for platform X'''
| |
| | |
| '''How do I port to other OSes'''
| |
| | |
| '''What audio components are supported'''
| |
| | |
| '''How do I create my own pipelines'''
| |
Sound Open Firmware
Sound Open Firmware is an open source audio DSP firmware and SDK intended to provide a generic audio firmware infrastructure and development tools to the community. The firmware is BSD licensed and is platform and architecture independent. The SDK is also open source and provides a toolchain, debugger, emulator and firmware image creation tools.
The firmware and SDK are intended for developers who are interested in audio or signal processing on modern DSPs or for developers who are interested in micro kernels running on small but
powerful processors.
SOF currently targets the Cadence xtensa architecture DSPs found on some Intel and NXP based devices like the Minnowboard MAX. SOF is modular and generic so can be ported to other DSP architectures or host platforms.
Please see https://thesofproject.github.io/latest/index.html for full details.