Commit Graph

10379 Commits

Author SHA1 Message Date
Peter Ujfalusi df5576872f board: intel_adsp_cavs25: Disable DTRACE
DTRACE is IPC3 only, it is not used anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-07-20 12:12:46 +03:00
Curtis Malainey 011de4a094 audio: dsm: fix include path
Header is not in the include directory, add inclusion directive

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-19 14:21:37 +03:00
Curtis Malainey 35fe98f4d9 audio: dsm: remove dependency on CAVS
If there is a compat issue it will show up at build time, also it blocks
stubbing out the library, so remove it.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-19 14:21:37 +03:00
Daniel Baluta 95874fd8e2 ipc3: helper: Fix mixer scenario
With mixer after commit 21ed10abf8 ("ipc3: helper: Do not silently
accept unrecognized component type in IPC") we get the following error

dma-trace  src/ipc/ipc3/helper.c:333  ERROR comp_new(): component type not recognized

This happens because now we return an error from comp_specific_builder() with the default
case.

Fix this by adding a case for mixer.

Fixes: 21ed10abf8 ("ipc3: helper: Do not silently accept unrecognized component type in IPC")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-07-18 09:26:08 -07:00
Curtis Malainey 803f61323c audio: constify buffer_fmt get args
we aren't modifying it, so make it const

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-18 14:58:45 +03:00
Jyri Sarha 21ed10abf8 ipc3: helper: Do not silently accept unrecognized component type in IPC
Return an error code from comp_specific_builder() if the component
type is not recognized, instead of just silently ignoring the error.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-07-17 10:37:52 +03:00
Curtis Malainey be2c2fc000 audio: rtnr: add headers for type dependencies
many of these headers don't include what they actually use, correct by
including

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-17 10:23:51 +03:00
Curtis Malainey d9f6d07186 audio: rtnr: partial revert of 589df2aea4
The original commit failed to take into account that the assigned stream
was an adapter (not audio_stream) therefore revert in this file since
the adapter is unchanged.

Fixes: 589df2aea4 ("buffer: don't access stream internals")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-17 10:23:51 +03:00
Curtis Malainey cdb115f58e audio: rtnr: fix function arg attributes
constify RO params

Fixes: 10f6dd0d7b ("module-adapter: add a constant data pointer")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-17 10:23:51 +03:00
SaiSurya Ch 2475094eef Dockerfile: add AMD/Vangogh gcc toolchain
Add AMD/Vangogh gcc toolchain.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-14 12:50:49 +01:00
Andrula Song 21b637e16a Audio: Volume: Fix the HiFi4 version peak meter update error
Fix the HiFi4 version of volume processing peak meter update
error.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-07-14 12:38:29 +01:00
Andrula Song b27515eb2f Audio: Normalize the 16/16 bit format peak meter to 32 bits.
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>
2023-07-14 12:38:29 +01:00
Curtis Malainey 6b46b8d7d9 audio: drc: fix missing header
Also remove from incorporated C file.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 12:36:48 +01:00
Curtis Malainey 6b8acc52d9 audio: dts: fix buffer_fmt lookup
Missed conversion

Fixes: 90828e2305 ("buffer: external modules use API to access buffer_fmt")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 12:33:42 +01:00
Curtis Malainey 48620f7a90 audio: dts: Fix header pathing
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>
2023-07-14 12:33:42 +01:00
Curtis Malainey 9d51b5c10f audio: delete switch component
mostly not implemented and hasn't been meaningfully touched in > 3 yr.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 12:33:10 +01:00
Yong Zhi 47cb612379 topology2: speaker-echo-ref.conf: Use macros for PCM ID
Use macro to avoid hardcoding of the PCM Id.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-14 14:29:12 +03:00
Marc Herbert 6ddf6c0f40 module_interface.h: add forward struct comp_dev and timestamp_data
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>
2023-07-14 12:03:14 +01:00
Curtis Malainey 90aebd1d9c audio: waves: Fix buffer accessors
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>
2023-07-14 13:43:02 +03:00
Curtis Malainey 46a78b20b8 audio: waves: fix header include pathing
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>
2023-07-14 13:43:02 +03:00
Curtis Malainey 3bf8ffc7a0 audio: igo: add missing header include
Needed for the config type

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 13:24:16 +03:00
Curtis Malainey 3d7344f4a2 audio: igo: remove unneeded header path include
The headers are under the main include directory

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 13:24:16 +03:00
Curtis Malainey ed04c4f150 audio: igo: fix create arg attributes
Creation is done with constant args

Fixes: 10f6dd0d7b ("module-adapter: add a constant data pointer")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 13:24:16 +03:00
Curtis Malainey 3e03232da7 audio: igo: Fix buffer access arg
missing reference

Fixes: 589df2aea4 ("buffer: don't access stream internals")
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 13:24:16 +03:00
Jyri Sarha 70272282db volume: Bail out if there is no configuration or it is of wrong size
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>
2023-07-13 16:56:17 +01:00
Ranjani Sridharan 385110cf9d audio: volume: Simplify volume_params()
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 7427d7fe36 audio: asrc: Update stream params from base config
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan a1776860b6 audio: asrc: Fix a typo
Fix the function name in the comment.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 4779aa7397 ipc4: Expose ipc4_update_buffer_format()
It will be needed by other modules as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan a25cdbb90b audio: module_adapter: Update stream params
Update the pipeline params based on the base config.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 2446e236e7 ipc4: base-config: Expose ipc4_base_module_cfg_to_stream_params()
It will be needed by other modules.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 5832e85222 audio: copier: Convert module to use module interface
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan db30cf8b99 audio: module_adapter: Isolate the module state checks to IPC3
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan d0b7d2fc5d audio: volume: Remove state check
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 5f6f22d25e audio: module_adapter: Prepare to convert copier to use module interface
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 9cc6454df6 module_adapter: Extend the module interface for endpoint devices
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>
2023-07-13 13:49:48 +01:00
Ranjani Sridharan 5433e371b8 module_adapter: Extend the module interface
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>
2023-07-13 13:49:48 +01:00
Rander Wang 2d02dd0ed5 cavs: remove CONFIG_CAVS_LPRO_ONLY and clean up the code
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>
2023-07-13 13:48:51 +01:00
Rander Wang ed6f48b94d platform: cavs: remove hw clk setting in platform_init
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>
2023-07-13 13:48:51 +01:00
Rander Wang 1032fa30ed platform: cavs: don't program general owner and io registers
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>
2023-07-13 13:48:51 +01:00
Adrian Warecki 1d6abcd074 module_adapter: SystemAgent: Suppress unused variable warning
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>
2023-07-13 13:47:50 +01:00
Adrian Warecki 114cd6f4c4 hifi3: aria: peakvol: Remove unused variables
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>
2023-07-13 13:47:50 +01:00
SaiSurya Ch 8fb4860007 west.yml: Update rimage revision to 48777207
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>
2023-07-13 14:10:03 +03:00
Dobrowolski, PawelX 479c7942ab iadk_modules refactor
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>
2023-07-12 16:41:18 +01:00
Dobrowolski, PawelX c66ed3eaef iadk_modules: module_init: checking type of module
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>
2023-07-12 16:41:18 +01:00
Dobrowolski, PawelX 2cdf38c47e module_adapter: native_system_agent: Introduce call and interface
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>
2023-07-12 16:41:18 +01:00
Dobrowolski, PawelX e2ad42f0d3 loadable module: module api version structure
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>
2023-07-12 16:41:18 +01:00
Trevor Wu 70c257f9ae drivers: mtk: get memif format from config of DAI component
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>
2023-07-12 11:58:08 +03:00
Trevor Wu 734dbd38f0 drivers: mtk: add missing argument
One argument is lost in the debug message. Add missing rptr in the
patch.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-07-12 11:58:08 +03:00
Rander Wang 6ddd6554b9 west.yml: upgrade Zephyr revision - Restore IDC interrupt on D3 exit
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>
2023-07-12 10:16:45 +03:00