To make sure we are using max 1 octave step, we need to use noct+1 to
get noct sections from logspace.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add pipe for Waves codec playback
Add pipe for Waves codec demux playback
Modify sof-tgl-max98357a-rt5682 topology so Waves codec can be added
to playback and headphones in case 'WAVES' is defined
Signed-off-by: Oleksandr Strelchenko <oleksandr.strelchenko@waves.com>
The IPC handler does this for us already on any IPC failure.
Redundant code so remove it.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Split out some IPC functions to separate files so that IPC layer
can support more MAJOR ABI versions. Rename handler.c to align with
the IPC MAJOR it supports.
No code changes. One static function became public.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
add Waves MaxxEffect API definition.
API is required to build SOF with Waves codec.
Signed-off-by: Oleksandr Strelchenko <oleksandr.strelchenko@waves.com>
This patch adds IIR support in the tgl-max98373-rt5682 topology to allow
the frequency response of the headset output to be tuned.
Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
Each codec family is now having its own UUID. We keep the old
codec_adapter UUID to be used with Cadence family codecs.
All other codec families (e.g passthrough, waves) needs to use new
uuids.
The topology files will just need to define CA_UID macro.
e.g for waves codec, topology file should contain:
DECLARE_SOF_RT_UUID("Waves codec", waves_codec_uuid, 0xd944281a, 0xafe9,
0x4695, 0xa0, 0x43, 0xd7, 0xf6, 0x2b, 0x89, 0x53, 0x8e);
define(`CA_UUID', cadence_codec_uuid)
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit strips the codec adapter as it is more of a
library/layer for codecs to simplify their interface against rather than a
component in and of itself. This gives each codec its own UUID solving the
ID problem while opening an opertunity to register codecs directly for
future multiplexing capabilities.
Old UUID adapter used for codec_adapter is now used for Cadence codecs,
and we add new UUIDs for passthrough and Waves codecs.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
In order to act as a stand in layer for codecs going forward we need to
not log using our comp_driver as that will be removed in the future.
Instead we need to log using the context of comp_dev.
This commit also reduces the verbosity of a lot of the traces and
increases a few.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
local buffer is used to store the output of processing function.
So, we need to compute its size based on codec_adapter output buffer
not input buffer.
For non-compressed processing the current code works because input
and output buffer have equal sizes.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
processed field keeps the total number of processed bytes
from the input buffer. We need to update this field also
for the process_init operation.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This patch adds two more code owners of codec_adapter.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Useful error messages when forgetting to use "sudo" or to change
permissions in udev.
Some places were printing the errno decimal. Others no specific error
at all.
Sample outputs:
error: Unable to open version file /sys/kernel/debug/sof/fw_version: \
Permission denied
error: Unable to open version file /sys/kernel/debug/sof/fw_version: \
No such file or directory
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The pipeline position metadata lookup table is only used by the graph
code so move it there.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Statically defined pipelines should be stitched into the FW image as
topology data rather than coded in C. This code was never used after
initial development so can be removed.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Split the pipeline logic up into stream, params, graph, scheduling and xrun
so that it easier to follow and understand. This is to help on the TSC work
to integrate the codec adaptor into core logic.
This PR is all mechanical code moves. There are NO functional changes. Some
function that were static are now public.
Followup patches will add more documentation updates alongside.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
A side effect of the pipeline splitting work means that testbench is
not building. Provide a temporary fix until Zephyr native APIs are used.
/component.c.o -c /home/lrg/work/sof/sof/src/audio/component.c
/home/lrg/work/sof/sof/src/audio/component.c: In function ‘get_drv’:
/home/lrg/work/sof/sof/src/audio/component.c:41:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized]
41 | irq_local_disable(flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/lrg/work/sof/sof/src/audio/component.c: In function ‘comp_register’:
/home/lrg/work/sof/sof/src/audio/component.c:150:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized]
150 | irq_local_disable(flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/lrg/work/sof/sof/src/audio/component.c: In function ‘comp_unregister’:
/home/lrg/work/sof/sof/src/audio/component.c:163:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized]
163 | irq_local_disable(flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
We are only setting the parameters on the allocation of the local buffer
which means if the params change on the next run it will not change and
break things.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
After commit ed027d045b ("codec_adapter: Differentiate between consumed/produced bytes")
the codec adapter expects codecs to update consumed / produced bytes separately.
This fixes passthrough and waves codecs.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
commit e50ae6be8c ("codec_adapter: Initialize processing") uses
the generic function codec_init_process which in turns needs a callback
for each type of codec.
Thus waves and passthrough are broken because there is no .init_process
callback provided. Fix this now.
Notice that the callback is mostly empty, the only thing that needs
to be done is to set codec->cpd.init_done to true.
Fixes: e50ae6be8c ("codec_adapter: Initialize processing")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
init_process API is used to initialize the processing phase.
(e.g for Cadence: search for valid header, decode header in order
to get parameters).
init_process needs to have access to the input frames so it will be
called by codec adapter copy() function.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
In this way we avoid crashing the SOF FW and warn the user that
the callback is missing from the implementation.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
In an ideal world, every CI engine records and shares the most important
CI information:
- current date and time in a well identified timezone
- git version of the pull request
- git version of the moving branch the PR is being merged with
In the real world we have multiple CI solutions and they unfortunately
cannot not all be trusted to perform their most basic job
correctly. Fortunately, they all make at least build logs available so
these very few lines of code adding very few lines of output cost near
zero extra build time and solve the problem once for all. I feel stupid
I didn't do this sooner, this would have saved me hours and hours in
vain requests and discussions and in trying to puzzle that information
together.
Sample output:
-- Preparing Xtensa toolchain
version.cmake starting SOF build at 2021-03-31T18:09:46Z UTC
Building git commit with parent(s):
150fd1e4c968 4249bdb1b305 [other parent if merge] (HEAD -> main) cmake: ...
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-174-g150fd1e4c968-dirty / 150fd1e4c968
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
oops, forgot to update interface so build was silently not linking the
passthrough interface to the adapter
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Required by #3459 / #3975 "elfsize" proof of concept and probably by
other things too in the future - we use both ELF and Python
everywhere; it's surprising they haven't met each other yet.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add some useful information logs about the task scheduling point with
ll_scheduler, which will help to capture logs once we hit scheduling
issue on some specific task.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Request for owner has gone unacknowledged, ToT adapter is broken
suggesting we likely need additional reviewers given we have no existing
code owner.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
There could be some codecs which require 0 byte library configure, e.g.
the passthrough one, change to make this possible.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
For at least two reasons:
- exposes sneaky change(s) performed by automation if/when any
- solves the mystery of the Source content hash (printed on the next
line) changing while the git version does not.
Example, at https://sof-ci.01.org/sofpr/PR3941/build8429/build/bdw_gcc.txt
-- Found Git: /usr/bin/git (found version "2.17.1")
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-151-g023c4abacde1 / 023c4abac
-- Source content hash: 91f261ea
whereas at https://github.com/thesofproject/sof/runs/2166298087,
xtensa-build-all:
-- Found Git: /usr/bin/git (found version "2.17.1")
-- GIT_TAG / GIT_LOG_HASH : v1.7-rc1-151-g023c4abacde1 / 023c4abac
-- Source content hash: 67f31697
Signed-off-by: Marc Herbert <marc.herbert@intel.com>