Commit Graph

12284 Commits

Author SHA1 Message Date
Laurentiu Mihalcea aa42205027 Kconfig: make `COMPILER_WORKAROUND_CACHE_ATTR` depend on xtensa
`CONFIG_COMPILER_WORKAROUND_CACHE_ATTR` is only applicable to
xtensa-based platforms. As such, add dependency on `CONFIG_XTENSA`.

Additionally, `CONFIG_IMX` should be selected by all imx platforms.
Since not all imx platforms are xtensa-based, make sure
`COMPILER_WORKAROUND_CACHE_ATTR` is selected only for those platforms.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-20 11:51:41 +03:00
Eddy Hsu 0e5ba1fb70 Add topology for CTC.
Add topology in development to test CTC.

Signed-off-by: Eddy Hsu <eddyhsu@google.com>
2024-08-19 12:58:46 -07:00
Seppo Ingalsuo dea518e024 Tools: Topology2: DMIC: Bug fix 4ch host copier channels count
This patch fixes a recently introduced bug that impacts most
of 4ch DMIC topologies.

The NUM_DMICS=4 controls DAI channels count, while the
DMIC0_PCM_CHANNELS controls host copier channels count. In
most topologies built the DMIC0_PCM_CHANNELS remained in
default 2 setting if it was not explicitly set in cmake target
definitions.

As result the "arecord -c 4" attempt failed e.g. with common
sof-hda-generic-4ch.tplg.

Fixes: 88366121b3 ("Tools: Topology2:
       Add DMIC Enhanced Audio Capture development tplg")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-19 15:24:06 +03:00
Seppo Ingalsuo 88366121b3 Tools: Topology2: Add DMIC Enhanced Audio Capture development tplg
This patch adds to DMIC0 capture TDFB beamformer and DRC for
dynamic range control. The names of updated topologies are
sof-hda-efx-generic-2ch.tplg and sof-hda-efx-generic-4ch.
The efx topologies with mbdrc are updated similarly.

The pipeline is enabled if DMIC0_ENHANCED_CAPTURE is set to true
in topologies build. They keys EFX_DMIC0_TDFB_PARAMS and
EFX_DMIC0_DRC_PARAMS control the configurations blobs use.

Build parameter DMIC0_PCM_CHANNELS controls the number of output
channels for beamformer. It is by default two.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo 95a0ffc0d4 Tools: Topology2: Add beamformer and DRC to HDA analog capture
This patch adds to analog microphone capture pipeline TDFB
beamformer and DRC for dynamic range control. The name of updated
topology is sof-hda-efx-generic.tplg. Similar capture enhance is
added to multi-band DRC version sof-hda-efx-mbdrc-generic.tplg.

The pipeline is enabled if HDA_MIC_ENHANCED_CAPTURE is set to true
in topologies build. They keys EFX_HDA_MIC_TDFB_PARAMS and
EFX_HDA_MIC_DRC_PARAMS control the configurations blobs use.

There is no processing applied to capture audio since the topology
is built with passthrough blobs. E.g. UCM should set up processing
with blobs those have effect.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo ea1e318ce6 Tools: Topology2: Add default DRC blobs
This patch adds a DRC blob for DMIC capture and renames the
speaker blob.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo e4467dfc26 Tools: Topology2: Add configuration blobs for TDFB
This patch adds a number of configuration blobs for the
time-domain fixed beamformer component. The blobs include
pass-through and generic narrow angle stereo beamforming for
two and four microphones line array systems.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo 56fa2defae Tools: Topology2: Remove mandatory name attribute from enum control
This change allows to disable and hide the control by omitting name
define if it is not useful in the topology. Also other ALSA controls
no more require mandatory name.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo a811e2bac3 Tools: Topology2: Add module copier to HDA analog capture EXF tplg
This patch updates similarly as for hda-generic the analog capture.
Before the patch the capture path pipelines are:

dai-copier.HDA.Analog.capture --> host-copier.0.capture

After this change:

dai-copier.HDA.Analog.capture --> eqiir.4.1
                              --> module-copier.4.2
                              --> host-copier.0.capture

To use the same dai-copier-eqiir-module-copier-capture tplg code
chunk as in hda-generic, the macros HDA_ANALOG_CAPTURE and
HDA_ANALOG_PLAYBACK_RATE were added.

The addition of IIR to capture mitigates the capture start transients
similarly as in hda-generic.

This change adds 7.7 MCPS from IIR, and 2.2 MCPS from module-copier
in TGL platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo ea746d749a Tools: Topology2: Move in DMIC capture gain from host to dai pipeline
This change adds volume and switch  "Dmic0" into dai-copier pipeline.
It ensures that all capture from DMIC follows the mute key control
even if some other processing and PCMs are added to module copier.

The patch adds a new pipeline class
dai-copier-eqiir-gain-module-copier-capture. It is similar as
replaced dai-copier-eqiir-module-copier-capture but adds the
gain component.

The confusing DMIC0_DAI_GAIN (set to eqiir) is removed from all
top level topologies (nocodec, rt5682, sdw, hda).

After this a typical DMIC0 pipeline looks like:

dai-copier --> eqiir --> gain --> module-copier --> host-copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Seppo Ingalsuo dbfd35a8a9 Tools: Topology2: Remove gain from DMIC host copier pipeline
This change prepares for adding it instead to DMIC DAI copier
pipeline. There it will control mute/unmute for all possible
module copier connected other capture PCMs.

The pipeline object gain-capture is replaced with simpler
host-gateway-capture. The definition of DMIC0_HOST_PIPELINE_SINK
need to be changed from gain to host-copier.

With this patch, the typical DMIC capture path looks like:

dai-copier --> eqiir --> module-copier --> host-copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-14 15:23:33 +01:00
Marcin Szkudlinski 6c29ad3fb6 buf: fixes for CONFIG_INCOHERENT=0 builds
there's no point with cache writeback/invalidate
for coherent architectures. Also the buffer may be set
as "shared" at any moment, not only at creation time

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-08-14 12:32:29 +03:00
Marcin Szkudlinski 19872fb5a5 fix: remove cache ops for coherent architectures
For cache alignment, PLATFORM_DCACHE_ALIGN is a better macro
than DCACHE_LINE_SIZE (for some compilations not even defined)

For CONFIG_INCOHERENT=0 compilation, it does not make any sense
to call writeback/invalidate operations

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-08-14 12:32:29 +03:00
Marc Herbert 72aaf783ba rebuild-testbench.sh: switch to new SOF_CC_BASE variable
It was awkward to depend on ZEPHYR_TOOLCHAIN_VARIANT when the testbench
has absolutely nothing to do with it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-14 09:58:38 +03:00
Marc Herbert cbb08a7451 scripts: add new SOF_CC_BASE={xcc,clang,gcc} variable
This is required to allow building XTOS with newer, clang-based, Cadence
toolchains as just submitted for ACP_7_0 in #9351

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-14 09:58:38 +03:00
Marc Herbert 1ce1b2882a xtensa-build-all.sh: do not fallback on gcc when xcc dir is wrong
If the user requested the Cadence toolchain by defining
$XTENSA_TOOLS_ROOT, then do not "correct" the user and fallback on gcc
when that variable is wrong. Fail and point at the problem instead. No
one ever pays attention to build logs; as shown by new warnings being
submitted on a regular basis.

This also removes the local variable "XCC", the name of which was
collision-prone and confusingly capitalized.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-14 09:58:38 +03:00
Marc Herbert 8236f38d08 xtensa-build-all.sh: rename local variable COMPILER to build_dir_suffix
"COMPILER" is a very common name with a high risk of collision. Don't
use it for a minor, local variable. This also reduces confusion.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-14 09:58:38 +03:00
Marc Herbert b8a4ddffac set_xtensa_params.sh: silence warnings which are wrong when sourced
We can't have a shebang and of course all variables are unused.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-14 09:58:38 +03:00
Tomasz Leman 118cf4634f west.yml: update zephyr to 795ac34f291
Total of 553 commits.

Changes include:

2fcdbba534b intel_adsp/ace: power: pad the hpsram_mask passed to
            power_down
d590c186728 intel_adsp: ace: call soc_num_cpus_init early
c79bbfadbbd xtensa: move arch_kernel_init code into prep_c
dbfbf0edbad xtensa: adapt soc code to use prep_c
42396735bf7 xtensa: introduce prep_c for xtensa
299dddfdce1 xtensa: remove mention of crt0-app.S
ed31037d5fd drivers: ssp: fix program of MLCS register
cbb9613d83b dai: intel/ssp: Use proper flexible array

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-08-12 14:32:18 +03:00
Marc Herbert 21e2028bef tools/plugin: drop bogus -Wl,-EL binutils endianness option
This mysterious option has been causing portability issues and has never
made any difference, see previous commits for details.

I compiled the plugin with and without it and there was absolutely zero
binary difference.

Let's remove it from all tools/plugin/ CMakeLists.txt files before the
mass copy/paste/diverge there spreads it even more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-09 13:03:46 +03:00
Marc Herbert dc9058365e smex/CMakeLists.txt: drop bogus, non-portable -Wl,-EL binutils option
This option was added by initial commit 36929ae1b7 ("smex: Create new
tool to build ldc file") without any justification. It has been causing
countless portability issues, see previous commit for examples. It makes
even less sense for a build-time utility. Get rid of it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-09 13:03:46 +03:00
Marc Herbert ee5efdf5b9 src/arch/xtensa/CMakeLists.txt: drop bogus, non-portable -Wl,-EL
As already discussed in commit bcbcec79e5 ("cmake: drop
binutils-specific '-Wl,-EL' option") and commit ee58fef921
("smex/cmake: move -Wl,EL option to target_linker_options() for clang")
and their corresponding reviews on GitHub, this binutils-specific,
endianness option makes no difference and is causing clang compatibility
issues. It's now getting in the way of #9351 "Add the new platform
ACP_7_0".

I ran `./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -a` with
and without it and there was absolutely zero binary difference.

I was added in 2019 by giant commit e0ba98d21a ("cmake: add CMakeLists
for firmware build") without any rationale of why it would be needed.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-09 13:03:46 +03:00
Curtis Malainey 3f873a655e ipc3: Add size checks on ipc subtypes
We have a few gaps in input validation from the kernel. Right now we
check the IPC doesn't claim its larger the window, this patch adds the
following checks:

1. That the IPC size is at least large enough for any downcast type on
   comp new
2. That any reported size for a process total size is less than the IPC
   window.

Also adjust the other helper to be  a bit safer and more direct

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-08-08 14:53:33 +03:00
SaiSurya Ch 6a448db42e topology: Update topology name of platform ACP_6_3
update topology file name of platform ACP_6_3

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-08-08 14:40:40 +03:00
Eddy Hsu b2521eaa7b comp: Add initial Google CTC component
Introduce a new component to perform crosstalk-cancellation on
the playback path.

Signed-off-by: Eddy Hsu <eddyhsu@google.com>
2024-08-06 13:32:51 -07:00
Marc Herbert f7eb1ab89f Revert "intel_adsp_ace15_mtpm.conf: temporarily disable CONFIG_MODULES"
This reverts commit 8847de0555.

This should now work thanks to the "better" IMR addresses in
https://github.com/zephyrproject-rtos/zephyr/pull/76196

Note the longer term issue is still open:
https://github.com/zephyrproject-rtos/zephyr/issues/76247

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-06 10:01:26 +03:00
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