Commit Graph

10476 Commits

Author SHA1 Message Date
Adrian Bonislawski 4832dc9388 ipc4: multi pipeline set state on different cores
This will allow to correctly set multiple pipelines state
even if they are allocated on different cores.

ipc4_set_pipeline_state will check if several cores are involved
- set ppl state if only current core requested
- process IPC on another core if only single secondary core requested
- send IDC messages if several secondary cores involved

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-07-31 15:55:36 +02:00
Laurentiu Mihalcea 54959a83ac src: drivers: imx: ipc.c: Don't assert GIR twice
According to MU's documentation from the i.MX TRM, setting
the GIRn bit to 1 if already 1 may lead to issuing a second interrupt.

This leads to kernel errors such as:

"reply size (16) exceeds the buffer size (12)"

because of the fact that the MU IRQ is triggered prematurely and
the firmware doesn't have enough time to write the reply. As such,
the host will read the message it has sent to the firmware instead
of its reply.

To fix this, make sure that GIRn is set to 0 before setting it 1.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-07-31 14:47:35 +01:00
Trevor Wu 23f009f830 buffer: fix DSP panic caused by buffer_attach
When using buffer_attach() on MediaTek platform after commit 3e3d0cde,
invalidating the dcache of a list can result in DSP panic.

To make sure that cached and uncached access is performed correctly on
Intel DSP implementations, invalidating the cache is necessary only for
INTEL platform. Therefore, adding #if CONFIG_INTEL to make the line
specific to INTEL platform.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-07-31 12:23:29 +01:00
Curtis Malainey eb91a7f1fc ipc3: Deprecate invalid enums
Mark enums that are unused or never implemented as deprecated since they
will never be implemented as IPC3 is legacy.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-31 12:22:13 +01:00
Andrula Song efba70fdbe Audio: Fix the aligned feature comments
Fix the comments of align_frame_cnt and align_shift_idx to
make them more clear and understandable.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-07-31 11:29:14 +01:00
Andrey Borisovich e8fdfdda7a west.yml: Update rimage revision to aa0ac9ea
Pull in following rimage changes:
aa0ac9eae6 rimage.c: fix bug where -p requires a new
and ignored parameter

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-07-31 11:21:50 +01:00
Baofeng Tian 79532b8dbc copier: fix no consume for multi endpoint copy
In last time copier code split, it split multi-endpoint copy and
module copy with commit: e424b87, source buffer consume was missed,
added it back with this PR.

Fixes:#7979

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-31 08:59:15 +01:00
Serhiy Katsyuba cff23f5c4e Fix panic upon cancelling not scheduled task
Calling zephyr_ll_task_cancel() for a task which was actually never
scheduled results later in panic in zephyr_ll_task_done().

The fix makes zephyr_ll_task_cancel() do nothing for tasks which were
only initialized but never scheduled.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-28 19:15:05 +03:00
Daniel Baluta 6a70f38b15 imx: memory: Fix mixer going out of memory
Commit 05871a16de ("pipeline2.0: add source/sink api to
audio_stream") added two new fields to `struct audio_stream`:

 struct audio_stream {
+       struct sof_source source_api;
+       struct sof_sink sink_api;

and because `struct audio_stream` is part of `struct comp_buffer`
we see an increase of `struct comp_buffer` size from 256 to 384.

With this modification, i.MX mixer use case goes out of memory:

c0 dma-trace src/lib/alloc.c:765    ERROR failed to alloc 0x180 bytes zone 0x4 caps 0x1 flags 0x0
c0 dma-trace src/audio/buffer.c:51  ERROR buffer_alloc(): could not alloc structure

This is not ideal. Anyhow, it was necessary for new source/sink API.

Fix this by increasing the number of 512-byte heap blocks to 32.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-07-26 14:43:12 +01:00
Serhiy Katsyuba bfd134ff4c Fix pipeline_get_dai_comp_latency() for cross core
Pipeline data is allocated in cached space. This workaround
prevents from accessing another core pipeline data when
calculating latency.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-26 14:39:14 +01:00
Serhiy Katsyuba 071ba084a6 Add remote get_attribute for cross core connection
To support pipelines connection between cores, ipc4_create_buffer()
must be able to create buffer shared between source and sink
components created on different cores. ipc4_create_buffer() requires
source component obs size. When both source and sink components
created on same core, ipc4_create_buffer() is executed on that core,
otherwise it is executed of core 0 (IPC processing core). So for the
case when source and sink components are created on different cores
comp_get_attribute_remote() is used to receive source obs size.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-26 14:39:14 +01:00
Serhiy Katsyuba a63a877dbe bind/unbind support for cross core connection
bind/unbind handler must be called from core on which component was
created.
When both source and sink components are created on same core,
bind/unbind IPC is processed on that core. However, when connected
source and sink are on different cores, IPC is processed on core 0.
Hence comp_bind_remote() and comp_unbide_remote() is added to call
bind/unbide from proper core.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-26 14:39:14 +01:00
Curtis Malainey 1a89639cf0 ci: Add build all config
Utilize the posix build so that as many components as possible can be
built at once. Also build a bunch of `default n` components as well.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey deed9a8808 scripts: fuzz: add support for build and overlays
Add support to specify an overlay file to use with the fuzz script and
another flag to build without fuzzing

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey c5f00bfde7 audio: dsm: add stub for maxim dsm
Add a stub for the library so fuzzers and CI can compile the adapter

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 266a8f82b7 audio: rtnr: add stub for testing
Fuzzing and CI only stub library

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 3c6f2c1c63 audio: igo: add igo stub library
Added for CI and fuzz testing

Also remove exec permissions on related source files

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey d28785ce73 audio: dts: Add library stub
This will allow the fuzzer to probe deeper into the code while also
allowing CI to build test the adapter.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 74a0e0f1fe audio: waves: add maxx stub
Add a stub for the Waves library for the fuzzer to build against. This
will also improve build tests in CI.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey d4afff0112 audio: Kconfig: Add toplevel stub switch
Now that we have the ability to do a posix builds we can start working
towards a "make allyesconfig" equivalent. One limitation though is that
we cannot build what we don't have, in this case 3P blocks. This commit
adds a toplevel config for 3P adapters to switch to a stub file so they
can still have their builds validated. These will also be eventually
enabled in the fuzzers.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Marcin Szkudlinski 55d8f41066 Revert "Audio: SRC: Add safeguard against missing, wrong size or type init data"
This reverts commit 4849a71ada.

The commit has been merged with CI test fail
The test is now failing constantly making CI unusabe

Either CI test or the code requires changes before merging

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-07-26 12:43:10 +01:00
Jyri Sarha 4849a71ada Audio: SRC: Add safeguard against missing, wrong size or type init data
In some error situations the configuration init_data may be NULL, and
in such a situations we should fail gracefully and not crash. Also adds
check that the IPC message is of correct size and of correct type.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-07-25 11:00:21 -07:00
Seppo Ingalsuo 619477a186 App: Overlays: Add DRC component build to TGL, TGL-H, ACE
This patch adds CONFIG_COMP_DRC=y for IPC4 Intel platform
builds.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-25 15:48:08 +01:00
Seppo Ingalsuo 8d83e5b099 Audio: DRC: Sort header files include statements
The includes are sorted to level 4, 3, 2, 1 and
alphabetic sort order.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-25 15:48:08 +01:00
Seppo Ingalsuo 30a834a9d4 Audio: DRC: Add IPC4 support
This patch adds to component prepare() handling of IPC4 module
init parameters and set of sink parameters with audio format
from there.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-25 15:48:08 +01:00
Seppo Ingalsuo 5856042024 Audio: DRC: Convert component to module adapter API
This patch replaces legacy component API with new module adapter
API. There are no changes to functionality.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-25 15:48:08 +01:00
Flavio Ceolin 07455c572e zephyr: s/MP_NUM_CPUS/MP_MAX_NUM_CPUS/
Zephyr uses MP_MAX_NUM_CPUS internally to represent the
number of cores available and consequently to allocate
resources. It is even expected, and checked through assert,
that these two symbols have the same value. Use different
value can lead to an undesired behavior, so lets use
MP_MAX_NUM_CPUS.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-25 15:27:05 +01:00
SaiSurya, Ch cbee96c9bb scripts: add support for vangogh platform
Add support for Vangogh platform in build scripts.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch b1683ec1d6 amd: vangogh: add build support for vangogh
Add build support to enable vangogh platform.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya Ch ea233be4a7 tools: topology: add vangogh topology support
Add vangogh platform topology for nau8821,max988388.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch da39550a4f src: arch: xtensa: configs: add defconfig
Add defconfig for vangogh platform.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch 90ac563cee Add HS I2S DMA capabilities.
Define HS I2S DMA capabilities.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch d033181551 drivers: amd: vangogh: add drivers support for vangogh platform
Add drivers support for vangogh platform.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch ea546c933b platform: Add vangogh platform support
Add vangogh platform support

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch a8967f784c platform: amd: create common platform code for different amd platforms
- Renoir and rembrandt have the common functionality.
   Moving the common code to common folder as per the recommendation from
   maintainers and to support future platform's common functionality.
 - Remove unused code.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
SaiSurya, Ch 13fc45e8fa drivers: amd: create common driver code for different amd platforms
- Renoir and Rembrandt have the common functionality.
   Moving the common code to common folder as per the recommendation from
   maintainers and to support future platform's common functionality.
 - Remove unused code.

Signed-off-by: SaiSurya, Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-07-25 15:00:03 +01:00
Adrian Warecki a38458dd22 pcm_converter: Add support for U8 <-> S32 conversion
Added functions that convert between 8-bit unsigned and 32-bit signed
format.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Adrian Warecki 404b0760a6 format: 8-bit saturation inline function
Added a new inline function which saturates 8-bit signed value.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Adrian Warecki 72d19a7030 pcm_converter: Add support for copying 8-bit formats
Added support for copying 8-bit unsigned probes in 8 and 16 bit containers.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Adrian Warecki a0e2d961ed format: stream: Add support for unsigned 8 bit format
Defined a new frame type SOF_IPC_FRAME_U8 for 8-bit unsigned samples. Added
support for a new format to stream format conversion function and
get_sample_bytes function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Adrian Warecki 722d86301a cmocka: volume: Add default case to handle unsupported formats
The switch supporting various sample formats was missing a default handler,
which caused compilation errors when enabling/adding a new format that is
not supported.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Adrian Warecki a60492e848 cmocka: selector: Add default case to handle unsupported formats
The switch supporting various sample formats was missing a default handler,
which caused compilation errors when enabling/adding a new format that is
not supported.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-07-24 16:53:20 +01:00
Yong Zhi a6de3b1602 topology2: cavs-rt5682: Change ECHO_REF_PCM_ID to 29 to avoid conflict
Fix tplgtool2.py caught error with sof-mtl-max98357a-rt5682.tplg

ERROR: Multiple pcm id=27: 2 (['EchoRef', 'DMIC0 RTC AEC'])

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-24 16:38:34 +01:00
Curtis Malainey fbde1dccf8 samples: Fix zephyr config
Samples should not be built without the kconfig option

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-24 12:03:21 +03:00
Sathya Prakash M R 214f98378f smart amp : Do not use DYNAMIC topology
DYNAMIC topology should not be used for pipeline with volatile
Kcontrols.
Hence ensuring the flag is un defined before processing
smart amp related PCM and DAI configs

Suggested-by: Sridharan, Ranjani <ranjani.sridharan@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
2023-07-20 22:10:43 +03:00
Chao Song fc1ddf95d4 topology2: fix conditional inclusion of DMIC snippets for nocodec
DMIC now is controlled by two variables, PASSHTHROUGH
and NUM_DMICS, we should consider the values for both
variables to decide the inclusion of DMIC pipelines,
routes, widgets, etc.

Fixes: #7931

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-07-20 09:57:12 -07:00
Peter Ujfalusi 1411dd6607 board: intel_adsp_cavs25_tglh: 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
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