Commit Graph

10744 Commits

Author SHA1 Message Date
Adrian Warecki 651af68384 tools: logger: Use a safe variant of the string manipulation functions
Used string manipulation functions that check the size of the available
buffer.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 56a1352163 logger: convert: Code quality improvements
The precision check condition has been simplified, the unsigned value
cannot be negative. Added definitions containing an error message instead
of using a constant variable.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 30a2855d48 logger: convert: read_entry_from_ldc_file: Make sure string null terminated
Added a null string terminator to be sure that strings read from a file are
terminated correctly.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 4c905f5234 logger: convert: Simplified printing of a timestamp
The timestamp printing process has been simplified by eliminating the
dynamic creation of the formatting string. All necessary parameters are now
passed directly to the printing function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 9f36a5dc11 logger: convert: Added error handling for file operation functions.
Added checking of value returned by file operation functions. In case of an
error, message is printed and error code is returned.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki f882c301f1 logger: convert: Fixed handling of an error reported by clock_gettime
The clock_gettime function only returns information that an error occurred.
The error code should be taken from the errno variable.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 5c016bc9e7 smex: elf: elf_find_section: Check function input data
String terminator was added to the buffer with a list of section names
in the elf file. Added check to the section name index to make sure it
doesn't go beyond the buffer size.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki e5f337ba70 smex: elf: Fixed an error code returned when a file operation fails
If fseek reports an error, the error code set in errno is returned.
Improved handling an error during reading from a file. Now it distinguishes
between an error reported by the fread and insufficient data in a file.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 71418367e7 smex: elf: Added checking of value returned by file operation function
Added checking of the value returned by fseek function and added memory
release when an error is detected.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Adrian Warecki 877079af47 smex: elf: Removed unnecessary initialization of local variables
The values assigned when declaring variables were overwritten in the code.
Redundant initialization was removed.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
Tobiasz Dryjanski a63f6b61eb dcblock: remove buffer_acquire from dcblock
remove buffer ops from dcblock module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski dc3169aa5a rtnr: remove buffer_acquire from rtnr.c
remove buffer ops from rtnr.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski 1d4cca5610 mux: remove buffer_acquire from mux
remove buffer ops from mux module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski b0f4605d97 multiband_drc: remove buffer_acquire from multiband_drc
remove buffer ops from multiband_drc module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski 989a13c94c mfcc: remove buffer_acquire from mfcc
remove buffer ops from mfcc modules

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski 352a465759 igo_nr: remove buffer_acquire from igo_nr
remove buffer ops from igo_nr module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Tobiasz Dryjanski fe91b3c97f eq: remove buffer_acquire from eq_fir and eq_iir
remove buffer ops from eq_fir and eq_iir modules

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-25 20:52:51 +03:00
Seppo Ingalsuo f57e478f4c Zephyr: Fix path to google_hotword_detect.c
The file is found from subdirectory src/audio/google. Without
fix if CONFIG_COMP_GOOGLE_HOTWORD_DETECT is enabled build fails:

CMake Error at sof/zephyr/cmake/modules/extensions.cmake:424
(add_library):
Cannot find source file:
/src/audio/google_hotword_detect.c

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-25 10:35:27 -07:00
Jaroslaw Stelter e4136a4e0e lnl: memory: expand HEAPMEM_SIZE
FW infrastructure shall support buffering of historic data
from 1ch up to 6 channels 24bit samples in 24bit container.
For this reason, the heap should be extended.Increase HEAPMEM_SIZE
by 0x90000 because for audio format 16000Hz/6ch/24bit
history_buffer_size = 16 * 6 * 3 * 2100s = 604800 bytes (0x93A80)

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-09-25 16:23:27 +01:00
Marc Herbert 2a9473a17b app/prj.conf: disable PICOLIBC with CONFIG_MINIMAL_LIBC=y
Starting from Zephyr commit f0daf904bb02, CONFIG_PICOLIBC is on by
default.

PICOLIBC does not seem compatible with sparse yet:
https://github.com/zephyrproject-rtos/zephyr/issues/63003

Even if it were compatible with sparse, it seems like a pretty big
change that we should not immediately and blindly accept.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-25 15:04:17 +03:00
Seppo Ingalsuo 2cdd11a95d Tools: Topology2: Remove 50 ms curve duration set from nocodec
We need to care about audio user experience and peak MCPS
usage in production topologies.

The alsabat test is disturbed by the longer ramp so the
change can be reverted from nocodec topologies. Those
topologies are never used by end users. Also the peak MCPS
mitigation is not relevant for test topologies, as long as
higher MCPS is not triggering error reports. The curve
duration is restored without explicit set to the default 20 ms.

Fixes: #8238
Fixes: d0d74a477f
       ("Tools: Topology2: Change in capture gain
       curve_duration to 50 m")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-25 11:24:01 +01:00
Rander Wang beddfb360a topology2: Add 4ch audio formats for gain-capture pipeline
Add support in gain-capture pipeline to support 4ch DMIC stream.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-25 11:23:25 +01:00
Rander Wang e7a1592002 topology2: use input|output audio format
The old style is not used now.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-09-25 11:23:25 +01:00
Marc Herbert 8eedfe4836 .github: build-windows: choco install ninja
Ninja seems to have just mysteriously disappeared from
https://github.com/actions/runner-images/blob/win22/20230918.1/images/win/Windows2022-Readme.md
See #8250 for more details.

Let's try to install it explicitly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-25 10:13:42 +03:00
Chao Song 75337b41eb topology2: remove duplicated pipeline index attribute definition
The pipeline-common.conf helps us to define several
common pipeline attributes include pipeline index,
there is no need to define pipeline index in each
pipeline class definition if pipeline-common.conf
is included.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-22 14:21:59 +01:00
Tobiasz Dryjanski d7ebc159d0 crossover: remove buffer_acquire from crossover
remove buffer ops from crossover module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski 4f74ed7018 volume: remove buffer_acquire from volume
remove buffer ops from volume module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski cd7e3d3e40 kpb: remove buffer_acquire from kpb
remove buffer ops from kpb module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski d7957df17e chain_dma: remove buffer_acquire from chain_dma
remove buffer ops from chain_dma module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski 4f42a65b66 asrc: remove buffer_acquire from asrc
remove buffer ops from asrc module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski 9d0f0aad14 aria: remove buffer_acquire from aria
remove buffer ops from aria module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-22 12:28:15 +03:00
Tobiasz Dryjanski 08c6b7992e smart_amp: remove buffer_acquire from smart_amp
remove buffer ops from smart_amp module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-21 13:58:50 +03:00
Tobiasz Dryjanski a0256007e6 mixer: remove buffer_acquire from mixer
remove buffer ops from mixer modules

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-21 13:58:50 +03:00
Tobiasz Dryjanski f87fa4d6fa mixin/mixout: remove buffer_acquire from mixin/mixout
remove buffer ops from mixin/mixout module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-21 13:58:50 +03:00
Tobiasz Dryjanski 527e5f7d4b copier: remove buffer_acquire from copier
remove buffer ops from copier module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-21 13:58:50 +03:00
Chao Song b0afa39126 app: overlays: remove tgl and tgl-h ipc4 overlays
We build tgl and tgl-h with ipc4 by default, those
ipc4 overlays are empty now, can be removed safely.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-21 11:00:12 +03:00
Chao Song a17c2823d3 xtensa-build-zephyr: remove ipc option
For legacy CAVS platforms (TGL/ADL/EHL), the default
build config is IPC4 now, and the overlay file is
already emptied. Remove the option in this build
script.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-21 11:00:12 +03:00
Chao Song 5004d0fe1e zephyr.yml: remove ipc option for zephyr build
For TGL and TGL-H, IPC4 is the default build config,
remove the '-i IPC4' option as it is not needed
anymore.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-21 11:00:12 +03:00
Pierre-Louis Bossart 0912756595 topology2: intel: bt-ssp-config: use cardinal clock as source
All existing SSP-based topologies use the audio cardinal clock,
*EXCEPT* Bluetooth related ones. This doesn't make much sense, let's
use the same clock source for all SSPs.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-09-20 20:45:20 +03:00
Kai Vehmanen 1479462824 topology1: remove Intel CML and EHL topologies
These topologies are no longer supported by mainline firmware
code for these platforms. The stable-v2.2 branch continues to
support these targets.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-09-20 15:41:51 +01:00
Seppo Ingalsuo d0d74a477f Tools: Topology2: Change in capture gain curve_duration to 50 ms
This change increases the ramp duration from 20 ms to 50 ms. It
lowers the peak load of peak volume component due to longer same
gain value blocks. The internal update rate for gain becomes 250 us
instead of 125 us. The longer fade-in ramp also conceals better
possible analog capture start transients.

This changes for 4ch capture for gain.11.1 in sof-hda-generic-4ch.tplg
from

CPU_PEAK(MAX) = 21.95
PEAK(MAX)/AVG(AVG) = 7.51

to

CPU_PEAK(MAX) = 9.07
PEAK(MAX)/AVG(AVG) = 3.12

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-20 15:37:05 +01:00
Tobiasz Dryjanski f070135e04 kpb: Implement configuration part of fast mode task
This patch implements handling of the configuration IPC for FMT in KPB
module. KPB now saves the list of module instances to be processed by
FMT. This is the first step for implementing FMT functionality. In case
of WoV event, FMT is needed for KPB to drain history buffer and send
this data to Host ASAP, as normal tasks are too slow.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-20 17:02:53 +03:00
Tobiasz Dryjanski fb2727536a ipc4: Add Vendor Config Set
Add Vendor Config Set, a special case of Large Config Set. Large Config Set
handling now checks for this case and extracts extended param_id from ipc
payload as param_id and handles the rest of the payload as usual. KPB now
uses extended param_id. Necessary for fast mode task configuration in KPB.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-20 17:02:53 +03:00
Kai Vehmanen f3c290f14b ipc4: logging: fix builds with mtrace and probes both disabled
If both SOF_PROBES and MTRACE logging backends are disabled at build
time, IPC4 build failed due to undefined ipc4_logging_enable_logs().
Fixes a bug in commit 1721f70426 ("logging: add logging through
probes").

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-09-20 15:08:29 +03:00
Daniel Baluta 7ca9a2eb8a driver: imx: Add PDM MICFIL driver
The Pulse Density Modulated Microphone Interface (MICFIL) is a popular
way to deliver audio from microphones to the processor in several
applications, such as mobile telephones. However, current digital-audio
systems use multibit audio signal (also known as multibit PCM) to
represent the signal. This block implements the required digital
interface to provide a 24-bits audio signal from a PDM microphone
bitstream in a configurable output sampling rate.

This patch adds initial support for PDM MICFIL IP found on i.MX8MP
board.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-09-20 14:43:11 +03:00
Daniel Baluta 1b337ef437 imx: sdma: Fix sdma firmware selection
CONFIG_SDMA_SCRIPT_CODE is always defined (even if not selected
it defaults to empty string) so this is not a good way of including
sdma script code header file.

Make use of HAVE_SDMA_FIRMWARE boolean config in order to select
the sdma script code header.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-09-20 14:43:11 +03:00
Marcin Szkudlinski b608ec840c pipeline: remove buffer_acquire from pipeline files
remove buffer ops from pipeline-graph.c and
pipeline-params.c

this is a continuation of changes
from commit 4a03699911

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-19 11:51:20 +03:00
Marcin Szkudlinski 4c895a56eb mod: remove buffer_acquire from module_adapter
This change removes all buffer_acquire/buffer_release
from module adapter

The change does not contain any optimalizations that now may
be easy to do. They will be introduced in separate PR

this is a continuation of changes
from commit 4a03699911

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-19 11:51:20 +03:00
Marcin Szkudlinski 7ca691dd24 ipc: remove buffer_acquire from ipc helpers
remove buffer_acquire / release from ipc helpers

this is a continuation of changes
from commit 4a03699911

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-19 11:51:20 +03:00
Marcin Szkudlinski dcc41ffac6 comp: remove buffer_acquire from component.h
remove 2 inline functions
comp_get_copy_limits_with_lock
comp_get_copy_limits_with_lock_frame_aligned

this is a continuation of changes
from commit 4a03699911

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-19 11:51:20 +03:00