Shift left the peak meter of 16/16 bit format 16 bits to normalize
this value to 32 bits to meet the CI test requirement.
Signed-off-by: Andrula Song <andrula.song@intel.com>
DTS headers have been publish, don't use local includes and don't modify
include paths for no reason.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Fixes commit 9cc6454df6 ("module_adapter: Extend the module interface
for endpoint devices")
As the endpoint_ops methods use only pointers to these two objects, it's
not necessary to make their entire object structure visible. However a
forward declaration is required to make them known to endpoint_ops users
and fix the following warning:
```
error: 'struct comp_dev' declared inside parameter list will not be
visible outside of this definition or declaration [-Werror]
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Since 3P code can't be compiled without the library (for now) we rely on
reviews for API conversions which unfortunately has proven to not be
perfect. Fixup the accessors for the waves module.
Fixes: e57883f3c2 ("buffer: use an accessor to read struct audio_stream::channels")
Fixes: f8e4d693b2 ("buffer: use an accessor to read struct audio_stream::rate")
Fixes: 017b8ebcde ("buffer: use an accessor to read struct audio_stream::frame_fmt")
Fixes: 90828e2305 ("buffer: external modules use API to access buffer_fmt")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Now that waves headers are published they should not be trying to
include local headers or modifying the global scope. Fixup headers so
they include like the rest of public headers.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Creation is done with constant args
Fixes: 10f6dd0d7b ("module-adapter: add a constant data pointer")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
It is possible to fabricate a message for FW that initializes volume module
without a configuration. Make a safe guard again crashing from that.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Use the helper functions to update the stream params and the source/sink
buffer formats.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The input stream params may not be updated by the source module. So
update the stream params from the config. Also, update the source/sink
ibuffer formats based on the base config audio format.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Define the module interface ops and the endpoint ops for the copier
module to convert it to use the module interface.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
For IPC4, the component device state machine is handled by the
comp_set_state() calls in the module adapter ops already. So, the module
state checks are redundant. But, keep the state checks for IPC3 so as to
not break the existing codec implementations for IPC3.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The state check is redundant as the state will always be >=
MODULE_INITIALIZED if the module exists.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the dai endpoint ops to the module adapter in preparation for
converting the copier module to use the module interface.
Also, modify the module_adapter ops to handle the HOST/DAI components
are a special case.
In the case of module_adapter_prepare(), there's no need to compute the
period_bytes for the HOST/DAI because these are computed by the copier
module prepare op. In the case of copy, HOST/DAI components are handled
separately as well as these components deal with the DMA buffers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Introduce a new struct module_endpoint_ops which contains all the ops
that are relevant for endpoint devices (host copier and DAI copier) and
add a new field for setting the endpoint_ops.
These will be needed when the copier component is converted to use the
module adapter interface.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Add the bind/unbind ops that can be optionally implemented by modules to
perform module-specific actions when other modules are bound/unbound
from them.
These are particularly useful for modules such as the mixers, smart_amp,
copier that can have multiple input/output pins.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
CONFIG_CAVS_LPRO_ONLY is only for CoffeeLake and is not fit for current IPC4
main branch, so remove it to make code clean.
Signed-off-by: Rander Wang <rander.wang@intel.com>
These hw clk settings are done in zephyr layer in power_init(),
so remove them in sof side.
The CONFIG_CAVS_LPRO_ONLY is for CoffeeLake only and doesn't affect
TigerLake, so the hw clk settings are the same for platform_init
and power_init(), then we can remove them.
Signed-off-by: Rander Wang <rander.wang@intel.com>
These registers are set in power_init() in zephyr layer, so
remove redundant setting and remove hw setting in SOF layer.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Indicated to a compiler to not generate a warning about the unused
module_adapter variable in the SystemAgent::CheckIn function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Removed unused variables in aria_algo_get_data_even_channel and
vol_passthrough_s24_to_s24_s32.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Pull in following rimage changes:
48777207f5 (HEAD) config: add vangogh toml file to support vangogh build
089157d461 Config: Add Aria module to tgl-cavs.toml and tgl-h-cavs.toml
Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
Both native sof loadable modules and IADK are using same:
- loading flow
- registering
- module API
That is why iadk prefix is removed from common parts.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
In manifest is information about version of API and
depending on it we load IADK or SOF module.
Flag is showing if module is loadable. According to this information
different api is being used in loading module.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
This is part of fw which helps loaded module in communication with adsp
Also it provides basic operations for creation of component driver
Common part for native loadable modules and iadk is put together and
remade into native API. That way system services are using generic
methods defined in native system service.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
Building system for iadk modules and for native sof modules has built in
information about used api. That information we use to switch between
two different methods of registering modules.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
MTK memif(DMA) can support different format from BE dai, so we don't
need to rely on the transformation of SOF DAI. After the patch, the
format of memif follows DAI component, so the format can be kept the
same in the pipeline and do format transformation via AFE if
necessary.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
After exiting D3 state if IMR context save is enabled, IDC interrupt
must be re-enabled again for all cores. It fixes multicore CI test
issue.
431108d89e175: intel_adsp: ace: Restore IDC interrupt on D3 exit
Signed-off-by: Rander Wang <rander.wang@intel.com>
Found a oss-fuzz error I thought I'd fixed being reported again.
Turns out the fix had a typo and only fixed half the problem space.
Need to check source and sink, not source and source!
Signed-off-by: Andy Ross <andyross@google.com>
After commit 867ada28f we only allocate 1 buffer for mixer even if there
could be 2 input sources.
So, set correct number of sources for mixer.
Fixes 867ada28f ("audio: module_adapter: Allocate max number of input/output buffers")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
To fulfill the generic layer structure for smart_amp component, one
intermediate level is added to the current Kconfig hierarchy, i.e.
COMP_SMART_AMP. The MAXIM_DSM config is moved into smart_amp/Kconfig.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
The size argument to the memcpy_s() here is under the control of
external data and can fail on garbage. That needs to be a runtime
failure, not an assertion.
Signed-off-by: Andy Ross <andyross@google.com>
Struct cascade_root & mn are used by xtos build only so remove them for
zephyr native driver. And these two items are too specific to intel
platforms. Remove these item also save memory.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Due to sof_mtl_rt1019_rt5682 machine driver without BT_OFFLAD
bit and support 3 HDMI devices, so make the BT_OFFLOAD option
and subsequentially mapping SPK_ID from 7 to 6.
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Consider the variant projects with/without bt offload feature
so include BT_OFFLOAD pipelines as an option if needed
Signed-off-by: Mac Chiang <mac.chiang@intel.com>