Commit Graph

11165 Commits

Author SHA1 Message Date
Marc Herbert 9b31875318 Add new sof/tools/rimage/tomlc99 submodule to west.yml too
Add it both as a git submodule and west submodule to minimize
disruption. The current focus is on rimage and that's a dramatic enough
change; one problem at at time.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 99206de401 Clean just inherited tools/rimage/.gitmodules file (for tomlc99)
.gitmodules files have no effect unless they're at the top-level.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 4fe87bebbe Merge full rimage.git history back into tools/rimage/ subdir of sof.git
Merge full rimage.git history back into tools/rimage/ subdir of
sof.git thanks to:

   git merge --allow-unrelated-histories rimage-repo/main

Also list incoming tools/rimage/tomlc99 16000 gitlink in
sof/.gitmodules to avoid breaking all git submodule commands.
This MUST be done as part of this merge commit to avoid
git submodule errors and preserve git bisectability.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:04:16 -07:00
Jyri Sarha c1996e01e1 topology2: doc: Little fixes to make all classes show correctly
There were couple of classes that did not have their topology2 snippets
showing. Probably the essential problem was just the class definition
starting from the first line of the file. There was nothing obviously
wrong in the output of the filter, but the way the doxygen works is
sometimes hard to anticipate. Adding \struct before the definition
fixed the problem.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 649ac7d2d2 topology2: doc: input_audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 215d7b3a07 topology2: doc: fe_dai.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha a3e6cf7aac topology2: doc: data.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 22ec5b3811 topology2: doc: audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha c7f0e930f2 topology2: doc: widget-common.conf: Attribute comments to Doxygen
Change attribute comments to Doxygen comments.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 2e9589069a topology2: doc: volume-playback.conf: Doxygenify existing comments
Doxygenify all comments that are correctly placed near the attribute's
or objects C-translation. This is not the case for comments before
Object.Base { } definition or comment before including
pipeline-common.conf, which is inlined by the topology2 filter, does
not end up in any relevant place, so its better just leave those
comments as they are. They can anyway be read from topology2 source
snippets.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 13cf2a2752 topology2: doc: mixer.conf: Doxygenify and improve the existing comments
Improve and convert comments to doxygen documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 37ac9fcc6a topology2: doc: common.conf: Doxygenify the existing comments
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 080dc5a340 topology2: doc: gain.conf: Convert comments to Doxygen documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 3014380909 topology2: doc: mainpage.doxy: Add simple main-page with contents
The initial main-page contains a short introduction into topology2
Doxygen documentation, and an inline reference to automatically
generated contents page.

The commit also adds more advanced cmake rules to track all document
dependencies.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 59dd233c43 topology2: doc: topology2-generate-contents.sh: Script to generate contents
This commit adds topology2-generate-contents.sh the script to generate the
contents page that will be inline included to the mainpage added in the next
commit.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 23a74a382c topology2: doc: Add README instructing how to build the documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 3e0fdf5eba topology2: doc: Initial cmake build rules for doxygen documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha cfa4d44ffa topology2: doc: Add initial sof.doxygen.in
Includes all *.conf files under topology2 to the Doxygen documentation
and points directly to mainpage Doxygen source.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 4d3934248f topology2: doc: topology2-filter.py: Add topology2 Doxygen filter
This is the second version of topology2 to C Doxygen filter. Its far
from perfect, but it should get us started.

The purpose of the translated C code is not to document actual
topology2 code, but only to provide anchors for Doxygen to form a
network of links through which to navigate the topology sources and
find the pieces of related Doxygen documentation. The filter also
creates separate pages of the original code and adds links next to the
pages in the C struct definition, instance documentation and their
possible Doxygen documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Seppo Ingalsuo 09e1b87b10 Audio: MFCC: Fix testbench xt build fail
Build with "scripts/rebuild-testbench -p tgl" fails to error:

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_source_copy_s16’:
src/audio/mfcc/mfcc_hifi3.c:91: warning:
assignment from incompatible pointer type

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_fill_prev_samples’:
src/audio/mfcc/mfcc_hifi3.c:124: warning:
assignment from incompatible pointer type

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_fill_fft_buffer’:
src/audio/mfcc/mfcc_hifi3.c:159: warning:
assignment from incompatible pointer type

fixes: d0cb478007 ("Audio: MFCC: Add HiFi3 implementation of MFCC")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-06 17:07:15 +03:00
Seppo Ingalsuo cada9501dd Arch: Host: Fix testbench xt build fail
This patch adds "-std=c99 -std=gnu99 -fgnu89-inline options"
to host architecture build to prevent error with
"scripts/rebuild-testbench -p tgl".

    src/audio/module_adapter/module_adapter.c:
    In function ‘module_adapter_reset’:

    src/audio/module_adapter/module_adapter.c:1582:
    error: ‘for’ loop initial declaration used outside C99 mode

    src/audio/module_adapter/module_adapter.c:1584: error:
    redefinition of ‘i’

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-06 17:07:15 +03:00
Marc Herbert 0bd8c3b070 Upgrade rimage submodule and west submodule to ac487e09ca
Add the following rimage commits:

ac487e09ca Congfig: Add TDFB to TGL, TGL-H, MTL, and LNL
d89b7d28f6 ipc4: add google rtc AEC support for mtl
4fc431b355 elf: Remove unused elf.c
71553274b5 Switch to new elf reader and module parse functions.
539c2b388c module: Set of a new functions to parse modules
5f47509b67 elf_file: Set of new functions for reading elf files
7bc2958ba4 Config: Add DCblock to TGL, TGL-H, MTL, and LNL
e8b380d4ae Config: Add Multiband-DRC component to TGL, TGL-H, MTL, LNL
8bcf1fc911 mtl: fill in cps and cpc data for COPIER & GAIN modules
4a36634db6 mtl: fill in cps and cpc data for EQIIR module
fea2a30e56 mtl: fill in cps and cpc data for smart_amp_test  module
476d63608b mtl: fill in cps and cpc data for ASRC module
352f01fee4 mtl: fill in subsequent measured cps and mcps data
c183ce2739 mtl: add measured cps and cpc values
43eb2a435c Config: Add crossover component for MTL and LNL platforms

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-06 11:51:37 +01:00
Iuliana Prodan a44ddbe777 ipc: don't propagate commands across pipelines for IPC4
When IPC4_MOD_ID was introduced it returned a non-zero
module ID under IPC4 and 0 under IPC3.
After commit "45ca3d430 (include: ipc4: module: fix component ID macros)",
the IPC4_MOD_ID, under IPC3, is not 0 anymore.
Therefore, in order to not propagate the commands across
pipelines for IPC4, define IPC4_MOD_ID always to 0 for IPC3.

This fixes playback with mixer.
Without this patch, with IPC3, we get:
src/audio/component.c:130  ERROR comp_set_state(): wrong state = 1, COMP_TRIGGER_PRE_START
../pipeline-stream.c:436  ERROR pipeline_trigger_run(): ret = -22, host->comp.id = 12, cmd = 7
src/ipc/ipc3/handler.c:540  ERROR ipc: comp 12 trigger 0x40000 failed -22

That's because, at some point, the trigger command is not propagated
across pipeline and the component state remains unmodified

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-10-06 11:44:38 +02:00
Marc Herbert b5f3ed9fa5 rimage: move everything down to subdir tools/rimage/, prepare move to sof
Preparation to move everything back into the
https://github.com/thesofproject/sof/ repo, see
https://github.com/thesofproject/sof/issues/8178 for details.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-05 10:18:11 -07:00
Marc Herbert e08b2c2043 zephyr/cmake: add new ${RIMAGE_TOP} constant
In preparation for changing it, see
   https://github.com/thesofproject/sof/issues/8178

No functional change yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-05 17:34:00 +03:00
Marc Herbert 2e7296f17f cmake: add new ${RIMAGE_TOP} constant
In preparation for changing it, see
https://github.com/thesofproject/sof/issues/8178

No functional change yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-05 17:34:00 +03:00
Seppo Ingalsuo 51159d80e4 Tools: Topology2: Fix the gain.conf curve_type values
This patch adds the other SOF volume ramp types linear and
logarithmic with and without zero crossings detect mode to gain
widget class. The names of fade values are changed to be similar
as in enum sof_volume_ramp, since there is a specific curve
shape required for Windows OS.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-04 14:24:15 +03:00
Seppo Ingalsuo 8f9c68ae57 Audio: Volume: Handle all volume ramp types
The windows fade, windows no fade, and linear and handled
the switch-case statement change into volume.c.

In IPC4 the ramp can be disabled with zero curve duration or with
no fade type. The ramp duration convert multiplication can be passed
with the no fade type.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-04 14:24:15 +03:00
Seppo Ingalsuo 4b9d10e5f1 Audio: Volume: Support all volume ramp types in IPC4 mode
This patch adds to enum ipc4_curve_type in peak_volume.h
ramp types for linear and logarithmic with and without zero
crossings detect. The conversion function
ipc4_curve_type_convert() converts the type into
enum sof_volume_ramp for use in volume.c.

The set_volume_ipc4() is changed to use the convert function
and the restriction to select other than windows fade type also
is removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-04 14:24:15 +03:00
Ranjani Sridharan 9e9120a154 topology2: google-rtc-aec: Remove byte control
The blob contains the input/output audio formats but these are already
passed during module init based on hw_params. So no need to have the
byte control for it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Ranjani Sridharan 351fe7e3ef topology2: google-rtc-aec: Add 4ch audio formats
The DMIC capture path should support both 4ch and 2ch audio formats.
Also, since the Google AEC module only support 16-bit input format,
modify the output of the refeence capture DAI accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Ranjani Sridharan 18595e9cd3 topology2: speaker-echo-ref: Remove the echo ref PCM
The echo-ref pipeline ie the DAI capture pipeline involving the speaker
codec is already part of the list of pipelines that gets set up and
triggered when the DMIC capture starts. Therefore, there's no need for
the echo-ref PCM to explicitly start the reference capture. So, remove
it and connect the codec DAI to the google-rts-aec module directly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-03 18:14:41 +03:00
Rander Wang 9e21d8ba62 topology2: set pipeline priority for google aec stream
Set priority for aec stream so that driver can trigger pipeline based on
pipeline priority.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-03 18:14:19 +03:00
Tomasz Leman 6d2352a107 west.yml: update zephyr to 3.5.0-rc1
Zepych update: total of 853 commits.

Changes include:

i8c4eec7ac6 intel_adsp: boot_complete must be done PRE_KERNEL_1
1fc16e6565 release: Zephyr 3.5.0-rc1
c910dc81a6 sys_clock: header: minor cleanup and doxygenization
b9f8b91692 kernel: sys_clock: remove stray z_enable_sys_clock prototype
cc2a558707 kernel: move more internal smp calls into internal domain
a1c7bfbc63 kernel: remove unused z_init_thread_base from kernel.h
209ff606be kernel: move internal smp calls to a internal header
e19f21cb27 kernel: move z_is_thread_essential out of public kernel header
f0c7fbf0f1 kernel: move sched_priq.h to internal/ folder
e6f1090553 kernel: Integrate object core statistics
1d5d674e0d kernel: Add initial k_obj_core_stats infrastructure
6df8efe354 kernel: Integrate object cores into kernel
55db86e512 kernel: Add initial obj_core infrastructure
eb1e5a161d kernel: FIFO and LIFO have their own sections
9bedfd82a2 kernel: Refactor CPU usage
baea37aeb4 kernel: Re-factor sys_mem_blocks definition
2f003e59e4 kernel: Re-factor k_mem_slab definition
41e0a4a371 llext: Linkable loadable extensions
4289359eb2 modules: mcux: fix HAS_CMSIS_CORE selection
1194a35aa2 xtensa: cast char* to void* during stack dump with %p
fcf22e59b8 xtensa: mark arch_switch ALWAYS_INLINE
b2f7ea0523 soc: xtensa/intel_adsp/ace: fix _end location
e560bd6b8c boards: intel_adsp: fix board compatible
b4998c357e mm_drv: tlb: Fix compile time warning
759e07bebe intel_adsp: move memory window setup to PRE_KERNEL_1

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-03 09:55:47 +03:00
Kai Vehmanen 9f2d19d30c vmh_free: cosmetic changes to local variable
The_very_long_variable names make it hard to modify
the code and keep to under-100-characters coding
guidelines of the codebase.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-10-03 09:55:47 +03:00
Serhiy Katsyuba f873a99dd7 ipc4: mixin/mixout: Remove redundant source_info stuff
Mutex protected module_source_info was an old failed attempt to support
cross-core connection of mixin and mixout. That functionality was never
properly tested as FW did not support cross-core connections there.

For connected mixin and mixout located on same core, that functionality
is not needed. For cross-core connection, that functionality creates
dead-lock.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-10-02 14:57:09 +01:00
Seppo Ingalsuo ac487e09ca Congfig: Add TDFB to TGL, TGL-H, MTL, and LNL
This patch enables load the of Time domain fixed beamformer (TDFB).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-02 15:24:31 +03:00
Seppo Ingalsuo 405d48dbea Audio: Module adapter: Fix error message typo sinks -> sources
This patch fixes a confusing error message typo in module_adapter.c.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-02 11:25:45 +01:00
Rander Wang d89b7d28f6 ipc4: add google rtc AEC support for mtl
Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-29 15:53:57 +01:00
Marcin Szkudlinski f9afd6ac9d buf: remove buffer_acquire/buffer_release
buffer_acquire and buffer_release are no longer in use
remove stubs from the code

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-29 15:16:06 +01:00
Liam Girdwood 87148abf1e tools: Introduce the SOF ALSA plugin
The SOF ALSA plugin allows SOF topologies to be run on the host. The plugin
is still WIP with many rough edges that need refined before production
deployment, however the plugin is usable today as a rapid development
framework for SOF infrastructure and processing.

Features that are function in the current implementation
 * aplay & arecord usage working today
 * modules are loaded as SO shared libraries.
 * topology is parsed by the plugin and pipelines associated with the requested PCM ID are loaded
 * pipelines run as individual userspace threads
 * pipelines can be pinned to efficency cores
 * pipelines can use realtime priority.
 * alsa sink and alsa source modules available.
 * pipelines can block (non blocking and mmap todo)
 * 16-bit playback and capture support. Other formats to be added soon

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-09-29 14:46:34 +01:00
Ranjani Sridharan 7266a73cbf tplg_parser: topology: Introduce new structures and update existing ones for IPC4
Update the struct tplg_comp_info to add some new fields needed for
parsing module information for IPC4. Also, introduce a couple of new
structures to save the pipeline info and fix the path to the peak_volum
header.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-29 14:46:34 +01:00
Ranjani Sridharan aa981cc7a4 arch: host: configs: Add config for alsa plugin
Add the deconfig file for building the SOF ALSA plugin with IPC4.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-29 14:46:34 +01:00
Ranjani Sridharan 640f71f45f ipc4: Add support for IPC4 shared library
Add support for the SOF shared library modules to work with IPC4.
The main changes in the patch involve support for triggering pipelines
in the IPC context when running on the host and support for fetch the
component driver with the INIT_MODULE_INSTANCE IPC. Currently, we use a
hardcoded table to match the module ID with UUIDs. This will be modified
in the future to make it scale for all modules.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-29 14:46:34 +01:00
Ranjani Sridharan 72553fa5e5 ipc4: handler: Add compier fallthrough to prevent compilation error
Add the fallthrough to prevent the error seen with shared
library build:
"handler.c:312:20: error: this statement may fall through
[-Werror=implicit-fallthrough=]"

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-29 14:46:34 +01:00
Ranjani Sridharan 545ab19ff5 ipc4: logging: fix library build
Fix build with CONFIG_LIBRARY.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-09-29 14:46:34 +01:00
Chao Song deb7a097e3 github action: remove duplicate build for TGL/TGL-H
At the beginning, we have two build jobs in github
action to build IPC3 and IPC4 firmware for TGL/TGL-H.

The PR https://github.com/thesofproject/sof/pull/8048
switches cAVS2.5 configs to use IPC4 by default and
empties the cAVS2.5 overlay files. After the change,
the xtensa-build-zephyr.py script is building the
same IPC4 firmware with or without '-i IPC4' option.
So we have two jobs running different build command
but build the same IPC4 firmware.

Recently, commit 5004d0fe1e ("zephyr.yml: remove ipc
option for zephyr build") removes '-i IPC4' option
in github action for TGL/TGL-H IPC4 build. So we have
duplicated jobs to build firmware for TGL and TGL-H
in the end.

This patch removes the duplicated build job which previously
is used to build IPC3 firmware for TGL/TGL-H and obsolete
comments.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-28 17:24:51 +01:00
Tobiasz Dryjanski c274607de0 buffer: cosmetic change in buffer.h
remove one unneeded newline

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-28 17:17:44 +01:00
Tobiasz Dryjanski 04d37beb55 host: remove buffer_acquire from host legacy/zephyr
remove buffer ops from  host-legacy, host-zephyr

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-28 17:17:44 +01:00
Tobiasz Dryjanski c78301ed26 dai: remove buffer_acquire from dai (zephyr and legacy also)
remove buffer ops from dai, dai-legacy, dai-zephyr

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-28 17:17:44 +01:00