This patch updates the locations of "make install" libraries default
install locations into shell script to run SRC test cases. The script
also now prints the used LD_LIBRARY path to ease setting up code
debugging.
The segfault of testbench executable is fixed by returning a valid
pointer reference instead of a NULL from test dummy function
arch_schedulers_get(). The rest of testbench version of schedule.c
was also updated to be like the current real version module.
Finally in the testbench.c main the file names string pointers are
initilizated to null as well as the word length parameter to avoid
a segfault if executable is started without command line arguments
to see the usage help text.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds a shell script sof_test_perf.sh that measures
gain, frequency response, and total harmonic distortion plus
noise for a remote device.
Matlab or Octave is needed. The shell script launches by default
Octave to process the signal generation and test results analysis
scripts.
The remote device must be set to be accessible by ssh without
passwords. An external high quality USB sound card is recommended
as analog interface to connect to test device's analog interface.
The configuration file sof_test_perf_config.m must be edited for
the remote device's user account, audio device, audio format, and
capture sound card audio device, and audio format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In alloc_cont_blocks() function after allocation we should
check whether new first_free block has been already used.
If it was used, we should find first not used block.
fixes#1714
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Currently SRC returns error when 0 size input or output data is detected
and pipeline interpretes this as fatal xrun error. This could happen
for example when host dma has no time to fill in first iteration of
samples. So instead of error, return PPL_STATUS_PATH_STOP as SRC in the
middle of the pipeline should handle also occasional 0 size data.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Fixes media pipeline period for nocodec byt and cht topologies.
Now codec and nocodec topologies are aligned in regards to pipe
configurations.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This header may be included by a platform specific, intermediate
wait() layer inserted between the lib and the architecture code.
Therefore the including unit should not be limited to lib only.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Integration specific tweaks for xtensa architecture should
use Kconfig options selected for required platforms, not the
platform headers.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Moves platform_trace_point macro from platform/platform.h
to platform/trace/trace.h. This way we don't need to
include platform header from generic sof/trace/trace.h.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
The context switching layer is a common mechanism for all
pre-emptive schedulers and should not depend on data types
defined for any specific one.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch avoids the need to main SOF ABI version information in
Matlab/Octave file eq_get_abi.m for equalizer tools. The ABI
header is fetched via new "-p" command line option for sof-ctl.
The BSD 3 clause copyright text is also updated to new short style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds command line option "-g" to generate and with help
of options "-o <file>" to store the current ABI version header data
into file. Use "-b" to change the default CSV format to binary.
It is used by external tools to create configuration data blobs for
SOF audio processing components.
The parameter for size is the configuration data payload size with
the size of sof_abi_hdr struct excluded. It does not impact the
the length of printed header. It just places the length into the
correct location in the header.
This patch also fixes the permissions of file output. The mode
need to be provided for open() to avoid having no access to
created file and allow overwrite of existing file.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Refactors schedule code in order to allow dynamic scheduler
creation. We don't want to add every new scheduler to the static
array of scheduler_ops and also we don't want to have every
scheduler created on every platform. Maybe some of the platforms
won't need some of the future scheduler types.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
SCHEDULE_DEADLINE is replaced with SCHEDULE_PERIOD, but there is one
missed in DAI_ADD for W_PIPELINE.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Adds missing flag during draining task initialization.
It's needed at the moment, so the EDF scheduler can ignore
deadline for this task. Scheduling flags will be soon
refactored.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch removes the IRQ disable during
pipeline_prepare() as there is no potential
race condition. Also, the disable of IRQs
result in long delays in queued interrupts.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch removes the IRQ disable during
pipeline_params() as there is no potential
race condition. Also, The disable of IRQs
result in long delays in queued interrupts.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Instead of always returning -EINVAL propagate the error code from
ipc_stream_pcm_params() that actually caused the failure.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Two variables in host_new() contain constant values and only obscure
the code. Remove them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
There is usually no need in explicit "inline" qualifiers in C, in
most cases the compiler does a good job deciding which functions to
inline. Also remove a redundant variable and simplify a function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
rzalloc() allocates 0-initialised RAM, there's no need to initialise
it to 0 immediately after allocation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Current implementations of ll_sch_set_pdata() and ll_sch_get_pdata()
are unsafe, replace them with safe versions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Static data is always zeroed in C, no need for an explicit
initialisation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The existing IIR response names are not all upper case. This patch
removes the conversion to upper case to be able to automatically
generate the topology m4 syntax example equalizers.
Without this patch run of example_iir_eq.m script causes successive
topologies build to fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch implements the new version of EDF scheduler.
This is the first basic implementation, which can be easily extended
in the future.
Previous implementation had two major flaws:
- Tasks could only be preempted based on the interrupt level on which
they have been scheduled, so it was limited based on the hardware.
- This led to the system not fully utilized, so we could never achieve
full EDF functionality.
The new implementation uses only one software interrupt and allows for
dynamic context switching between different tasks based on the deadline.
Also for some cases priority is taken into consideration e.g. for idle
and almost idle tasks, which don't have deadline at all and should be
executed only if the system is free. All other normal tasks should have
the same priority. Task chosen to be run is executed on passive level,
so automatically can be preempted by every interrupt. Every task has
its own private stack on which current context is saved and restored
if needed. Note that main firmware loop is task scheduled with
idle priority, so it will be executed only after every other task
is completed.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Increases HP Buffer Heap and Runtime System Heap sizes in order to
fit all the pipeline buffers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes two tests which don't really test anything
and are based on magic numbers. Changing memory map
can easily break them.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Passes sof context structure to the schedulers during
scheduler initialization. It will be required by the new
EDF scheduler.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Defines and adds dedicated stacks for interrupt handlers
to core data. They are required to implement the execution
context switching, which is useful for any preemptive scheduler.
EDF is the first scheduler for which they will be used.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fixes the bug, where any error in ipc_dma_trace_config handling
was always returned as -EINVAL.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This change introduces new DAI driver ops: get_handshake and get_fifo.
They shall be used to obtain DMA handshake and FIFO address information.
The motivation for this is the required by ALH ability
to retrieve this information during runtime,
based on parameters passed to us by the kernel/driver.
The DAIs no longer have to have hardcoded platform data (fifo/handshake),
the computation of those now may happen directly
in the DAI driver implementation.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
This patch fixes state change in buffering function before
the check of state from previous stage. This issue resulted
in missing samples from stream during draining.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch checks if "copy_bytes" which is the minimum
of sink->free and source->avail is != 0. If so we go
further with copy and internal buffering.
If no we log error message and return from
copy function.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>