On some systems the DSP has no DMA interface to the host and is
using a serial port for sending its trace. This patch adds a "-u"
argument to specify a baudrate, that should be used with the serial
interface. The implementation takes care of spurious bytes,
sometimes seen in the beginning of the trace, produced by the port
initialisation by the DSP. The format is fixed to 8N1.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1. Programs shouldn't exit with negative return values, strictly
speaking only EXIT_SUCCESS and EXIT_FAILURE should be used,
however it is also valid to return 0 for success and any number
from 1 to 125 for a failure.
2. Avoid passing complete structs as function parameters where an
additional copy of one isn't needed, use const pointers instead.
3. Remove a left-over unused argument.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
memory.h for the SUE Creek platform currently contains several
definitions, copied over from other platforms, having a direct
memory-based connection between the host CPU and the DSP, that
aren't relevant for the SUE Creek. Remove those definitions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
I've moved src/ipc/*-ipc.c to src/drivers/intel directory
each for specific platform. I've merged apl-ipc.c and
cnl-ipc.c using CONFIG_* defines and placed the result
file ipc.c in src/drivers/intel/cavs.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
The linker script on platforms, using the boot-loader places the .text
section at SOF_TEXT_BASE, not at SOF_TEXT_START, the same name should be
used for the start address in assembly even though so far on all
platforms both names refer to the same location.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds a volume component after SRC to be able to convert
the variable pipeline s16/s24/s32 PCM format into PCM format used
by DAI. The PCM capabilities are changed to allow all formats.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
With this patch the S16_LE format becomes supported in addition
to S24_4LE and S32_LE. The generic C, HiFiEP, and HiFi3 versions
are updated. The patch changes the s24 polyphase algorithm for
s16 data and changes the s32 algorithm for both s24/s32 support
with a shift by 0 or 8 parameter.
As done for other components too the PCM format handling is moved
from params() to prepare() function since the actual pipeline
format didn't appear correctly in params().
The patch removes the own ceil_divide() function since it's
provided by math library. Also some code indents are fixed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
broadwell and haswell linker scripts are identical, by removing
broadwell-specific file for linker script we have cleaner buildsystem
where all linker scripts have names just like platform folder names
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
For dais, we don't support change dma channel dynamically, so only get
dma channel at first config, ignore that for latter dai_config
invokings to avoid dma channel leaking.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This patch removes from FIR and IIR EQs the check if array data pointer
is null. Since it is an array the test evaluates as true and the check is
unnecessary.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch prevents the host component from flooding the trace when
audio playback or capture rate is other than 48 kHz. It only means
that the host sink buffer still has samples unconsumed by the
downstream component. This is not a warning so it's better to change
it to tracev_host().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
It has embedded lock to dma->lock in hda_dma_post_copy() and
hda_dma_start() where may lead to dead lock, here remove them.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add pandding to each block if the block size is not divisible by 4.
Which can avoid unaligned memory accesses.
Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
Send command completion IPC after powedown completes instead of before
power off completes. This allows host to know that DSP is in OFF state
prior to driver PM actions.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This patch removes some obsolete code that caused file
pointer to get out of sync and corrupt all data read.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to IIR EQ capability to convert from s32 source to
s16/s24/s32 sink formats in normal PCM samples equalization. The
feature is useful in microphone equalization where input dynamic
range is high but where pipeline needs to be lower word length. A
typical IIR high-pass response when combined with gain will reduce
the dynamic range by suppressing lowest frequencies from signal to
better fit the smaller sample word length.
The PCM capability in topology macro pipe-eq-capture.m4 is changed to
allow the s16/s24/s32 formats.
The patch also includes 4096 bytes increase to SOF_TEXT_SIZE for CNL
platform.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Disables following tests:
Debugability - not designed to be run on host at all
Volume - needs some tuning to not fail
Buffer - needs some fixes to not have segfault
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
For none-init first trigger start, need to recovery buffer state and set
the dma pointer as pause/release did.
This will allow ALSA STOP/START recovery pattern work now.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This patch updates the provided example responses as data for
sof-eqctl and in the include files for topologies. The updates into
Matlab scripts are included also. The FIR and IIR example script is
updated to contain all examples.
The patch includes also a bug fix into IPC handler where the check
against SOF_IPC_MSG_MAX_SIZE is off by one and caused it to reject
all set data commands (to the EQs).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
As task scheduler is refined to accept adding new task while previous
task is running. This duplicated copy should be removed.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Fix some build issues with cmocka for host test bench target so that
cmocka UTs can run native on host architecture. This makes it easy for
users to update UTs when APIs change as they dont need architecture
specific version of cmocka.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
High priority IRQ handlers can potentially reschedule tasks prior to task
completion. i.e.
1. Task runs and unmasks high priority IRQ prior to completion.
2. High priority IRQ prempts task context and reschedules task (changing
task->state).
3. Initial task resumes and then completes (clobbering task->state in 2).
Make sure this flow is supported for high priority IRQ scheduling.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>