Commit Graph

11749 Commits

Author SHA1 Message Date
Ranjani Sridharan 47a17d7fcf tools: plugin: tplg: Fix ibs/obs for all widgets
Set both ibs/obs to be based on the ALSA period_size to make sure that the
intermediate buffers are large enough.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 4feebf2a5c tools: plugin: tplg: Fix parsing of process widgets
For now, only process widgets that don't need the basecfg extension are
supported.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan 61fdc16240 tools: plugin: pcm: Add missing return
Add the missing return in the hw_free callback.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Ranjani Sridharan dfd8ffa069 audio: audio_stream: Explicitly cast to enum
To prevent the following with C++ compilation.
error: invalid conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘sof_ipc_frame’ [-fpermissive]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Jaroslaw Stelter 438b11bab2 lib: alloc: k_panic is not required in failure case
For rballoc_allign() call when caps are not correct it is
enough to return error. k_panic() call is not required here.
Previous change exposed this issue:
https://github.com/thesofproject/sof/issues/8832,
but it is sufficient to log error and return NULL at this point.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-02-14 14:56:39 +00:00
Adrian Bonislawski af80acccc6 logger: convert: fix variable type for negative value
time_precision variable can be used as -1

Fixes commit ff9343aa4a ("logger: convert: Fix compile time error with
newer toolchain")

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-02-13 17:20:49 +00:00
Iuliana Prodan a6700afea1 topology1: imx8ulp: overwrite CHANNELS_MIN
On 8ULP SAI is connected to BT which supports
only 1 channel for both playback and record.

Fixes: aaff352314 ('topology1: pipe-volume-capture.m4: Set minimum number of channels to 2')

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-12 20:07:47 +02:00
Marcin Szkudlinski 7c0c8a400c dp: delayed start should apply to the first DP cycle only
When DP start, copy from DP to LL should be delayed till first
DP deadline time.

In current implementation the cycle counter is set at every
DP scheduler trigger. If DP is - for any reason - scheduled
again before its deadline passes, the counter will be set again
and copying delay time will be too long. In extreme situation
(i.e. if OBS is set to long value when IBS is short - in this case
DP will proceed a short data chunks with a long deadline), it may
lead to permanent stuck in processing.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-12 18:09:48 +02:00
Marcin Szkudlinski 8b99003733 dp: add an error message in DP/LL copying
In case of theoretically impossible event of LL-DP
copy failure, an error message should be issued

Message is better than assert - as stated this should
never happen, but if it happens its better to have a
glitch + message than a crash

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-12 18:09:48 +02:00
Peter Ujfalusi 557e581ca8 board: intel_adsp_ace15_mtpm: Drop CONFIG_DMA_DW_SUSPEND_DRAIN
The purpose of CONFIG_DMA_DW_SUSPEND_DRAIN is to empty the FIFO before
disabling the channel by draining it.
Since the peripheral is disabled before the DMA
(CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE is not selected), the DMA will
not be able to do that causing drain timeout.

The stop is used in two cases:
Stream stop:
the content of the FIFO does not matter as we stop the stream.

Pause/resume:
On pause the DMA is suspended (DW_CFGL_SUSPEND bit set)
On resume the DMA is stopped, re-configured and then started again instead
of resuming

The peripheral is started after the DMA stop and start.

Leftover audio data might cause audio glitch on resume, it is probably
better to disable the draining.

Note: if we want to have draining enabled we need to select the
CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE at the same time to force the
DMA to be stopped before the DAI.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-02-09 19:25:40 +02:00
Peter Ujfalusi bdf2143d88 audio: dai-zephyr: Fix config option string for reversed trigger
The correct config to use for ifdef for reversing the stop trigger order
is CONFIG_COMP_DAI_STOP_TRIGGER_ORDER_REVERSE

Fixes: a6a80ec97a ("dai-zephyr: Fix the ordering of DAI and DMA triggers")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-02-09 19:25:40 +02:00
Brent Lu 5c3a1caec3 topology2: dmic-generic: rename volume switch
The volume switch of gain widget is renamed as 'Dmic0 Capture Volume'
for backward compatibility.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu 33e23766ff topology2: dmic-generic: add switch for LED control
Add a mute switch to gain widget for DMIC. Also register this switch
as MIC mute LED mixer control on Linux side.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu b2d1f09da5 topology2: gain: add mixer switch for mute control
Add a switch to gain widget for mute control. It could also be used
as MIC/SPK mute LED control purpose.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Brent Lu f9bcf61b9a audio: volume: support switch control
Implement function to support SOF_IPC4_SWITCH_CONTROL_PARAM_ID in
set_configuration callback. Linux side could use this switch control
to mute/unmute a gain widget.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2024-02-08 16:58:21 +00:00
Kalva, DineshKumar a25c70e183 amd: enable probe functionality config for AMD/Renoir platform.
Enable probe functionality config for AMD/Renoir platform.

Signed-off-by: Kalva, DineshKumar <dineshkumar.kalva@amd.com>
2024-02-08 16:04:18 +00:00
Kalva, DineshKumar cdd9863718 amd: initialization of dma descriptors for probe functionality for AMD/Renoir platform.
Initialization of dma descriptors for probe functionality
for AMD/Renoir platform.

Signed-off-by: Kalva, DineshKumar <dineshkumar.kalva@amd.com>
2024-02-08 16:04:18 +00:00
Marcin Szkudlinski 8e34109e10 AEC: Enable Google AEC with Mock compliation
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-08 11:48:20 +00:00
Marcin Szkudlinski b3d569a523 AEC: convert aec to use sink/src interface
This commit changes AEC to use sink/src interface
and makes it to be a DP module

it also enables optional usage of 32bit AEC API

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-02-08 11:48:20 +00:00
Marc Herbert e04289d6a9 scripts/fuzz.sh: add a -p "pristine" flag that deletes build-fuzz/
It's slower but safer when changing some parameters.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-07 12:50:08 +00:00
Guennadi Liakhovetski 7f4e6aed74 src: make coefficients constant
Make coefficients and their tables constant.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-07 12:37:23 +00:00
Guennadi Liakhovetski 45dc968cb2 lmdk: fix building system-service modules
System-service modules cannot include Zephyr headers and don't use
exported symbols, they link sink_api.c and source_api.c into their
images. Disable symbol exporting for them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-02-06 09:50:31 +02:00
Ranjani Sridharan a5bdcce1e1 topology2: Add topology for testing SOF plugin
The topology uses passthrough pipelines for playback/capture and
supports only 48k, 2ch, 16bit format for now.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-05 18:16:40 +02:00
Marc Herbert dd8b9328a9 app/prj.conf: stop forcing CONFIG_OUTPUT_DISASSEMBLY=y
This reverts 8f6018057b ("app: enable OUTPUT_DISASSEMBLY for Zephyr
builds")

The disassembly is useful in some contexts but can't be parallelized and
takes an enormous amount of time. On my system OUTPUT_DISASSEMBLY
almost doubles the compilation time!

Quoting Zephyr commit cc5763344709:

> This on-by-default option takes the majority of "link" time. If people
> need the disassembly, they can turn it on.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-02 17:19:38 +02:00
Marc Herbert 478e0b0e22 .github/zephyr: force -DCONFIG_OUTPUT_DISASSEMBLY=y
Force -DCONFIG_OUTPUT_DISASSEMBLY=y when building Zephyr to make sure
the disassembly is compared between the Windows and Linux builds.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-02 17:19:38 +02:00
Jaroslaw Stelter 8cad5bea57 lib: alloc: Use aligned allocation for L3_HEAP usage.
L3_HEAP is used in library manager for library storage buffer allocation
and in D3 enter/exit flows to allocate IMR context storage buffer.
Both buffers should be aligned so use rballoc_align() routine to get
correctly aligned buffers.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-02-01 12:15:30 +02:00
Jaroslaw Stelter 58a42e5fdb zephyr: lib: alloc: Use cached memory for L3 Heap
This patch implements recommended hardware flow for
Intel ACE platforms.
The L3 heap should be accessed via cached pointers
including management data.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2024-02-01 12:15:30 +02:00
Andrula Song d9bd3d29ce Audio: Aria: Use new ARIA HiFi config style
Use the new CONFIG_ARIA_HIFI style to choose right processing
file.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-31 23:41:21 +02:00
Andrula Song d46d7831cb Audio: Aria: Add HiFi5 SIMD align limit set.
Since the HiFi5 implementation of aria uses 32x4 load
and store instructions, so add the HiFi5 version alignment
set for aria.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-31 23:41:21 +02:00
Baofeng Tian 2752cdfe9c Volume: Add volume simd build option
With common header file change merged, this patch is using the
new HIFI definition to build different volume modules based on toolchain.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2024-01-30 20:01:18 +02:00
Marc Herbert a3045b83a6 .github: fallback on rebuild-testbench -j 1 when failing
Parallel builds are fast but they bury errors, for instance good luck
finding the cause of this failure:
 https://github.com/thesofproject/sof/actions/runs/7667629748/job/20897861756?pr=8019

Use the well known technique of falling back on a single thread when
failing.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-30 19:46:35 +02:00
Guennadi Liakhovetski 8bfb4896c7 llext: add or improve comments
Address clarity improvement requests from an earlier pull-request
review.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-29 18:42:23 +02:00
Andrula Song 193dec2c9f Topology: Topology2: Add sof-hda-benchmark-asrc32/24/16-<platform>
This patch adds build of hda-generic development topologies to
test ASRC component with s32/24/16 format.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-29 15:17:24 +00:00
Laurentiu Mihalcea d5b5c8ecb0 platform: imx93_a55: remove empty interrupt.h file
The interrupt.h file was never used and is empty so remove
it as an attempt to clean up the platform/imx93_a55 hierarchy.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-29 14:53:26 +00:00
Laurentiu Mihalcea 17844811db zephyr: interrupt.h: conditionally include drivers/interrupt.h
NXP's i.MX8 and Intel's CAVS are the only platforms using
Zephyr that also require the usage of drivers/interrupt.h. Since
for i.MX8 platforms drivers/interrupt.h is included through
xtos/rtos/interrupt.h, add a macro guard around the inclusion of
drivers/interrupt.h which will allow the other Zephyr platforms
(i.e: NXP's i.MX93 and Intel's ACE) to finally remove the SOF-specific
drivers/interrupt.h. This is desired because the platforms should only
rely on the Zephyr interrupt support instead of having to use
a hybrid between Zephyr and SOF interrupt support.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-29 14:53:26 +00:00
Laurentiu Mihalcea 3de7b96566 cleanup: remove direct inclusion of drivers/interrupt.h
Zephyr and XTOS' rtos/interrupt.h already include
drivers/interrupt.h so there's no need to include it again
in files which make use of one of the two rtos/interrupt.h
headers. As such, this commit removes all drivers/interrupt.h
inclusions from said files.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-29 14:53:26 +00:00
Marc Herbert 46eb79eb45 .github: use new checkout v4 option "filter: tree:0"
This saves time without affecting git describe like fetch depth does.

Also cancel fetch depth when building the firmware.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-29 16:45:19 +02:00
Marc Herbert da2b026c76 .github: upgrade all checkout actions, v3 -> v4
Fixes the new mass warnings:

Node.js 16 actions are deprecated. Please update the following
actions to use Node.js 20: actions/checkout@v3. For more information
see:
https://github.blog/changelog/
   2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

We've used checkout v4 in other places and everything worked fine.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-29 16:45:19 +02:00
Ievgen Ganakov a1deb74da0 copier: dai: use HD-A dai to configure soundwire on LNL
Since LNL soundwire uses HD-A DMA to transfer data. Add LNL specific
configuration to select HD-A DMA in case of SoundWire audio interface.
Refactor copier dai code for sndw/alh node id type.

Add support for sndw link aggregation mode for LNL platform based on
DMA config being sent during Copier Init Instance IPC.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2024-01-29 11:53:53 +02:00
Ievgen Ganakov 21bcf73aba ipc4: add helper function to parse dma config
Add helper function to parse muiltiple DMA config tlv structures
added to copier Init Instance IPC in case of SNDW FW aggregation.

To be able to find correct config we need to iterate over the
sequence of DMA tlv with the same tlv type. Thus, we need to check
if device_address value (which contains PDI) is equal to device_id
parameter (passed with alh_id value).

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2024-01-29 11:53:53 +02:00
Ievgen Ganakov b6cdc755bd ipc4: add host_dma_config array
Add host_dma_config array to be able to keep multiple
DMA tlv pointers. This change is needed to enable SNDW
FW aggregation using HD-A DMA on LNL

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2024-01-29 11:53:53 +02:00
Ievgen Ganakov ec90f1fff7 tlv: add tlv_value_ptr_get() function
Add function which retrieves pointer to the TLV structure value
of the specified type

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2024-01-29 11:53:53 +02:00
Balamurugan C 7002215a8d topology2: mtl: Generate topology for No headset codec
Adding make file changes to generate the topology file for the products
which doesn't have no ssp-based audio codec but need to support
HDMI audio playback and HDMI-in capture via I2S.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2024-01-29 11:52:21 +02:00
Balamurugan C f29230698a topology2: mtl: Override default HDMI DAI link id's
override the default HDMI DAI link id's by using make
define parameters instead of fixed in file.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2024-01-29 11:52:21 +02:00
Balamurugan C b9132421d3 topology2: mtl: Add headset codec macro
Adding HEADSET_CODEC macro and guarded the SSP configuration handling
under this macro.By this changes we can generate the topology
configuration for the products which has no headset codec.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
2024-01-29 11:52:21 +02:00
Anas Nashif 8b7c75addb app: fix filter in sample.yaml
nxp_adsp_imx8ulp needs to be in allowed platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-29 11:20:39 +02:00
Marc Herbert 3930270e3d Add new CONFIG_DCBLOCK_HIFI and move generic XCHAL_HAVE logic to common.h
1. The `if XCHAL_HAVE_HIFI4` macro logic is duplicated across many
source files. Starting with dcblock.h, make it generic and move it to
common.h

2. Add the ability to override the max available HIFI level using
Kconfig

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-26 19:58:11 +02:00
Guennadi Liakhovetski d119d93cae rimage: add a generic platform.toml
Instead of including TOML files for each platform explicitly, add a
generic platform.toml, that will contain all respective platform
TOML files, and select the correct one, based on build configucation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-26 17:56:14 +02:00
Guennadi Liakhovetski a967d955db rimage: mtl: extract platform part from mtl.toml.h
A part of mtl.toml.h is also needed for loadable modules, built for
MTL. Extract it into a separate file.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-26 17:56:14 +02:00
Guennadi Liakhovetski a8397dec44 module: fix cache synchronisation
Buffers, where modules are stored originally, don't need their caches
to be synchronised - they're only used as a data storage and only
accessed via cached aliases. But when final buffers are allocated,
from which modules are actually run, those buffers do indeed need
cache synchronisation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-26 17:56:14 +02:00