It's important to know which pm_runtime_context is related with
given call to pm_runtime* function.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Before this fix, any random, later git tag like for instance
"releases/jsl/v3.0-rc1" would be picked up and then immediately
discarded and replaced with v0000 because it didn't start with 'v*'
Also log all the versions always and not just when there is already a
.tarball-version file.
Increase --abbrev=12 because --abbrev=4 doesn't seem to make sense.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Clock manegement is important part for power consumption optimization,
what is a task of this module.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This function will be called from power manager to change current
clock value for sleep time.
Detailed implemnentation may be clock instance dependednt.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Core enable/disable is related with power management and maintenance
of clock trees, so such an mask should be possible to read.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Set bit for PLATFORM_MASTER_CORE_ID and remove exception
handlind from arch_cpu_is_core_enabled.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It was needed to call two functions and update one global variable
to change clock frequency, what is quite error prone solution.
After merging it to one function, it is easier to keep clock description
synchronized.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
In situation with two or more active cores, saving active frequency
index in platform_clock_on_waiti suffer from race condition.
Changing state in *set_cpu_freq() method is much more safe.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The main build script has a fairly verbose output by default but not the
most important things it does yet. These commands are useful to "peel"
the layer of indirection and debug cmake issues; either locally or when
wondering what CI does.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
A "tarbomb" is an archive file that has more than one directory at the
top level, which is (fortunately) unusual for .tar files. By default,
tar extracts archive members "as is" in the current directory. If the
archive has many top level members then it becomes very hard to make the
difference between what was just extracted versus what was already
there. As extraction is recursive this gets much worse because the
problem can repeat itself in subdirectories. As the last but not least
nail in the coffin, tar silently overwrites existing files by default.
This commit is admittedly an "incompatible build API change" meaning any
higher level build or packaging script that was consuming source release
tarballs (as opposed to git cloning the source) will require a small
change. Consumers of release tarballs must be rare though because the
output of "make dist" has already been broken by commit
c00d39c71b ("Add rimage as a git submodule") anyway yet no one noticed
yet.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In logs, there should be information about used clock frequency,
to better analyze issues related with performance. On pipeline
complete, clock value should already be settled down.
Another reason of location this log in this place is each
pipeline may work on different core.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It's nice to know what is current clock frequency, especially when
some troubles with performance occurs.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Bugs in power managements, may have implications in many places
in code, so each change should be notified.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
We really don't care about SRC on those platforms and the memory
footprint is too large anyways.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
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>