Commit Graph

12258 Commits

Author SHA1 Message Date
Serhiy Katsyuba 7bd1953e63 lmdk: Fix linker script
Specifying 0 address for .module section results in few GB binary file.
Instead, put .module section near .text or .rodata.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-08-05 18:56:56 +01:00
Serhiy Katsyuba de05d6d955 lmdk: Fix compilation of smart_amp_test example
Fixes compilation error when building smart_amp_test as loadable module
using LMDK.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-08-05 18:56:56 +01:00
Serhiy Katsyuba 3db25dee7c lmdk: Fix typo in README.md
Fixes typo in README.md.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-08-05 18:56:56 +01:00
Anne Onciulescu 47368160da src/audio/module_adapter/CMakeLists.txt: add MP3_ENC
The CADENCE_CODEC_MP3_ENC option was present in Kconfig
but missing from CMakeLists.txt.

Signed-off-by: Anne Onciulescu <anne.onciulescu@gmail.com>
2024-08-05 18:40:19 +03:00
Johny Lin 6ca76d5de1 multiband_drc: instantaneous enabled state switch on processing
In present multiband_drc design, the enabled state is determined by
the switch control while multiband_drc starts to process. If the
switch control toggles while processing, it will take effects on the
next time multiband_drc starts to process.

This commit makes change to let the enabled state update
instantaneously by the switch control toggle when multiband_drc is
processing.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
(cherry picked from commit 8e8ff75a76)
2024-08-05 16:12:32 +01:00
Pierre-Louis Bossart 22c3285788 topology2: sdw-dmic-generic: add eqiir to control DC offset
For some reason we had the EQIIR for topology1/IPC3 but we didn't add
it for topology2/IPC4.  All recordings show there's a strong DC offset
with RT722 and other codecs, so let's add this component by default in
the non-passthrough cases.

The widget is added in the scope of a pipeline, so that the
auto-generated instance is not handled at a global level.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 15:32:03 +01:00
Pierre-Louis Bossart 394b63a190 topology2: sdw-jack-generic: move eqiir widget in scope of pipeline
The widget should only be defined in the scope of a pipeline,
otherwise the instance management is global instead of local to the
pipeline.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 15:32:03 +01:00
Pierre-Louis Bossart dd4c68ed4c topology2: sdw-jack-generic: simplify capture formats
The ALH copier only supports 32bits stereo on capture. All the
additional formatls on the host copiers make no sense, and we also
don't need to generate 4ch on the host side.

It looks like the addition of the 1ch support was also problematic
since the link always operates with 2ch.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 14:30:25 +01:00
Pierre-Louis Bossart fab56b89de topology2: revisit use of SAMPLE_TYPE_MSB_INTEGER and SDW_LINK_VALID_BITS
These two variables should only be used on the link side. It makes no
sense to use them on the host-facing side of the DAI copier.

FIXME: do we need to use 3 formats for the ALH copiers, in most cases
there's really a need for a 32-bit format only?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 14:30:25 +01:00
Pierre-Louis Bossart ea0e4b51f2 topology2: remove audio_format
We need to use input_audio_format and output_audio_format.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 14:30:25 +01:00
Pierre-Louis Bossart 2e94170d50 topology2: add support for MTL Acer Swift Go 14
This device has RT712 on link0 2 PCH-attached DMICs.

Add 2 configurations with 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: https://github.com/thesofproject/linux/issues/4923
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-05 14:24:32 +01:00
Bard Liao 8394ac3d30 topology2: sof-mtl-rt712-l0: modify HDMI_IDs
There is no SDW DMIC or PCH DMIC included in the configuration. Thus the
last SDW link ID will be 2 and the HDMI link ID will start with 3.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2024-08-05 14:24:32 +01:00
Shriram Shastry a4c44ad2f9 Audio: Bugfix: Optimize level_update function and improve comments
Use int32_t instead of int64_t to improve performance in level_update.

Improve comments in max_mic_distance function to better explain the
distance calculation between all possible microphone pairs. Correct
the typo in line_array_mode_check function.

Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>

Address reviewer comments: Improve comments in max_mic_distance and
correct typo in line_array_mode_check
2024-08-05 10:42:40 +03:00
Shriram Shastry ae830b4a50 Audio: Bugfix: Correct loop boundary in line_array_mode_check
Adjust loop boundary to ensure correct number of elements are
processed.

Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
2024-08-05 10:42:40 +03:00
Shriram Shastry 5897d1c3a8 Audio: Bugfix: Optimize inner loop in max_mic_distance calculation
Start inner loop from i+1 to halve iterations and eliminate
redundant checks.

Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
2024-08-05 10:42:40 +03:00
Damian Nikodem 213306433f src: dai-zephyr: copy data to all available sinks
In the case where the copier has more than one output and,
additionally, we will be using a pin other than pin 0
(for example, when we want to copy data from pin 1 of
a gateway-type copier to the next pipeline), it is necessary
to copy data in playback path from the source to the output
for all possible active sinks.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-08-05 10:39:30 +03:00
Adrian Warecki ff0635ee84 module: interface: Mark functions whose implementation is optional
Add the label "(optional)" in the function documentation for functions
whose implementation by a module is optional. The module adapter checks
whether the function is provided by the module before calling it.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-08-05 10:30:21 +03:00
Adrian Warecki 013a7c94e3 module: base: Fix include guard name
Correct the include guard name which was not changed when changing the file
name.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-08-05 10:30:21 +03:00
Adrian Warecki f11cd1aac8 iadk: Remove unused Logger class
The Logger class ia a log wrapper intended for use by IADK loadable
modules. Remove it because it is not needed in the sof.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-08-05 10:30:21 +03:00
Adrian Warecki 005a582f48 iadk: lmdk: system_service: Add const modifier to system_service structure
Add the const modifier to system_service structures containing pointers to
shared functions to protect them from accidental modification.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-08-05 10:30:21 +03:00
Tomasz Leman 9b1981d6b0 west.yml: update zephyr to 3bcaa6f8d63
Total of 391 commits.

Changes include:

44464c4d4fc drivers: dai: intel: ssp: Introduce DMA control set API
5084decbc46 drivers: dai: intel: ssp: Refactor TLV parsing into a
            separate function
230709e4ae6 include: dai: Introduce runtime DAI configuration update API
1497f77cc89 intel: adsp: make SRAM power-off configurable
293fa118df9 intel: adsp: fix firmware image in IMR overwriting

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-08-05 10:14:32 +03:00
Pierre-Louis Bossart dc28dbdc6a topology2: add basic definitions for PTL
Start moving SoundWire topologies from the shadows into main...

We generate a single topology for RT722-based skews since the link
information is not used in the matching with the machine driver
dailinks. The same topology can be used for link0 or link3 setups.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-07-24 12:37:28 +01:00
Kai Vehmanen 39c16d5102 sof_ri_info: add Intel ARL-S production key
Key used in signed SOF-2.10 sof-arl-s.ri.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-07-24 11:44:39 +01:00
Kai Vehmanen 03e84c8a51 sof_ri_info: add Intel LNL production key
Key used in signed SOF-2.10 sof-lnl.ri.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-07-24 11:44:39 +01:00
Anne Onciulescu a544eb30ae app/stub_build_all_ipc3/4.conf: enable CONFIG_CADENCE_CODEC
This change enables CONFIG_CADENCE_CODEC in the app/stub_build_all_ipc3/4.conf files.
With this, the Cadence Codec component will be included in builds for CI testing.

Signed-off-by: Anne Onciulescu <anne.onciulescu@gmail.com>
2024-07-19 11:54:16 +03:00
Marc Herbert 8847de0555 intel_adsp_ace15_mtpm.conf: temporarily disable CONFIG_MODULES
Temporarily disable CONFIG_MODULES to get MTL working again.

Avoids crash https://github.com/thesofproject/sof/issues/9308

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-18 21:51:51 +03:00
Serhiy Katsyuba d629e52102 ipc4: copier: Add IPC4 channel map handler
Adds IPC4_COPIER_MODULE_CFG_PARAM_CHANNEL_MAP handler that applies
channel map to DAI gateway audio conversion function.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba ffce2cbd93 ipc4: copier: Extend get_convertion_func() to support remapping
Adds channel map parameter to get_convertion_func() to support remapping
conversion functions.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba eda6029736 dai-zephyr: Prioritize HW params channels over base config params
When the hardware is able to return a valid number of DMA buffer audio
channels (e.g., extracted from a blob), give the returned number
of channels higher precedence over the number supplied via the base config
params.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba 8082006042 ipc4: pcm_converter: Add channel remapping conversion functions
Adds a set of conversion functions that perform both format conversion
and channel remapping. These are required to swap channels for the device
posture feature.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba 319978685d pcm_converter: Add channel map parameter
Adds a channel map parameter to conversion functions, allowing for
the introduction of conversions that can handle both format conversion
and channel remapping.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba 8b927ad497 dai-zephyr: Use frames, not samples, for DMA copy bytes calculation
Prepare DAI gateway to support channel remapping conversion functions
that can modify number of channels. Consequently, frames, not samples,
should be used for DMA copy bytes calculation.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba 6e183cbf53 dai-zephyr: Fix to avoid using buffers with uninitialized stream params
Copier may have multiple sinks connected to different pipelines. While
the copier pipeline might already be running, the sink pipeline has not yet
initialized stream parameters of the buffer connected to copier's sink.
It appears that checking for the sink component state is not enough.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Serhiy Katsyuba ee66620b2b ipc4: dai-zephyr: Do not reuse process func as multi-gateway channel copy
The multi-gateway channel copy function and the DAI process function serve distinct purposes.
Although they currently share the same number of arguments of the same type, this similarity
is coincidental and might be changed during future refactoring.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-07-17 15:27:41 +03:00
Tomasz Leman 5a000e825b west.yml: update zephyr to 740d7f735e2
Total of 369 commits.

Changes include:

46b356a6b0e intel-adsp: fix ACE power-off assembly
fb53d2ef8dd ace: power: replace pseudo-assembly movi

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-17 12:32:52 +03:00
Guennadi Liakhovetski 3051607efb kcps: fix 0 module CPC case
If a module contains 0 as its CPC value, the consumption calculation
routine will assign a "safe" maximum value to keep the DSP running at
the maximum clock rate. This works when constructing a pipeline, but
when a pipeline is torn down, returning the maximum clock rate leads
to the clock being reduced to a small value. Fix this by detecting
such cases in pipeline termination code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski 3f84f32088 drc: make modular on MTL and LNL
Export missing symbols for modular DRC builds and select it as a
module on MTL and LNL. DRC isn't built by default, so we cannot
use CONFIG_LIBRARY_DEFAULT_MODULAR for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski c06ad78195 drc: enable building as an llext module
Add support for LLEXT building to drc. Since multiband DRC calls
functions from DRC, we cannot so far build it if DRC is configured as
a module. In the future it should be possible to build both as
modules and to export symbols between them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski b22ccafcc9 llext: export symbols, required for modular DRC
Export additional symbols, required for building DRC as an LLEXT
object.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski 87e973d32f llext: disable when testing reproducible builds
So far we cannot build identical LLEXT modules under Linux and
Windows, build a monolithic firmware for this test.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski cf2a616492 llext: remove logging during module freeing
When pipelines are destroyed, component drivers' .reset() and .free()
are called. If those drivers were loaded dynamically their memory is
then unmapped. But logging takes place in a low priority task, so it
is important that no logging is done from those methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski ba5ff444d1 rimage: don't overwrite maximum module instance counts
Use maximum instance count from TOML when building a manifest.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski 3f19277dfd llext: add maximum instance count support
Maximum instance count cannot be zero, they have to be supplied by
respective modules.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski 58bedd9a13 samples: (cosmetic) clean up Kconfig spacing
Use consistent TABs and spaces in src/samples/audio/Kconfig

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski 9d01d8c8f2 ipc4: a failure to find a driver might not be fatal
When ipc4_get_drv() fails to find a driver, it might mean, that the
driver needs to be linked dynamically. Printing an error in such a
case wrongly fails CI testing.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-16 15:29:47 +03:00
Guennadi Liakhovetski a98fb5c79c llext: fix Windows builds
Under windows the Python interpreter has to be called explicitly.
Without it an attempt to execute a Python script fails silently.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Suggested-by: Marc Herbert <marc.herbert@intel.com>
2024-07-16 15:29:47 +03:00
Pierre-Louis Bossart 6382963fb5 topology2: force all SoundWire link-side copiers to use S24_LE
Using S32_LE wastes bandwdith for no good reason, we should use 24
bits on the link to maximize bus efficiency with the 9.6 MHz bus
clock.

There is no need for a kernel-side change, the dailink fixup already
changes the dailink format based on the topology information.

Link: https://github.com/thesofproject/sof/issues/8960
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-07-15 18:54:45 +03:00
Adrian Warecki 5c725697d8 copier: Add bind function to configure sink buffers params
Setting the sink buffers parameters in the copier_update_params function is
not sufficient. If a sink buffer is attached during copier operation, the
module will not set buffers parameters. Add bind function to configure sink
buffers parameters.

There is no need to configure sink buffers parameters on each copy. We are
assured that they were configured at the time of bind. Remove
ipc4_update_buffer_format from the copier_module_copy function.

Fixes: #9123

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-07-15 18:54:07 +03:00
Adrian Warecki da35d204a5 copier: Remove update of sink buffer format in copier_set_sink_fmt
Sink format can only be set when the sink buffer is not binded. Sink
buffer parameters will be set on binding. Remove redundant code.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-07-15 18:54:07 +03:00
Adrian Warecki 024df27b02 copier: Remove update source buffer format
A data producing component is responsible for setting a sink buffer
parameters. It is not necessary for the copier to override source buffer
parameters. Remove the code responsible for it.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-07-15 18:54:07 +03:00