This will allow topologies to use different size dai periods.
Fixes: 1280987999 ("topology: use DAI_PERIODS in calculation of DAI buffer size")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
More robust support for "manual" installations.
Also rephrase usage string to remove a single quote breaking
the shell parser in one editor I use (sorry).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Previously we had a channel map macro only in general dmic topology. As
the pipelines used with dmic are also used with other topologies the
dmic specific macro does not work anymore. Thus define generic macro in
pipeline.m4 that defaults to stereo channel map. This can be overridden
in topologies as shown in general dmic.
fixes: #4136
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This reverts commit 2c69afc5fd.
The dynamic pipeline feature is broken with PA enabled. Revert
this change until the issue is sorted.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit consists of files for adding IGO_NR component in arbitrary
topology. The proprietary static library shall be released by intelliGo
via private channel upon request.
Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
Notifier data has to be per-core and its allocation is
performed in init_system_notify(), no need to also do it in
architecture code.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
sof_main() doesn't run on secondary cores. Instead we provide
a new function, that initialises a dummy thread, runs SOF
initialisation by calling secondary_core_init() and switches
over to the dummy thread.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When running on Zephyr, timer domain and EDF scheduling is
implemented by per-core work queues. Make sure they only run
on designated cores.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Pcm converter function definitions are under same format configs as all
other component format configs. This creates problems if you want to for
example configure whole pipeline to 16 bits but your dai needs to be
fixed in other format. Thus duplicate and rename the format configs for
pcm converter for fine grained tuning.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
By default, the Zephyr build does not log its version. The fix has
already been submitted at
https://github.com/zephyrproject-rtos/zephyr/pull/34842 however:
- 34842 may take some time. Zephyr reviewers are even busier than the
SOF reviewer.
- 34842 could even be rejected
- 34842 will at best log the SHA1 and no context. This is more verbose
and future-proof because it supports more complex situations like
testing a pull/12345/merge
As seen in (unrelated) PR #4123, we need Zephyr git versions NOW.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes 33c5f5d38e ("xtensa-build-zephyr: do not clone a second version of
sof.git")
The very first version of this test was checking whether the rimage/
directory exists, which proves nothing. So I switched to
rimage/CMakelists.txt but forgot change the `test` flag.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch adds development topology to run ASRC playback and
capture via SSP port to headset plug. We don't have many topologies
to test ASRC in current development devices so this is useful
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Calling codec_process() multiple times in a loop limits the minimum
pipeline period we can choose.
For example with AAC one codec_process() can take up to 0.7ms which
means that we cannot reliable set pipeline period to 1ms on i.MX where
DSP has only 1 core.
In order to avoid this and to simplify the code remove the processing
loop hence each codec_adapter_copy() call will call exactly once the
codec_process() function.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Where possible container_of() should always be used instead of
direct type-casting.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Even when addressing 16-bit data the register number remains
the same - 32-bit.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Now that schedule_edf() is just a static function, use a
proper type for its parameter.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove a log-module declaration to eliminate unused static
variables until we return to using the LOH_* Zephyr API.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Move logging code and static data to platform/library and
declare a LOG module properly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In both native and Zephyr builds schedule_edf_ops and
schedule_ll_ops are only used in one file each, make them
static.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Undefining and re-defining MIN/MAX when already defined is
convoluted. Simply define them if not __ZEPHYR__ instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
If processing format is restricted from Kconfig there's a possibility of
pcm_converter not having proper conversion function. Thus check for NULL
in dai to avoid crashes.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add support for cs42l42 running on GLK boards. We add a 10 ms BCLK
delay to the SSP_CONFIG_DATA of SSP2 since the codec PLL is locking on
BCLK. Without the delay, there could be noise on TX path.
Signed-off-by: Brent Lu <brent.lu@intel.com>
we are building unused functions if we only enable specific formats,
lets put them with the functions that use them
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
For compatibility with Zephyr, MIN and MAX macros are downgraded to the
basic, compile-time, standard compliant and unsafe implementation.
This means the code will now be the same whether it's compiled with Zephyr
versus not.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/33567 which
means it's now possible to use MIN() or MAX() in either Zephyr's
BUILD_ASSERT() or in SOF's equivalent STATIC_ASSERT() or in C11's
_Static_assert()
This implementation is unsafe because it can evaluate its arguments
twice which is obviously not desired when the argument has side-effects:
https://wiki.sei.cmu.edu/confluence/display/c/PRE31-C.+Avoid+side+effects+in+arguments+to+unsafe+macros
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
For consistency with Zephyr, MIN and MAX macros are "downgraded" to the
basic, compile-time, standard compliant and unsafe implementation that
Zephyr uses. "Unsafe" because it can evaluate its arguments twice which
is obviously not desired when the argument has side-effects:
https://wiki.sei.cmu.edu/confluence/display/c/PRE31-C.+Avoid+side+effects+in+arguments+to+unsafe+macros
I reviewed every single invocation of MIN() and MAX() and found no
increment or assignment but I found a number of function calls in their
arguments. This commit removes them all. Note I did _not_ check for
volatile variables.
Most of these functions do not appear to have side-effects _but_ it's
much simpler and faster for the reader or static analyzer not to even
have to wonder about the possibility of side-effects and it's also more
future-proof; no risk of a function accidentally gaining side effects.
Note the following files are not compiled in the default configurations
and the changes in them were NOT compile-tested locally:
src/audio/codec_adapter/codec_adapter.c
src/audio/drc/drc_generic.c
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Each type of codec will have its own config option that will point
to the path in build filesystem where library binary is located.
This will make compiling Cadence libraries binaries more flexible.
The libraries will be statically linked with SOF firmware.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This patch simplifies codec adapter state machine by removing
redundant state "ca_state" plus extending the other one with
new states like IDLE or PROCESSING.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch allows to apply runtime configuration as soon
as codec got created. This is too avoid high load spikes
which may happen when whole, large config blob is being
applied along side codec processing.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Thanks to this change we reset all params to default values
on start, and reset only. The later is because on reset we
call init again due to lack of explicit reset API for cadence
codecs. Now we can apply runtime params earlier, during prepare or
as soon as codec has been instantiated and they won't be reset.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
looks like with the new ipc mechanisms we changed the function signature
and moved casting the message from platform code to ipc code.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This script lives in a sof.git/ clone yet it was systematically cloning
a second sof.git/. Besides the obvious confusion and risk of editing the
wrong files, this meant it was not possible to build code that has not
been merged yet! This was a problem for both CI and developers. Fixed by
using symbolic links to ourselves instead.
Note it is _still_ possible to build from another sof.git clone if
desired, however this script will never git re-clone a second sof.git
itself, that second clone has to be created (e.g.: by west) before this
script runs.
When cloning a brand new zephyrproject, use a shallow zephyr clone and
download only the two zephyr modules we actually use. This speeds up
automation considerably and makes it much faster for non-Zephyr
developers to reproduce Zephyr issues. Developers can always git
unshallow and west update once if they want to.
Rename the default west top to "zephyrproject" to not just match the
zephyr documentation but to also avoid creating a double zephyr/zephyr/
directory.
See the new print_usage() for a few more implementation details.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It still looks smart but the \n addition compared to the original
version in xtensa-build-all.sh broke it for more advanced cases:
die '%s %d' str 5
-bash ERROR: -bash: printf: 5\n: invalid number
As reported by shellcheck. shellcheck saves lives.
In scripts/xtensa-build-zephyr.sh line 22:
>&2 printf "$@\n"
^-- SC2145: Argument mixes string and array.
Use * or separate argument.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
... because the latter does not print on stderr when not found; so IDEs
and CIs don't display this as a warning.
Also remove the "... and ignore set -e" comment that made sense at the
time of commit cad86dc340 ("scripts: xtensa-build: fix alias detection
for bxt/apl gcc") but not anymore.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>