Additional work needed to make the BE name and index configuration, as
well as LBM quirk.
We should be using a single topology here.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
remove the low-latency pipeline and pcm-media.
Instead, we use 2 two pipe-host-volume-playback with different periods
connected to the same mixer-dai.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add a new pipeline definition to avoid mucking with either
pipe-low-latency or pipe-media.
The code is 90% similar to pipeline-volume-playback but includes a
scheduling component.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add separate pipeline starting with a mixer (similar to Baytrail
switch matrix and SKL closed-source firmware)
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
More control over which tools should be built, instead of building
everything every time.
Note: All the build files will be removed every time this script is ran
since tools are not independent of each other.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Usage of pcm_convert_as_linear() function speed up conversion
and make core convert function easier to implement.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch adds useful trace to help solve possible issues with slave
DAI rate stability. If there are quality issues with ASRC, it is
useful to check the reported values. Skew values are Q2.30 fractional
integers.
E.g. at skew of 1073518174 the measured DAI sample rate is
48000*2^30/1073518174 = 48010 Hz when nominal rate is 48 kHz.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the parameter input_num_frames to in/out type
for push mode 16 and 32 bit processing functions. If the processing
core needs to stop due to insufficient number of frames free in the
output buffer the amount of frames can be less than requested. The if
statement for exit from while() loop is simplified. Also the if
statement tests order for ASRC_BM_CIRCULAR is changed.
The changes for pull mode 16 and 32 bit mode are similar. The parameter
out_num_frames is changed to in/out since the frames count could be less
than requested if there is no sufficient amount of input frames
available.
The upper level 16 and 32 bit copy() functions are updated to use the
returned value for SOF buffers consumed/produced.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Refine to use the consistent activation threshold for different formats,
use a unified coefficient 0.05, and update the threshold at .params().
These refinement will fix the KWD trigger volume inconsistent for
different sample format issue.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
For original DMIC16k only S16_LE is supported in pcm capability.
Now this patch enables S24_LE and S32_LE for applications like
DMIC01.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Fixes 428804e1c ("scripts/qemu-check.sh: add set -e") which failed to
consider the case of an empty $IPC_REG or $IPC_MSG.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Removes shellcheck warning and could allow directory names with
whitespace in a very distant future.
Silence printf "$@" shellcheck warning in die() function.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
We should clear MNDSS and MCDSS bits before setting
new mclk and bclks source clocks. This commit is
going to fix case when driver want to reconfigure
the same SSP (e.g. index = 0).
1. Driver sends ssp_config() and FW configures ssp
(index = 0) with MCDSS bits set to e.g. 1.
2. Driver wants to reconfigure the same ssp (index = 0)
by sending new ssp_config() and FW tries to configure
ssp 0 once again, but firstly it reads MDIVCTRL
register:
mdivc = mn_reg_read(MN_MDIVCTRL, mclk_id)
and then tries to set MCDSS(0):
mdivc |= MCDSS(0);
, but there is "or" function here - after it MCDSS bits
still will be set to 1. That's why we should clear this
bits earlier.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Parameter validation should give detailed information about wrong
settings to speed up the troubleshooting.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch adds to volume component capability to use one of
four ramp update rate presets 125 to 1000 us depending on topology
defined ramp length that is typically between 20 to 250 ms. The
rate needs to be higher for faster ramps to avoid zipper noise.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the ramp time (from ramp start) calculation
unit from millisecond to Q29.3 milliseconds. It changes the smallest
time difference and therefore ramp slop point value down to 125 us
so finer than 1000 us volume update rate can be used. E.g. update
rates 125/250/500 us are good choices for high update rate.
The higher ramp update rates can be defined in volume.h if the volume
ramp need to be much shorter than currently while avoiding
audible zipper noise.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch shortens the ramp duration to 20 ms from 250 ms in all
topologies with volume playback. In addition the zero crossings detector
mode is enabled to mitigate zipper noise.
The change includes for the not yet updated pipeline macros a rename
of macro for tokens data with pipeline number suffix to ensure no
undesired volume instances are impacted by this change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Yes, staying withing 80 columns is certainly still _preferred_. But
it's not the hard limit that the checkpatch warnings imply, and other
concerns can most certainly dominate.
Increase the default limit to 100 characters. Not because 100
characters is some hard limit either, but that's certainly a "what are
you doing" kind of value and less likely to be about the occasional
slightly longer lines.
Miscellanea:
- to avoid unnecessary whitespace changes in files, checkpatch will no
longer emit a warning about line length when scanning files unless
--strict is also used
- Add a bit to coding-style about alignment to open parenthesis
dbaluta: This patch is taken and manually applied from Linux kernel
tree. See commit, in Linux kernel tree:
bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column warning")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This patch will move all sram fw regs offsets (only offsets) to a commpon
mailbox.h
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Limits additional check in mixer_reset to playback streams only.
For mixer in capture streams the request will always come from downstream,
which means that source components will always be in state >
COMP_STATE_READY. Checking sink component also doesn't make,
because it's the source of the request. The logic is now similar
to the mixer_trigger, where for capture streams we also don't require
additional checks.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Number of available frames from feedback and passthrough buffers
should be in the same format and close together for easily compare.
Moreover reducing number of logs, especially from copy function is
important in terms of logs readability and FW performance - adding
one more parameter have much less impact on FW than adding one more
log message.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
In comp_set_model() function, when required size is equal to 0,
we should not allocate memory and just return 0.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
In comp_get_model() function we should return warning in
case not allocated model->data.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
For simple performance measurement and optimization in development stage,
tic-toc api is provided. Performance data are traced at each tok call,
to allow fast clocks usage deviation estimation.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
When sof source code is edited in Eclipse, the project
metadata files should be ignored by git.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Since we are sharing the same mclk_id among SSP interfaces, we should
use the fixed frequency for the mclk. Here add a macro for it to make
sure it is aligned with the SSP configure in the upper layer.
Change to use 19.2MHz as the default mclk for smart_amp SSP.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We should make sure SMART_SSP_QUIRK is set, if it is not defined from
the upper layer, let's set it to explicit 0.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
For original design, there are 4 channels 24bit stream for playback
and 8 channels 24bit IV feedback for capture stream. This requirement
exhausts all resource on single link. Now adjust it to a 2 channels stream
for playback and a 4 channels stream for capture
Signed-off-by: Rander Wang <rander.wang@intel.com>
PGA name is used in topology files and names between topology
and UUID dictionary (used by logger) should be aligned to omit
ambiguity.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This is not needed yet as we use only one -imacros at a time but could
save someone a lot of time in the future; including the author of this
patch who will have forgotten about it in a few weeks.
For more details see
https://github.com/zephyrproject-rtos/zephyr/commit/e53c0d0ec7640b
and links from there.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
File with `sof` struct definition is included - `sof/sof.h`,
so this line wasn't needed.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Mechanism of comparison pipe_id from ipc_comp_dev will be used in
trace filtering, so this part should be moved to separate function
and allow code reusability.
Moreover function usage is compact and descriptive method to define
what given block of code should do, so after such a refactor code
readability is improved.
Include from pipeline.h is removed to omit circular reference.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
After removing timestamps it is possible to compare output logs
with tools like diff or similar. Moreover then output logs are
in more compact form.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Structure X.Y is as usual used to describe pipeline and component
id, so usage of them in different context may be misleading.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It easier to compare number of copied frames between dai and
process components than copied bytes.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Whenever it is possible, trace function with reference to pipe
component should be used instead of class less method. It allows
to print pipeline id in output logs and filter logs by this value.
In pipeline_new() moved trace context and ipc_pipe copy, to allow
tracing with context in earlier stages of this function.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
We broke the upstream UCM configs by introducing pipeline id's to dmic
names. This differentiation is mandatory for reasons in alsaconf parsing
and ASoC layer combining the control names to pga's. However, the
differentiator can't be pipeline id as it can change depending on the
topology. So let Dmic0 have the old "Capture Volume" control name and
prefix Dmic1 control name with "2nd". This should not break the UCM's as
Dmic1 is not currently referenced.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
this will restore functional backtrace for exception dump because stack rewind
is not implemented correctly
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This will allow to free component properly and stop using
already freed memory which can result in dsp panic if configured
with CONFIG_DEBUG_BLOCK_FREE
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Sink buffer should be locked and invalidated (inside lock function)
before reading, to acheve consistent data between multiple cores.
Otherwise readed data may be outdated.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Change generated config.h default name to autoconfig.h to catch any
remaining #include config.h left in any other PR, branch or any other
concurrent work in progress unknown to this.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>