Commit Graph

11318 Commits

Author SHA1 Message Date
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
Tobiasz Dryjanski 61dc4e84f3 sample: remove buffer_acquire from samples
remove buffer ops from samples

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
Tomasz Leman 48259d8663 west.yml: update zephyr to b2f7ea0523
Zepych update: total of 736 commits.

492517b918 west.yml: Update NXP HAL SDK to 2.14
a5d1fd9857 soc: adsp: clk: update clock switch flow
9656056b19 dts: adsp: ace20: remove lp clock
50f0e223e8 dts: adsp: ace15: remove lp clock
cf6d5f95b6 adsp: clk: ace: select ipll if wovrco is unavailable
2d835e1b29 dts: adsp: ace20: replace hp with ipll clock
dcecda859c dts: adsp: ace15: replace hp with ipll clock
2f2689e3d3 intel_adsp: ace15: shim: update wovrco request bit
ea9dd59460 yamllint: bindings: add ipll clock index
1ddabfa8d8 dai: intel: dmic: fix shadow variable
b26921d776 dai: intel: dmic: New functions for writing fir coefficients
cba9ec10c3 dai: intel: tgl: dmic: Refactor of dai_nhlt_dmic_dai_params_get function
c28e8ba9ba dai: intel: dmic: Add pdm_base and pdm_idx variables in blob parser
2452aaad50 dai: intel: dmic: Separate fir configuration code into function
f74fd8edaf dai: intel: ace: dmic: Add dai_dmic_start_fifo_packers function
76d03e798f dai: intel: ace: dmic: Using the WAIT_FOR macro in waiting functions
3fbaed4de9 dai: intel: ace: dmic: Refactor of dai_nhlt_dmic_dai_params_get function
d7672af838 dai: intel: dmic: Combine PDM registers definitions
8ea53d49b6 dai: intel: dmic: nhlt: Move debug print code to a separate functions
81944c5c62 dai: intel: dmic: Move definitions of nhlt structures to a new file

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-28 07:53:37 +02:00
Tomasz Leman 5b8ba30694 ace: overlay: update clock frequency
Changing max clock frequency for FPGA configuration.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-28 07:53:37 +02:00
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
Adrian Warecki 4fc431b355 elf: Remove unused elf.c
Removed elf.c file that is no longer in use.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 06:43:34 +02:00
Adrian Warecki 71553274b5 Switch to new elf reader and module parse functions.
Moved the module information to the new module structure. Used new
functions to parse module.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 06:43:34 +02:00
Adrian Warecki 539c2b388c module: Set of a new functions to parse modules
A structure was created to represent the module, module section and section
informations. Added a set of new functions for parsing a module and reading
its contents.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 06:43:34 +02:00
Adrian Warecki 5f47509b67 elf_file: Set of new functions for reading elf files
A structure was created to represent a file, a section and a strings
section. Created a new functions to read a elf file, retrieve a section
header based on index or name, read a section contents based on
a header or name, retrieve section name and functions that print file,
section and program headers.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-09-26 06:43:34 +02: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