Commit Graph

10505 Commits

Author SHA1 Message Date
Peter Ujfalusi 9dd3f10481 lib-manager: Add timeout handling in lib_manager_load_data_from_host()
It is better to have some sort of timeout handling while waiting for the
DMA transfer of the library from host.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 6ba343691a lib-manager: Drop log level for printing the library_base_address
Drop the log level to tr_dbg for printing the library_base_address and
print it only if the allocation was successful.
Allocation error will print an error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 11b9ce23f7 lib-manager: Free up memory for the library in case of a store error
If lib_manager_store_data() fails to read the rest of the library we need
to free up the allocated memory.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 796a3eeb0d lib-manager: fix wrong flags
Don't overwrite flags when mapping virtual memory and don't map
data for execution.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 149d168025 lib-manager: don't restart DMA while loading a library
HDA DMA for host to DSP transfers should be started once on the
host and then once on the DSP, it shouldn't be restarted
multiple times during transfer.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 001415e917 lib-manager: Use stat.pending_length directly in data load loop
There is no need to use local variable in the loop when checking the
progression of the DMA.

Read the DMA status right after start as the DMA might already copied the
data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi ee1e677afc lib-manager: Remove struct lib_manager_dma_buf
Only the addr of the struct is used, no need to keep it around to
complicate things.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 1dc6a2836d lib-manager: clean up memory allocations and cache handling.
Update the memory allocation and cache handling.
Allocate comp_driver and comp_driver_info as uncached to
align with other drivers.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski b58e5357f8 lib-manager: eliminate repeated memory allocations
No need to dynamically allocate memory for DMA block configuration,
it can be placed on stack.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi dc409cdf3a lib-manager: Use kcps_adjust around the library loading
Make sure that we have the needed core frequency for the library loading.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi a6ad6fbf3b lib-manager: Check validity of lib_id
The range of lib_id is only valid for loadable libraries in a range of
1 - MAX_LIBS (15)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Ranjani Sridharan eac5a0a12e tplg_parser: Add support for parsing PCM headers
Parse the PCM headers and save the PCM info along with the host
component associated with the PCM.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Ranjani Sridharan ccd6949a24 tplg_parser: Rename pcm.c
Rename it to host.c as it is meant for setting the host widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Ranjani Sridharan 34518568f7 tplg_parser: Add support for parsing and saving route
Add an option to parse and save the routes from topology so that the
IPCs can be sent at a later time.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Serhiy Katsyuba 81bccef08d app: Enable probe for MTL
Enables extraction and injection probes for MTL platform.
NOTE: this commit does NOT enable probe log backend.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 583329173e probe: Fix injection probe creation
Both extraction and injection probes require to subscribe to buffer
produce notification. Hence notification subscription logic should be
enabled for both types of probes.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 6f5eabd6eb module_adapter: Enable buffer produce notifications required by probe
Probe module subscribes to buffer produce notifications in order to
perform data extraction or injection. Hence this fix is required to
enable probe feature.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 3813a135d5 audio: Put buffer state log under CONFIG_SOF_LOG_DBG_BUFFER switch
comp_update_buffer_consume() and comp_update_buffer_produce() generate
too much log output. Usually such amount of logs results in many log
messages been dropped. It is also results in significant CPU load if
selected log backend formats log messages at runtime.

This patch adds a separate switch to enable these logs only when necessary.
Default value is 'n'.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Adrian Bonislawski 6f4084b4d9 probe: add support for zephyr native drivers
This patch ports probe component to use zephyr native drivers.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Rander Wang 108df32c6b TigerLake: disable memory windows setting on sof side
Memory windows is set on zephyr side, so remove it and also remove
xsram_window for memory windows to save memory since it is not used
by ipc4.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-16 18:51:26 +03:00
Baofeng Tian ff717aec46 mixin_mixout: remove all related code for remap function
remove remap code since there is no requirement for this.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-16 15:28:27 +01:00
Baofeng Tian babb16b155 mixin_out: remove remap mode
remove remap support from mixin process, there is no usecase
for remap for now, in future, if there is a need, we can add it back.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-16 15:28:27 +01:00
Seppo Ingalsuo 8aededeb96 Tools: Topology2: Fix playback EFX FIR and IIR defaults
The default values should be "passthrough" since the pipeline
mixout-gain-efx-dai-copier-playback.conf applies them this way:

IncludeByKey.EFX_FIR_PARAMS {
  "passthrough" "include/components/eqfir/passthrough.conf"
}

And IIR similarly.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 17:05:25 +03:00
Seppo Ingalsuo 53e8b71f69 Tools: Topology2: Remove 24 bit formats from EFX pipeline
This patch makes similar change to pipeline as done earlier
for mixout-gain-dai-copier-playback.conf. The 24/32 bit formats
are deleted as unnecessacy. The audio format definition for
DRC is changed to similar style as for copier and gain.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01:00
Seppo Ingalsuo 8652395490 Tools: Topology2: Add DRC to sof-hda-efx-generic topologies
This patch adds DRC component to EFX pipeline. The DRC is very
useful for speaker output to enhance loudness and reduce
speaker distortion in loud playback.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01:00
Yong Zhi aec3bfdb77 topology2: add core id macros for echo ref & EC pipelines
Add macros in preparation to run RTC AEC on secondary core

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-08-16 14:06:01 +01:00
Pin-chih Lin ad2f035c06 smart amp : Do not use DYNAMIC topology with DTS
Follows after:
    214f98378 ("smart amp : Do not use DYNAMIC topology")

which makes DYNAMIC undefined during smart amp tplg pipeline pcm/dai config due
to the use of volatile Kcontrols.

This commit applies the same on sof-eq-iir-dts-codec-smart-amplifier.m4 which
is used for (DTS + smart amp) projects.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-08-16 14:00:31 +01:00
Rander Wang 84befa2563 zephyr: cpu: init cpu if context save is not support
Fix multicore test issue on cavs platforms which don't support context
save now, so need to init cpu when the core boot up.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-16 13:43:38 +01:00
Ranjani Sridharan 1358afacc9 audio: mux: Remove unused variable
valid_bit_depth isn't used anywhere.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 13:42:41 +01:00
Kai Vehmanen 8f6018057b app: enable OUTPUT_DISASSEMBLY for Zephyr builds
With Zephyr commit cc5763344709 ("Build system: disable
`OUTPUT_DISASSEMBLY` by default"), generation of zephyr.lst
is disabled by default.

Enable disassembly generation in SOF configuration as it is expected by
SOF builds rules for reproducible builds.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-15 10:48:38 +03:00
Chao Song d484b76ffb topology2: add SDW topology for Dell SKU0C87 devices
Dell SKU0C87 devices have below config:

SDW0: RT714 DMIC
SDW1: RT1318 Speaker
SDW2: RT1318 Speaker

Add topology support in this patch for Dell SKU0C87 devices.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-08-14 15:29:08 +03:00
Tomasz Leman 49199a6aed ipc4: set_dx: ignoring logger status notifications
Before HOST can request FW to enter D3 state, has to stop all pipelines.
If it's done properly all possible source of IPC messages from FW to
HOST are disabled.

The only exception from this is logger. If logs are enabled FW will
continue to produce new traces and eventually trigger threshold
notification.

This notification is not critical so we can skip it during D3 entry. The
message will remain in the internal list and will be sent when the DSP
wakes up.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-14 10:07:39 +03:00
Seppo Ingalsuo fb6c3b7e9d Tools: Topology: Add test topologies for crossover component
This patch adds build of tplg1 development topologies
sof-tgl-nocodec-crossover-2way.tplg
sof-tgl-nocodec-crossover-4way.tplg

The tplg2 development topology version is
sof-tgl-nocodec-crossover-2way.tplg

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-10 12:16:53 +01:00
Ranjani Sridharan 528a973fe6 tplg_parser: process: Update the ipc4 builder
Add support for parsing the effect type widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 662c04b694 tplg_parser: pipeline: Update the ipc4 builder
Add support for parsing the scheduler widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 90c929d522 tplg_parser: mixer: Update the ipc4 builder
Add support for parsing the mixer widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan d79ef35e70 tplg_parser: buffer: Update the ipc4 builder
Add support for parsing the module-copier(buffer) in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 8661fd445c tplg_parser: pga: Update the ipc4 builder
Add support for parsing the pga widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 1ba3124e5f tplg_parser: Extend the tplg_context and comp_info for IPC4
Extend the definitions for struct tplg_context and struct tplg_comp_info
to include the fields to parse the ipc_payload and audio format
information from topology.
Also, add the logic for parsing the input/output audio formats from the
topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 0a248c87c9 tplg_parser: tokens: Add support for parsing multiple sets of the same tokens
Add support for parsing multiple token sets belonging to the same group.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 4b58987825 kernel: tokens: Update tokens for IPC4
Update the tokens needed for IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Baofeng Tian b9967598e2 perf-cnt: add peak mcps count
add peak mcps counter to indicate which period have max mcps.
Also changed sample_cnt to period_cnt to make name more sense.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-09 16:13:35 +01:00
Seppo Ingalsuo 39edc7a844 Tools: Tune: Update crossover configurations export for tplg2
The script example_crossover.m is converted to export 2, 3, and 4
way crossover configurations for tplg1 and tplg2.

The crossover parameters like number of sinks, pipeline ids of
sinks, sample rate, and band limits are added to generate blob
filenames.

The changes include fixes for running the script with Matlab in
addition to Octave.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-09 16:49:35 +03:00
Jyri Sarha 681135cda9 Audio: SRC: Add safeguard against missing, wrong size or type init data
In some error situations the configuration init_data may be NULL, and
in such a situations we should fail gracefully and not crash. Also adds
check that the IPC message is of correct type and for IPC3 only that it
is of correct type.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-08-09 12:44:56 +03:00
Tomasz Leman 17cb6d9e3a mtl: copier-host: fix build issue
After commit f639fc8e88 ("copier: rename parent_dev to dev") FW for MTL
platform is not building. This should be detected as merge conflict but it
went unnoticed.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-09 09:58:46 +03:00
Baofeng Tian 2d1f53aaeb copier: remove redundant parameters when create endpoint buffer
Remove no use or redundant parameters in create endpoint buffer
function.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 84c52b4e41 copier:simplify ipcgtw create parameters
remove duplicate parameters and make function parameters
looks more simple.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 4735864abe smart_amp: simplify smart amp parameters
use helper function to update stream parameters.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 2130f8654b selector: simplify selector parameters
use helper function to update stream parameters selector buffers.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 1ce4a401b0 mux: simplify set mux parameters
use helper function to update stream parameters for mux buffers.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00