When setting parameters some API calls might not be fatal, so there
is no need to fail the apply config phase in this case.
For example, in case of Cadence MP3 codec the only supported PCM
output word size is 16 and 24. Trying to set a PCM word size of 32
will result in a non-fatal error and the word size would be adjusted to
24.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The SYSTICK_PERIOD is used for system agent only now, remove the
schedule part from the description.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reschedule once interrupt is handled by all cores(clients) according to
the earlist task of the list, and enable interrupt on cores that have
tasks to run.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
At interrupt handling & tasks_run(): run each pending task of the core,
e.g. for period tasks:
previously: update task->start based on last_tick(asynchronized), if the
last_tick was delayed, the delay will be accumulated to the subsequent
periods!
new: update task->start based on last task->start, to try to make the
task's running follow the pipeline requirement as more as possible.
Add lock/unlock for domain accessing and updating while keep task can
run simultaneously on multiple cores.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Refine and simplify the domain_set/clear() part:
1. Use UINT64_MAX to denote that the domain is not set.
2. For _domain_set(), set only when needed. e.g. the first task over all
cores being added, or a task asking for earlier timer being added.
The _domain_set() logic is refined as below:
a. For first task, set domain according to the required start, else
b. for one shot task, set domain if it is earlier, else
c. for earlier periodic task, try to make it cadence-aligned with the
existed task, else
d. for later periodic task, simply cover it by the coming interrupt.
3. For _domain_clear() logic, simplify to call it when the last client is
freed.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Do timer_domain refining as below:
Use unified LL_TIMER_SET_OVERHEAD_TICKS=1000 which denote the max
overhead that the timer_domain_set() will take, and remove the
definition from each platforms.
Don't add any overhead if no needed(e.g. if the start > current +
overhead). This will help to schedule the task ASAP, and make the
catching up (of the previous delay) possible.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
rename the last_tick to next_tick, which means the one already set
to the timer, for more easy to understand.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
So far we only used topologies with rate set
to 48 000Hz. This might change in the future.
So use rate from parameters passed from kernel.
While here, align sof_ipc_dai_esai_params struct
with the one from kernel.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
One-touch "make -C installer rsync" combines fast incremental build,
staging and deploy in one command.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The tools build is independent from the firmware build. The next step is
to invoke it from here if needed.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch fixes the error that happens with the hard-coded PGA
names Dmic0 and Dmic1 in pipelines pipe-eq-iir-volume-capture.m4
and pipe-eq-iir-volume-capture-16khz.m4. Pipelines for beamformer
TDFB have the same hard-coded PGA names and are fixed too.
If impacted pipelines are used for any other purpose than DMIC endpoints
the topology graph gets messed up. With this change the caller macro,
e.g. intel-generic-dmic.m4 needs to set the PGA_NAME macro when the
respective pipeline is instantiated. If it is not set the default
name via N_PGA() macro is used.
The macro intel-generic-dmic-kwd.m4 is updated to set the Dmic0
PGA name as well as the earlier missed PIPELINE_FILTER1 and
PIPELINE_FILTER2 definitions for passing filter coefficients.
Fixes: #3378
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Lets use the same version of Xtensa toolchain as Intel in order
to avoid compilation problems.
It is difficult to support multiple toolchain versions because specific
headers needs to be updated, so lets have the same version supported
between IMX and Intel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Comment is incorrect. There are multiple cases when a config is pushed
by userspace that will result in no callback.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The main topology directory contains a number of topologies those
are not used directly by Linux kernel machine drivers. Also there
are variant topologies built those are modified versions of the
main topology. The topologies for testing and devolopment are moved to
directory development. The topologies those may be used by end users
to enhance the audios are moved or built to dsp_enhancements directory.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Cppcheck is complaining that we are running a 32bit int off the end.
This shouldn't happen here in any arch. Looking at the math and
comments, it looks like idx should be a 64 type or cast to a larger
container before the bit shift. Therefore I am enforcing a strict type
on it.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Cppcheck check doesn't understand the relationship between trace section
start and end so it is giving a false positive because it thinks they
are two separate objects, not two pointers to the same region.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The current version of the code effectively relies on the compiler to
optimize out the loop, this both trusts the compiler, annoys
cppcheck which also not being entirely clear to the reader. Solution is
to use the compile switch to remove all relevant code.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
libc doesn't return a type, so it just no-ops silently on null, lets to
the same having this error makes walk back patterns more annoying
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The proposed calculation doesn't take negative or zero input-x into
consideration, and we also don't need such use cases. Just return 0
for those input-x.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Used ABS(x) instead of x for comparing to ONE_OVERT_SQRT2(~0.707)
because x could be a negative value and here we want to transfrom x
from range (-1, -0.5];[0.5, 1) to (-1, -0.707];[0.707, 1)
And revised code line 233~237 to be easier to understand.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
This patch replaces use of pipe-volume-capture macro or
pipe-low-latency-capture to pipe-volume-switch-capture in nocodec
topologies for APL, BDW, CHT, CNL, ICL, and TGL based platforms. It
allows to test of volume component mute switch control in SSP loopback
that is used by default in nocodec topologies. The testing of mute
switch feature is simplest to do with loopback topologies. Nocodec
topologies are not in mainstream usage so this is the safest option to
enable testing.
The mute switch add should be possible to all capture topologies but
it can be done later once it is confirmed it is safe to do (avoid
accidental muted audio or problems with UCM).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Those two enums should not be mixed, because the first one is
only internal enum for FW while the second one is part of ABI.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
There is a bug in upstream cppcheck where dereferencing a pointer does
not result in a type check in sizeof as far as cppcheck is concerned.
This results in a false divide by sizeof(pointer) error.
See https://trac.cppcheck.net/ticket/10179
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
ternary isn't entirely clear what order happens on the left, add
brackets to clarify. Cppcheck complaint
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Array streams represents streams on "many" side i.e. input
for MUX and output for DEMUX.
For DEMUX each stream has masks array - 1 mask per output
channel. Each mask shows, from which input channel data
should be taken.
This commit reverts "demux" part of commit:
"b1b31e7154a5c159d81459634eabd8013b434181"
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
More specifically replacing sof-bin/go.sh and sof-bin/publish.sh and
also sof/scripts/sof-target-install.sh eventually.
"make install" code has always belonged to source repositories because
developers need to install too and we want everyone to use the same
installers. It's also easier to have all the information in a single
place.
Once the layout in sof-bin mirrors the /lib/firmware/intel layout
exactly, sof-bin does not need any installation code any more.
Mixing source and binaries in the same repo is also a "code smell",
notably because it forces branching them together.
Using a higher level build tool for installation instead of plain
scripts has a few benefits:
- Multiple entry points: easy to invoke (and test) any part of the
installer individually
- ... while invoking dependencies automatically.
- Other features "for free" like:
- errexit
- error messages like "dunno how to build file x"
- commands are logged by default
- Also gets rid of most of the large code duplication in go.sh and
publish.sh, so:
- Enabling or disabling a platform is a 3-character change
- Allows platform selection in local config file (even just one platform)
- Much harder to add inconsistencies
- Much easier to review correctness, for instance no need to
scrutinize every line to see which platforms are aliased.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As reported in #3491, there is confusion between platform names, CPU
names, PCH names, toolchain names, signing schemes and what not. For
instance in "build_apl_gcc/sof-apl.ri", the first "apl" matches the name
of a defconfig file while the second "apl" matches the name of a signing
scheme.
When building out-of-source, there is no reason to vary the filenames of
the output depending on the build configuration, changing the name of
the build directory is enough. This simplifies automation logic
including the next commit that adds a new install/GNUmakefile.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
we have a set of topologies that don't seem aligned with the
mainstream ones.
All these topologies should be given the boot if they are not used.
FIXME: The case of tools/topology/sof-cml-rt5682-kwd.m4 is rather
strange, M4 seems to go in some sort of infinite recursion if
'DMIC16k' is defined.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The macro used DAI link ID when it should have used PCM ID
Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fix macros (capitalized K), use them both for regular and -kpb
capture, fix names
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>