Optimizes host copy function by removing checks for copy type
and using preconfigured callback instead.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
move lp sram heaps to put alternate reset vector sections at the beginning
add AltBootManifest section with entries to unpack
alternate reset vector asm and cmake link
unpack lpsram sections in master core boot
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
this will allow to access memory from the very beginning
and avoid problems in potential future changes
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This will allocate memory for dynamic vectors, unpack them
from WindowOverflow4 and setup global vecbase pointer used
in alternate reset vector
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
some sections may use different lma than vma address,
in such case rimage needs to use lma
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Sometimes they will be different and this will make developer
aware of the differences
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Some instructions like s32c1i depends on ATOMCTL register settings
and it should be set for slave cores to works properly and not hang
on these instuctions
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Changes schedule operations to return error in case
chosen scheduler is not found or scheduler doesn't
support mandatory operation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Some components used stream.free/avail fields directly. With introduction
of audio_stream_get_free/avail getter functions, such usage should be
removed.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Add underrun_permitted and overrun_permitted fields to audio_stream
structure and initialize them with regard to associated buffer config.
Add audio_stream_get_avail/free functions, which take above-mentioned
fields into account and use them in getter functions within audio_stream.h
instead of avail/free fields directly.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
See https://github.com/thesofproject/sof/issues/2752
host-testbench.sh exits with success 0 when tests fail. Random, recent, all
green example in PR #2751:
https://travis-ci.org/github/thesofproject/sof/jobs/672996210 is green but:
eqiir test failed!
I didn't even have to spend time to search for this example, I only
looked at the most recent PR.
Ignoring failures is the very worst type of validation issue because it
makes everyone think everything is OK when it's not. Hides regressions.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch fixes an integer overflow issue that can occur in the
dcblocker. The overflow happened when doing x - x_prev. If x_prev
is sufficiently large (positive or negative), it can cause an overflow.
Casting x to a 64 bit int first fixes this issue.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
status of an output irqsteer line is a 64bit variable
composed of 2 x 32 bit registers.
Because first 64 output irqsteer lines only holds status for
IRQ in[0] we have a different formula for getting the status
compared to the existing implementation done for i.MX8QXP/i.MX8QM.
Mapping for status register is as follows:
line 0 -> [0 | chan0]
line 1 -> [chan2 | chan1]
line 3 -> [chan4 | chan 3]
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
IRQSTEER module on i.MX8MP accepts 160 interrupts in 5
groups of 32 interrupts and steers them to an output of 3 lines.
Each output line has 64 interrupts.
The interesting part here is how the interrupts are steered and
how the registers are mapped.
Each 32 IRQ input group has 1 register for mask/set/status. Lets name
REGn the base of such registers. Then, according to the documentation
we have:
REG0 -> IRQ in[159:128] }
REG1 -> IRQ in[127:96] } => IRQ out[2] [191:128] from in[159:96]
REG2 -> IRQ in[95:64] ]
REG3 -> IRQ in[63:32] ] => IRQ out[1] [127:64] from in[95:32]
REG4 -> IRQ in[31:0] | => IRQ out[0] [63:0] from in[31:0]
Notice that the original IRQ input interrupts are shifted with 32. When
computing the corresponding registers for an output register we need
to subtract 32 to get the correct register. This is achieved using
a fixup function which only applies for i.MX8MP.
Another important observation is that the IRQ in[31:0] is the single
valid group on output line 0. Thus in our represanation leaving a gap
with first 32 interrupts unused.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
On i.MX8MP irqsteer instance has only 3 output lines. So, reduce
the number of child nodes to 3.
Also, IRQSTEER on i.MX8MP has fewer input interrupts than on
i.MX8QM/i.MXQXP.
It has 160 input interrupts grouped as 5 lines of 32 interrupts, who
then are mapped on 3 output lines each with 64 interrupts.
The special case here is line 0 which holds only the first 32
interrupts. For this reason, we need to do:
- start with first child at 0 instead of 32, because interrupts
starting at 32 should be in a different child cascased
controller.
- fix formula for computing MASK/SET/STATUS registers
- fix irqs register num.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Looking at any recent Travis build log:
1. more than half the time is spent in the exact same "docker pull"
command,
2. The qemuboottest stage rebuilds again the exact same thing than the
previous test stage.
Fix 1. by re-using the same docker instance for multiple platforms.
Fix 2. by dropping from the test stage builds performed again in
the qemuboottest stage.
Random sample before:
Total (VM) time 1 hr 15 min
Real time 25 min (depends on current Travis load)
After:
Total (VM) time 30 min
Real time 10 min (depends on current Travis load)
The price to pay for this matrix reduction and speed up is coarser
reports in case of failure. Considering these tests are the most basic
possible one expects them to be rarely ever broken.
Remove the top-level matrix expansion as it was becoming impractical for
these heterogeneous builds ("PLATFORM=tools"?!). The combination of the
matrix and YAML anchors was not very obvious. Use YAML anchors
exclusively.
Rename default stage "test" to "buildonly"
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit fixes a doxygen issue caused by a mismatch between
dcblock_find_func()'s declaration and its corresponding comment block.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
Previous version worked only for empty lists.
There is potential case when buffer is already connected to
some local buffer on either end and then connected to a
buffer on another core which calls make_shared expected
to preserve existing links.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Rrealloc is a very expensive method and may fail for a large
component. There is existing platform specific method to "convert"
local objects into shared ones which is very quick on existing
platforms.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Implements atomic scheduling of connected pipelines that
supposed to be triggered at the same time. If the trigger
is propagated to the connected pipelines, then the expectation
is that they should be started at the same system tick.
Otherwise it might potentially lead to losing some samples
at the beginning for one of the pipes.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit adds CHANNELS define in sof-tgl-rt711-i2s-rt1308.m4
topology in order to properly set pipeline pcm channels and dmic
configuration (STEREO_PDM0 or FOUR_CH_PDM0_PDM1 mode).
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Since the SOF kernel and firmware headers need to be the same the
rename is also done on firmware side. The fifo_bits_b parameter was
deprecated in firmware ABI version 3.0.1 and the value has been
ignored. Since the kernel sets this in case of ABI version 3.0.0 or
earlier the name reserved_2 is not appropriate.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch was created due to kernel driver code enhancement.
The DMIC was the only DAI type that used variable length arrays for
configuration IPC. It complicated the driver topology parsing more
than necessary. Since the header files for IPC are common also the
firmware side needs similar changes.
The flexible array member pdm[] is changed into a fixed array of
four that is the max. number of stereo PDM controllers in the current
Intel platforms. The DMIC driver code needs minor changes to correctly
handle the changed IPC struct size.
The IPC logic remains as before: The IPC PDM entries do not
correspond to hardware PDM controllers. They are applied per provided
index in each entry. Depending on number of PDM controllers there is
now zeros data after the last defined controller that will be
omitted.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
On i.MX8MP the DSP can make use of two SDMA controllers.
SDMA2 info was already added. This commit adds info for SDMA3.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Before this new stage, doxygen was run only in a completely different
repo (sof-docs). So it was possible to submit totally broken doxygen
changes and get no doxygen feedback at all from CI before merge.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
buffer_set_size() reinitializes the buffer object to empty
state by a call to buffer_init(), so no point in copying
the old content in rbrealloc.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Sometimes only reallocation is needed and old content is
discarded by the client anyway. No need to call memcpy
in this case.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Previous memcpy of bytes is unsafe if new object is larger
then old one.
Typically realloc retrieves the old size internally and does
not need this information passed as argument but sof heap
implementation does not store the exact size of the allocated
memory buffer.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Previous memcpy of bytes is unsafe if new object is larger
then old one (which is probably most popular realloc use).
Typically realloc retrieves the old size internally and does
not need this information passed as argument but sof heap
implementation does not store the exact size of the allocated
memory buffer.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
With this commit:
./scripts/build-tools.sh -t -f | wc -l
525
VERBOSE=anything ./scripts/build-tools.sh -t -f | wc -l
137030
This a followup to commit aa6c0f2ad1 ("topology: cmake: silence super
chatty alsatplg unless VERBOSE=1")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As reported by PR #2741:
sof/src/include/sof/audio/kpb.h:46: warning: explicit link request to 'kpbm' could not be resolved
Fixes: 36d4c9f8f6 ("kpb: add new state")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This places all SectionWidget.TONE* topology widgets, created by
the W_TONE() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.MUXDEMUX* topology widgets, created by
the W_MUXDEMUX() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.MIXER* topology widgets, created by
the W_MIXER() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.KPBM* topology widgets, created by
the W_KPBM() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.DETECT* topology widgets, created by
the W_DETECT() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.DCBLOCK* topology widgets, created by
the W_DCBLOCK() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>