ternary isn't entirely clear what order happens on the left, add
brackets to clarify. Cppcheck complaint
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Array streams represents streams on "many" side i.e. input
for MUX and output for DEMUX.
For DEMUX each stream has masks array - 1 mask per output
channel. Each mask shows, from which input channel data
should be taken.
This commit reverts "demux" part of commit:
"b1b31e7154a5c159d81459634eabd8013b434181"
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
More specifically replacing sof-bin/go.sh and sof-bin/publish.sh and
also sof/scripts/sof-target-install.sh eventually.
"make install" code has always belonged to source repositories because
developers need to install too and we want everyone to use the same
installers. It's also easier to have all the information in a single
place.
Once the layout in sof-bin mirrors the /lib/firmware/intel layout
exactly, sof-bin does not need any installation code any more.
Mixing source and binaries in the same repo is also a "code smell",
notably because it forces branching them together.
Using a higher level build tool for installation instead of plain
scripts has a few benefits:
- Multiple entry points: easy to invoke (and test) any part of the
installer individually
- ... while invoking dependencies automatically.
- Other features "for free" like:
- errexit
- error messages like "dunno how to build file x"
- commands are logged by default
- Also gets rid of most of the large code duplication in go.sh and
publish.sh, so:
- Enabling or disabling a platform is a 3-character change
- Allows platform selection in local config file (even just one platform)
- Much harder to add inconsistencies
- Much easier to review correctness, for instance no need to
scrutinize every line to see which platforms are aliased.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As reported in #3491, there is confusion between platform names, CPU
names, PCH names, toolchain names, signing schemes and what not. For
instance in "build_apl_gcc/sof-apl.ri", the first "apl" matches the name
of a defconfig file while the second "apl" matches the name of a signing
scheme.
When building out-of-source, there is no reason to vary the filenames of
the output depending on the build configuration, changing the name of
the build directory is enough. This simplifies automation logic
including the next commit that adds a new install/GNUmakefile.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
we have a set of topologies that don't seem aligned with the
mainstream ones.
All these topologies should be given the boot if they are not used.
FIXME: The case of tools/topology/sof-cml-rt5682-kwd.m4 is rather
strange, M4 seems to go in some sort of infinite recursion if
'DMIC16k' is defined.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The macro used DAI link ID when it should have used PCM ID
Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fix macros (capitalized K), use them both for regular and -kpb
capture, fix names
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This problem appeared after renumbering the devices for SoundWire
topologies.
Before this patch, the devices appear as:
pcm=JackIn;id=0;type=playback
pcm=JackOut;id=1;type=capture
pcm=DMIC;id=2;type=capture
pcm=DMIC16kHz;id=3;type=capture
pcm=HDMI 1;id=5;type=playback
pcm=HDMI 2;id=6;type=playback
pcm=HDMI 3;id=7;type=playback
and after:
pcm=JackIn;id=0;type=playback
pcm=JackOut;id=1;type=capture
pcm=HDMI 1;id=5;type=playback
pcm=HDMI 2;id=6;type=playback
pcm=HDMI 3;id=7;type=playback
pcm=DMIC;id=10;type=capture
pcm=DMIC16kHz;id=11;type=capture
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The topologies changed in this patch relied on dailink defaults, and
never defined PCM IDs.
We want dailinks to be defined in callers, so let's remove those
defaults from intel-generic-dmic.m4
To be backwards 'bug-compatible' the PCM ID remains the same as the
dailink, but this is completely arbitrary and might be modified if
needed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
errprint does not stop the compilation as intended, it just prints a
message which is removed by the makefile.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The topology handling requires names to be unique, regardless of
direction. It's an undocumented 'feature' of the ALSA topology parser.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This reverts commit f4c9c28bc5.
This is no longer needed as we removed local copy of rimage from
zephyr/ext.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Reference Kconfig in zephyr module file which is evaluated by Zephyr
directly. This will eliminate the need for including the SOF Kconfig
directly.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
cppcheck was being confused as we were passing in hw_param_ctx which has
linking in the following order hw_param_ctx->data->hw_params.
Cppcheck was being confused as it failed to realize that hw_params was a
writeback method and to be honest the way it was written they way the
structures were linked was hard to see as well. Lets do all the linking
upfront so its easier to read. Cppcheck doesn't seem to complain about
this method so lets use it.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
not sure how this happened but this check is pointless and also results
in a double free, found by cppcheck
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Add macro to allow the use of "BufferedMic" instead of
"DMIC16kHz" in KPB usages.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Confusion between input and output, and PCM name and pipeline ID.
Copy/paste likely here.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This file was used for early enablement of SoundWire on a platform,
before we had support for amplifiers. This is no longer needed, let's
remove it.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add a topology file for Bay Trail boards with a WM5102 codec
connected to SSP0.
These setups works with the standard settings from sof-byt-codec.m4.
This has been tested on a Lenovo Yoga Tablet 2 1015L.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
In the case of scheduling irregularities the drift may accumulate in the
scheduling reference value. By ensuring we always refer to the previous
requested time the drift can be prevented.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
The script already logs the full CMake command that is re-usable outside
this script... except for the PATH change. Expose that sneaky PATH
change.
Debugging every build issue starts with peeling the too many layers of
indirection.
Also fix some minor issue in the help message.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Use the full_sync attribute from dma_domain to schedule
tasks based on period ratio between the registrable
task and the current one.
Do not make it time dependent anymore.
Fixes: #3802
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Add a full_sync attribute to ll_schedule domain.
This is set to true, for a full synchronous dma_domain
scheduler, which is not time dependent.
By default, it is false.
In full_sync case we use the ratio between the task period
and the registrable task period to do the scheduling, not
the task.start time.
We do this because for the DMA_DOMAIN there are no guarantees
for the accuracy of the period of the registrable task
which drives the entire scheduling.
An example is the mixer topology where we have 3 pipelines
for playback scenario:
- 1 pipeline for pcm1.0 (task 0);
- 1 pipeline for pcm1.1 (task 1);
- 1 pipeline for DAI (task 2).
Task 2 is the registrable task and this is always scheduled.
The other tasks (task 0 and task 1) are scheduled based on task->start.
The problem is that, at some point, the DMA transfer from DAI is
finished earlier than task->start for one of the task 0 or task 1
and this is not scheduled anymore.
And, task 2 ends up depleting one of the source buffers,
thus blocking the entire data flow.
Fixes: #3802
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Currently you can't play multiple simultaneous streams at the same time
into mux. Fix this by copying the trigger and reset mechanism from audio
mixer.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
With dynamic pipelines, the widgets in the feedback path are set
up only when the capture PCM is opened. Check if the
feedback_buf exists before accessing it to prevent DSP panic
when only the playback pipeline is open.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
3rd party libraries need __vec_memcpy / __vec_memset
which are not provided by xtensa gcc.
Add open coded versions of these functions by using
memcpy and memset.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The Zephyr timer implementation reads high and low 32 bits
in a non-atomic way. Add a loop to make sure the read is
consistent.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Recently added platform_timer_get_atomic() has to be
implemented for Zephyr too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The "noirq" suffix in function names is often used to signify,
that when this function runs, interrupts will not occur. See
e.g. suspend_noirq and other similar methods in the Linux kernel.
Use "atomic" to indicate, that the function itself will run
atomically.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Input and output channel settings from matrix row and column
are in reverse order, so they should be swapped.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This optimises the recovery time and reuses the same value
for overhead. Maybe optimised further, but value seems good
for all DSP clocks on cavs.
Also removes unused code.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
We used the same macros in .m4 files but missed the additional
configuration needed in CMakeLists.txt
Reported-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
With dynamic pipelines, the widgets in the feedback path are set
up only when the capture PCM is opened. Check if the
feedback_buf exists before accessing it to prevent DSP panic
when only the playback pipeline is open.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
With a recent test result:
[ 9435.941365] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 9435.941392] sof-audio-pci 0000:00:1f.3: ipc tx: 0x40010000: GLB_PM_MSG: CTX_SAVE
[ 9435.942023] sof-audio-pci 0000:00:1f.3: error: DSP trace buffer overflow 4294967295 bytes. Total messages -1
[ 9435.942030] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 9435.942118] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x40010000: GLB_PM_MSG: CTX_SAVE
IF a DSP sent IPC just arrived before IPC CTX_SAVE sent, the HOST IPC
handler may be delayed anda use about 1ms. Change the timeout value
to 2ms will be safer
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>