Use 'comp_get_state' function to read state instead of
doing directly access to state member viariable.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
There is no place for unused arguments, their are consequence of invalid
argument list as usual.
Such an situation is highly possible especially during defining trace
filters, eg `-Fv=mux 4.1` instead `-F"v=mux 4.1"` or `-Fv=mux4.1`.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
TE/RE bit will remain set until the end of current frame. So,
for example, even if we set TE to 0 the transmitter will still be
enabled until the end of current frame.
This can have unexpected results when quickly restarting a channel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The topology has two speaker amp configured, with voltage info
feedback-ed to host for each channel in the EchoRef, so update
SMART_REF_CH_NUM accordingly.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
The handler is the primary entry point for the fuzzer and therefore
needs to be added to the build.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Many functions are needed for building that are not relevant to the
platform. Stub these out so the system can be fuzzed correctly.
Also fix up a misisng header
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
oss-fuzz does not support dynamic linking, therefore we need to add
support for static builds
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
In order to get proper perf counters peaks values
we should cast arch timer value to uint32_t.
Arch timers API allows user to get uint64_t value.
In fact arch timer consits two parts. 32 bits (MSB)
software part and 32 bits (LSB) hardware timer.
The 32 bits (MSB) software part is incremented only
during hardware timer rollover when timer interrupts
are enabled. If interrupts are not enabled (perf_cnt
case), incrementation will never appear.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Following commit 88b69cc2e5 ("scripts: xtensa-build-all: Add support
for building TGL and signing with MEU") we now have an unified and
flexible PRIVATE_KEY_OPTION that can do anything with very little code.
The -k option was never a good idea in the first place because it
already required an environment variable anyway (RIMAGE_PRIVATE_KEY)
instead of a command line argument so the code should have just checked
whether RIMAGE_PRIVATE_KEY was defined, that would have been
enough. Requiring the user to "double-confirm" with -k has been adding
extra complication for both the user interface and the implementation.
xtensa-build-all is effectively a "CMake configuration convenience"
script, however it shouldn't become an additional layer of indirection
and complexity and its interface should expose CMake (which is already a
layer of indirection!) as directly as possible.
See longer discussion in PR #3187
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In case when new timeout requires timer rollover
we should set ccompare value to 1 in order to
increment timer->hitime properly in timer_64_handler().
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Possible null pointer dereference was possible here.
There is no need to log error message here, it's done
from trace_filter_ipc_comp_context() and ipc_trace_filter_update().
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
As per component graph we start devices in INIT state. Since most
components don't use this state anyways lets just init the struct to
this state and remove it where it is used correctly.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Instead of specifying the default core count for each Xtensa DSP
architecture set it globally to the available maximum core count.
The user can still reduce the number to save power.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
It's not obvious that icd refers to pipeline scheduling component,
so added this information to log message. By the way, scheduling
component id has been printed.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Volume and switch controls in the dmic pipeline need different channel
maps based on dmic channel count. This will enable the control of all
channel volumes and mutes from user space.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add a new CONFIG_MAX_CORE_COUNT, set it automatically, depending on
the platform and use it to limit CONFIG_CORE_COUNT.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
PLATFORM_CORE_COUNT is always defined to be equal to
CONFIG_CORE_COUNT except when CONFIG_LIBRARY is set. This patch
removes this redundancy, uses CONFIG_CORE_COUNT directly everywhere
and limits it to 1 for CONFIG_LIBRARY and for Zephyr builds.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 16 bytes from .DATA and 128 bytes from .TEXT
for cnl platform.
`data_structs` library from src/ipc/CMakeLists.txt is no longer
needed. Moreover empty library may lead to cmake fail.
SMEX needs little update, to read DBG_ABI from .fw_metadata section
instead of .fw_ready.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 400 bytes from data .DATA and 64 bytes from .TEXT
for cnl platform.
EXT_MAP_PORT() macro is no longer needed.
Created __unused macro in compiler_attributes.h as compiler
attributes shouldn't be used directly, to allow easy compiler change.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 28 bytes from .DATA and 128 bytes from .TEXT
for cnl platform.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 92 bytes from .DATA and 128 bytes from .TEXT
for cnl platform.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Delay the input sample only and don't do other processing. This is used when
the DRC is disabled. We want to do this to match the processing delay of other
bands in multi-band DRC kernel case.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
This commit adds the tools to generate the control bytes for the
drc component. To generate the control bytes, run the example_drc.m
script.
To tweak the parameters modify the values in example_drc.m and run it.
This is still WIP. A fixed set of coefficients is temporarily used in
drc_generate_config.m
Signed-off-by: Pin-chih Lin <johnylin@google.com>
This commit adds the topology files for the drc component.
The control bytes are generated by the tools in tune/drc.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
This commit adds Dynamic Range Compression (DRC) to the list of SOF
components. DRC in audio processing is intentional to reduce the
volume of loud sounds and amplify the silent sounds as compressing an
audio signal's dynamic range.
This is the intermediate implementation with floating-point calculations.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Properly retrieve gcc version values and unify the optimisation flag
with Zephyr to always include a '-' in the string. Before this patch
the kernel reports the firmware, built with gcc as
Firmware info: used compiler XCC 12:0:8 xtensa-cnl-elf used optimization flags O2
With this patch it reports
Firmware info: used compiler GCC 8:1:0 xtensa-cnl-elf used optimization flags -O2
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This component is conditionally compiled, so passing such an
information to driver, allows to check possible scanning failure
reason.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This feature is not needed to get functional firmware,
so may be disabled for platforms with low memory space,
like baytrail and cherrytrail.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This feature will be needed to monitor memory utilization and
memory leaks. It may be usable also in realese builds, so removed
conditional ipc_glb_test_message compilation.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Add extended manifest at the begin of firmware image,
as a firmware metadata description.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>