Commit Graph

10768 Commits

Author SHA1 Message Date
Tomasz Leman 837f7715f2 ace: clock: update clock definitions
ACE_1.5 and ACE_2.0 use only two clocks for DSP cores. First is WOVRCO and
second is ACE IPLL.

IPLL allows to configure it to work like LP RING Oscillator Clock or HP
RING Oscillator Clock. Currently, the driver does not allow this, so I
remove the frequency that cannot be achieved anyway.

Clocks frequencies:
WOV: 38.4 MHz
IPLL: 393.216 MHz

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-28 07:53:37 +02:00
Tomasz Leman 99c53d90f9 base_fw: get fw config
This patch is changing value of slow clock in response for FwConfigGet
from LP clock to the lowest clock is section "slow clock".

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-28 07:53:37 +02:00
Tomasz Leman b98e912fff platform: posix: clk: add lowest freq index
This patch adds CPU_LOWEST_FREQ_IDX definition to keep compliance with
changes in base_fw.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-28 07:53:37 +02:00
Marc Herbert 0061953a59 .github/sparse-zephyr: add -DCONFIG_MINIMAL_LIBC to avoid picolibc
Add a sparse-specific workaround for the incompatibility with
picolibc (the new Zephyr default)
https://github.com/zephyrproject-rtos/zephyr/issues/63003

Also fix comment in commit 2a9473a17b ("app/prj.conf: disable PICOLIBC
with CONFIG_MINIMAL_LIBC=y"): we don't need to disable PICOLIBC
_everywhere_; we only need to disable it when using sparse.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-27 14:00:10 +01:00
Marcin Szkudlinski 59bc4a751b DP: add calculation of EDF to DP scheduling
Earliest deadline first scheduling added, based on module
period

Detailed description in zephyr_dp_schedule.c

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-27 13:41:22 +01:00
Marcin Szkudlinski ba344b520b dp: add calcultion of DP module period
For LL modules it is very straightforward - all LL modules
are called one by one in every LL pipeline tick, so module's
period is always equal to LL pipeline period

For DP modules a period has different meaning. As DP
is called "on demand" - whenever it is ready, it may not be
scheduled at every LL tick (and usually is not)

A period meaning for DP is "a time when the module must finish
its job and provide data to next module in pipeline
or the data flow will be corrupted (a glitch)"

In common case the period is calculation is based on module's
OBS - if module provides OBS bytes of data in each cycle, it MUST
finish at least before the next module drains the buffer

In some special cases - modules producing a variable bitrate
(like MPEG) or not producing audio data at all (phrase detector,
speech recognition, etc.) - the module may set the period itself
during prepare operation

This commit adds calculation of DP period. This value will be used
in following commit as a base for deadlines calculation in EDF

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-27 13:41:22 +01:00
Tobiasz Dryjanski edf85fffb6 tdfb: remove buffer_acquire from tdfb.c
remove buffer ops from tdfb.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 9a1d95fc94 tone: remove buffer_acquire from tone.c
remove buffer ops from tone.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 64af017dff selector: remove buffer_acquire from selector.c
remove buffer ops from selector.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 29b2f0eecc probe: remove buffer_acquire from probe.c
remove buffer ops from probe.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski e848406ec7 waves: remove buffer_acquire from waves.c
remove buffer ops from waves.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 252381238b dts: remove buffer_acquire from dts.c
remove buffer ops from dts.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski bdc8316768 cadence: remove buffer_acquire from cadence.c
remove buffer ops from cadence.c

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 7112246d4f google_rtc_audio_processing: remove buffer_acquire
remove buffer ops from google_rtc_audio_processing module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 23086814ac google_hotword_detect: remove buffer_acquire from google_hotword_detect
remove buffer ops from google_hotword_detect module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Tobiasz Dryjanski 659088e720 drc: remove buffer_acquire from drc
remove buffer ops from drc module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2023-09-26 17:55:25 +01:00
Peter Ujfalusi dfb30f3b73 tools/probe: Fix WAV header creation for extracted audio streams
The finalize_wave_files() should be called to update the WAV header to be
valid.
This should be only done when demuxing to files.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-09-26 15:15:00 +01:00
Pin-chih Lin 9ca86c9fd6 smart_amp: revamp to two-layer modular design structure
The motivation is depicted in
https://github.com/thesofproject/sof/pull/7801

This commit revamps smart_amp component design to two-layer structure, i.e.
generic layer and inner model layer.

Generic layer is the common part of smart amp process which can be regarded
as the glue code interacting between SOF component ops and inner model.
While inner model may have various implementations respectively for
solution suppliers in a modular way.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-09-26 13:35:28 +01:00
Marcin Szkudlinski cbc04be53f DP: connect dp_queue to processing DP modules
DP components need to work flawlessly when run on a different
core than that of its connected peer modules.

To achieve this, a cross core producer-consumer safe
dp_queue should be used

DP queue can only be connected to modules that use
sink/src interface, so DP modules need to use it
obligatory.

To connect dp_queue into modules chain, double buffering
method is used:
 - in LL task DP module is processed as an LL module, but the
   copy method is copying data from/to audio_streams
   to/from dp_queues
 - the main DP module processing takes place in DP task
   (in separate Zephyr thread). The tread may be bind to
   separate core

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-26 12:08:42 +03:00
Marcin Szkudlinski e441f17674 module: add pointers to sink/src to module structure
Sink and source is the main interface for DP processing
in current pipeline and the main interface for all
processing in pipeline 2.0

Pointers to them must be available to modules directly.

This commit adds pointers to sink/sources to module structure

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-26 12:08:42 +03:00
Marcin Szkudlinski 1ea43cafe7 DP: bugfix, set pointer to NULL after free
There should not be any pointers left pointing
to a freed structures.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-26 12:08:42 +03:00
Marcin Szkudlinski e6c3decd38 dp_queue: buf calculation size, add list, cosmetic changes
buf calculation size has been changed to be always 2xmax(IBS,OBS)
to allow free read/write in various data chunk sizes
and execution periods (of course in/out data rates must be same)

detailed examples in dp_queue.h file

method and fields allowing connection dp_queues to a list added

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-26 12:08:42 +03:00
Marcin Szkudlinski 46a9d87f1f sink/src: change IBS/OBS in API to more meaningful names
there's a big confusion in naming: meaning IBS/OBS from
module point of view is opposite to meaning of OBS/IBS
from buffer or queue point of view

This PR changes
 - IBS to min_available
 - OBS to min_free_space

names like this are less likely to cause confusions

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-26 12:08:42 +03:00
Adrian Warecki 966ad48e7e tools: logger: Fix resources release
Improved release of resources when an error is detected.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 09:20:03 +01:00
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