The SOF ALSA plugin allows SOF topologies to be run on the host. The plugin
is still WIP with many rough edges that need refined before production
deployment, however the plugin is usable today as a rapid development
framework for SOF infrastructure and processing.
Features that are function in the current implementation
* aplay & arecord usage working today
* modules are loaded as SO shared libraries.
* topology is parsed by the plugin and pipelines associated with the requested PCM ID are loaded
* pipelines run as individual userspace threads
* pipelines can be pinned to efficency cores
* pipelines can use realtime priority.
* alsa sink and alsa source modules available.
* pipelines can block (non blocking and mmap todo)
* 16-bit playback and capture support. Other formats to be added soon
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Update the struct tplg_comp_info to add some new fields needed for
parsing module information for IPC4. Also, introduce a couple of new
structures to save the pipeline info and fix the path to the peak_volum
header.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the posix headers for use with the SOF ALSA plugin.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Parse the PCM headers and save the PCM info along with the host
component associated with the PCM.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Extend the definitions for struct tplg_context and struct tplg_comp_info
to include the fields to parse the ipc_payload and audio format
information from topology.
Also, add the logic for parsing the input/output audio formats from the
topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Abstract the topology APIs to provide support for other IPC ABIs and
further simplify the codebase. Makse sure all public APIs have the tplg
prefix and make sure private APIs are in the correct places.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This patch adds simplified linux/types.h into testbench headers
to enable include of ALSA asoc.h to build without other difficult
kernel headers content.
The CMakeLists.txt files are updated to make a build time copy of
asoc.h to subdirectory include of the build directories. The new
directory is added to headers path.
This change avoids build fail with xcc toolchain that can't use the
gcc toolchain headers from the system where the ALSA headers are
located.
Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The xt-xcc compiler RG-2017.8 does not support -Wimplicit-fallthrough
option. Add to CMakeLists.txt files check for the option and use it if
it is supported.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
No functional runtime change, but changes to rtos partitioning and the
layout of headers .
This patch creates RTOS specifc header paths and updates spinlock.h
and kernel.h to show the new usage. Other headers will incrementally follow.
It reuses the current zephyr topleve directory and creates a new
toplevel xtos directory for xtos specific files.
Due to the mixing of RTOS, driver and library headers at the top level include
directory it was necessary to create rtos specific header directories i.e.
src/include/rtos-xtos
src/include/rtos-zephyr
These RTOS include directories will eventually contain RTOS specific headers
whilst common logic and structures will be placed in non RTOS directories.
This will also mean
"#include <sof/spinlock.h>"
will become
"#include <rtos/spinlock.h>"
and will allow easier visualisation of where and why RTOS headers are being used.
This will help to eliminate cross usage of headers between RTOSes.
Subsequqnt patches will move more headers and rtos specific wrppaer
source files into rtos specific locations.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This is another tplg_parser and testbench update on the road to provide
further flexibility around supporting new modules and IPC versions.
There will more to follow.
Changes are mostly mechanical code movements i.e. moving testbench related code
to the testbench, splitting the files into per module/component files and
making some functions static and public.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
No functional change.
Move some common testbench code into the topology parser and group
feature parsing by file name.
Add a tplg_ prefix to external APIs without a prefix, others with an
existing prefix to follow this change.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Without CMP0079 we cannot conditionally include libraries against SOF in
sub directories without seriously restructuring the project. This is
because the old policy requires the link target must be created in the
same folder. This does not work well from a configuration standpoint for
3P audio libraries trying to keep their config in src/audio/*. Rather
than enable the policy, lets simply upgrade since 3.13 is widely
available.
With this upgrade we can also remove the two version dependent checks at
the top of our scripts.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
We need clang support for the testbench therefore the following changes
are needed
remove -ftree-vectorizer-verbose since its deprecated in gcc and not
supported in clang
remove =3 from -Wimplicit-fallthrough=3 since 3 is the default level
anyways
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This patch adds compilation with -g. Optimization -O was added to get
optimization that preserves sane debugging with gdb. This component
is not critical for speed in simulation.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The topology parser in testbench can be re-used for
the other applications like the fuzzer. In order to
accomplish this, this commit does the following:
1. Separate the topology parser into a separate project
(tplg_parser) which implements the callbacks for parsing
all the components in topology.
2. Add support for parsing new components such as host
pcm, dai and mixer
3. Include the topology parser as an external project
in the testbench.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>