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>
Added debug memory freeing with saving pattern into memory to
find dual freeing of allocated memory.
Added ifdef and changed config for Apollolake memory map since
LP memory is not yet enabled.
Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
This patch adds 50 kHz into SRC generator script for std and tiny
profiles. The src generator script is cleaned up and the default
conversion matrix is moved into caller script for easier maintenance.
The plots appearance is improved and the generated coefficients code
look is improved to pass the git pre- and post-commit script
requirements.
The SRC test bench scripts are updated for changed locations. A SRC
playback topology is used for test bench and real device usage.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds 48 <-> 50 kHz rate conversions, removes from tiny set
24 kHz due to no ALSA support, and removes from std set the no more
needed 18.9 kHz.
The tiny coefficients are trimmed down in quality and computational
complexity to just run on APL platform as gcc compiled to allow debugging
and validation of the most complex 44.1 <-> 48 kHz conversion.
The std coefficients are trimmed to slightly lower bandwidth
20 kHz @ 44.1 kHz instead of earlier 22 kHz @ 48 kHz. This allows the
new larger set to not consume more RAM than old.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Currently the dai user only increments the DMA channel usage count on
channel start and decrements on stop. This doesn't align with the current
DMAC allocator so ensure that the DMAC allocator cannot over subscribe
a DMAC with more users than channels. i.e. DAI config will try and allocate
a channel and fail if over subscribed.
This needs to be revisisted with changes to DAI to allow over subscription.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Increase the trace buffer size on CAVS platforms to help prevent any
trace data loss. Also relax the scheduling timeout given the extra
headroom.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add debug to show heap allocation failures and display remaining heap
total free/used alongside free/used blocks of each size.
The heap status is also dumped at the end of of pipeline load and platform
boot if option is enabled.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Make sure we pass the entirety of IPC data between FW and host by
using the raw buffer for client APIs and the local copy for local
ABI safe instrospection & validation.
Make sure this works both ways and add a max_data_size argument to
comp_cmd() API in order for client API's to to overflow the return buffer.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Because of a race condition between when the DONE interrupt
is sent to the host and when the previous ipc task's
state is updated to COMPLETED, new ipc's from the host
could end up not being scheduled. This leads to ipc
time outs on the host.
In order to prevent this, this patch introduces a new task state
called PENDING which is assigned to the task when it is picked
as the next task to be run. The state is then updated to running
when the task function is executed. This way when a ipc task
comes in, a RUNNING task could get scheduled again and assigned
the PENDING state to ensure that it doesnt get missed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
dcache_writeback is called for dma connected
buffers, however it doesn't take into account
the possible circular wrap if bytes size is
not exact multiple of frames period.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>