Commit Graph

12010 Commits

Author SHA1 Message Date
Yong Zhi 18ab8c2468 topology2: cavs-rt5682: expose spk core_id for overriding
Port from nocodec topology for multi-core validation.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2024-04-30 13:17:42 +03:00
Seppo Ingalsuo e8fcaf6958 Tools: Tune: Crossover: Cleanup blob files paths
This patch moves blobs for crossover component into
sub-directory "crossover" to clean up clutter from
ctl/ipc3 and ipc4 level.

The patch also adds export of blobs for IPC4 mode that
was missing.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Seppo Ingalsuo 70449a3d70 Tools: Tune: EQ: Cleanup produced blob files structure
To remove clutter from upper level this patch changes
generated files naming from e.g. "ipc4/eq_fir_loudness.blob" to
"ipc4/eq_fir/loudness.blob". It helps to find the blob files
from directory that has same name as the target component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Seppo Ingalsuo ec4e2a9cf9 Tools: Tune: EQ: Rename configuration blobs to use .blob
We have both .bin and .blob file name suffixes in use for
similar byte controls initialize files. The scripts those
generate files with .bin are changed to .blob.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Seppo Ingalsuo 4f46135fba Tools: Tune: EQ: The function eq_blob_write.m is deleted
The replacement is sof_ucm_blob_write.m.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Seppo Ingalsuo b5bd60c1f0 Tools: Tune: EQ: Create highpass blobs and add 100 Hz version
There were no bytes control binary blobs for highpass filters.
This patch adds export of them and adds a 100 Hz filter option.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Seppo Ingalsuo 25e105026d Tools: Tune: Use common/sof_ucm_blob_write.m for binary blob export
The sof_ucm_blob_write.m is an updated copy of blob_write that
exports binary blobs with header that is suitable for ALSA UCM's
cset-tlv command. The UCM requires binary files so the default
binary export is changed for every component setup script to this
format.

The ASCII decimal numbers .txt format export remains suitable for
sof-ctl tool.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-29 14:07:25 +01:00
Laurentiu Mihalcea 48499455c8 cleanup: platform: imx8: remove unneeded `include` statements
Remove unneeded `include` statements. An `include` statement
is deemed as unneeded if, by removing it, the build process
will not fail.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-29 13:56:20 +03:00
Laurentiu Mihalcea c03635d84b cleanup: platform: imx8: remove `platform_wait_for_interrupt` definition
`platform_wait_for_interrupt()` is an XTOS-only construct
so it's not needed for imx8 which is a Zephyr-only platform.
Remove it.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-29 13:56:20 +03:00
Laurentiu Mihalcea 42ed96ef44 cleanup: platform: imx8: remove unused structure declaration
Commit b0cc9dc7b5 ("cleanup: platform: imx8: remove redundant
calls in platform_init()") removes function call that uses the
`timer_shared` structure so it can be dropped.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-29 13:56:20 +03:00
Laurentiu Mihalcea 6e30aaee32 cleanup: platform: imx8: remove redundant calls in platform_init()
XTOS is no longer supported on imx8. As a consequence,
some calls from imx8's platform_init() have become
redundant. Remove these calls/initializations as well
as those who are redundant because of some configurations
that are not enabled (e.g: `CONFIG_TRACE`, or `CONFIG_HAVE_AGENT`).

This is a followup for #8863.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-29 13:56:20 +03:00
Tobiasz Dryjanski 40a6fc7dab volume: fix fadeout curve shape
Fadeout curve had inaccurate shape due to incorrect computation of ramp
function.

Suggested by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-29 10:56:08 +03:00
Kai Vehmanen 278ecc5b74 topology2: intel: bt-generic.conf: fix rate constraints
Commit c77a4feb2f ("topology2: pcm_caps: Remove defaults for
rate_min/rate_max") changed how rate constraints are described in
topology. After this change, the rate_min/max was ignored by SOF Linux
driver and the rate was incorrectly limited to 48000Hz for these
topologies.

Fix this issue by enumerating the supported sampling rates with "rates".

Link: https://github.com/thesofproject/sof/issues/9067
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-26 13:04:35 +01:00
Damian Nikodem e603d8f09b audio: copier: use v_index for DAI index in I2S link creation
This commit updates the copier DAI creation logic for I2S links to use
the `v_index` field from the `node_id` structure as the DAI index. This
change ensures that the correct DAI index is used when creating I2S links,
aligning with the new SSP link management mechanism.

West update to necessary SSP changes:
driver: ssp: update Intel SSP DAI driver to support dynamic SSP management

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-04-25 15:58:23 +01:00
Marcin Szkudlinski 5f25174789 dp: make dp_queue using externally provided params set
Dp_queue is currently used only as a comp_buffer "shadow"
for DP modules.
Shadow buffers must have the very same param set as main
buffers.
Problem: till now the complete vector of params was
copied from comp_buffer to dp_queue inm prepare method.
Problem is that if anything will change any of params
afterwards, the change won't propagate.
This commit introduces sharing the param vector between
comp_buffer and its shadow

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-04-25 15:35:06 +01:00
Marcin Szkudlinski 80445dc5ee dp: remove dead code from dp_queue
the backdoor removed in this commit has never been used
A new backdoor will be introduced in new commit

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-04-25 15:35:06 +01:00
Laurentiu Mihalcea 65b8a32f27 nxp: imx8ulp: switch to native Zephyr drivers and timer domain
Switch to Zephyr native drivers and timer domain. This
includes:
	1) Switching all imx8ulp topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Laurentiu Mihalcea b78d924fe8 lib: dma: add entries for 8ULP's EDMA2 and HOST_DMA
Add entries for 8ULP's EDMA2 and HOST_DMA.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Laurentiu Mihalcea 4b567533eb nxp: imx8ulp: and nodes and enable drivers for SAI, EDMA and HOST_DMA
Add DTS nodes for and enable the drivers of SAI, EDMA
and HOST_DMA.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Laurentiu Mihalcea 3f1f45aaeb boards: imx8ulp: switch to Zephyr logging
Switch to Zephyr logging to prepare for the
switch to native Zephyr drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Peter Ujfalusi aa60e65c6b topology2: intel: deep-buffer: Adjust the buffer_size_min only
There is no benefit on changing the period/buffer size_max as it is set
by default to a reasonably large value already.
What matters is the buffer_size_min: it needs to be larger than the
amount of data that one DMA burst will transfer, which is equal to the
DeepBuffer size. For safety reasons the minimum buffer size has to be
larger than this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Peter Ujfalusi bba6a4cb04 topology2: common: pcm_caps: Revisit default period and buffer sizes
Increase the default period_size_max to a much larger value which is
commonly used by sound cards from 16384 to 2097152.

Adjust the buffer_size limits to minimum 384 (2 * period_size_min) and the
maximum to 4194304 (2 * period_size_max).

Applications do not need to use these large buffers, but there is no
technical reason to not allow them, like they available on other sound
hardware.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Peter Ujfalusi b3a6d1c570 topology2: common: pcm_caps: Increase periods_max from 16 to 1024
There is no technical reason to limit how many periods applications use.
Generic sound cards tends to allow 32768 periods (period size range
is 16 - 524288) but that is an overshot, let's raise the limit to 1024.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Kai Vehmanen d42e8822f2 audio: base_fw: add missing copyright statement to banner
Add missing copyright statement to file header.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen 5a6455630e audio: base_fw: move IPC4_EXTENDED_SYSTEM_TIME to platform code
Move implementation of IPC4_EXTENDED_SYSTEM_TIME from generic
to platform specific code. The implementation depends on specific
ART counter that is not available on all platforms, so it is better
to handle this in platform specific code.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen 422fdc1229 audio: base_fw: move IPC4_MEMORY_STATE_INFO_GET code to platform
The implementation for IPC4_MEMORY_STATE_INFO_GET requires
reading direct register contents to fill out the structure,
so this is by definition platform specific code. Move this
to platform implementation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen a1120f0f9f audio: base_fw: move L1_EXIT control to platform specific code
Move the Intel specific L1_EXIT control handling from base_fw.c
to Intel specific platform code.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen c75c17e800 ipc4: base_fw: add support for get/set large config extensions
Add support to handle platform specific extensions with
platform_basefw_get_large_config() and
platform_basefw_set_large_config(). These functions are called when
get/set handled is called with a parameter type not handled
in generic code.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen c4cd66b8b2 audio: base_fw: add platform layer to fw_config data
Some of the IPC4 FW_CONFIG fields are platform specific and cannot be
filled with generic code.

Handle this data by adding a call to platform_basefw_fw_config()
and add an implementation for all current platforms with IPC4
support.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Kai Vehmanen 4d0a9f5299 ipc4: base_fw_platform: fix typo in doxygen
Fix spelling in platform_basefw_hw_config() documentation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-24 13:36:35 +03:00
Laurentiu Mihalcea 5e91cf9688 west.yml: update Zephyr to 799a456c2586
Pulls in the following patches relevant to SOF:

799a456c2586 nxp: imx8ulp: add audio-related nodes

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-24 11:39:50 +03:00
Grzegorz Bernat 7b0c202f7b Audio: basefw: Implemented ipc4 libraries info get
Added support for ipc4 query no 16. This makes it possible to get
information about the current basefw library.

Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
2024-04-23 19:40:49 +03:00
Laurentiu Mihalcea 9737e124bc nxp: imx8/imx8x: switch to native Zephyr drivers and timer domain
This commit includes all necessary changes for switching
to timer domain and Zephyr native drivers on imx8 and imx8x.
This consists of:
	1) Switching all imx8 topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

This commit includes all necessary changes for switching
to native Zephyr drivers on imx8/imx8x.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Laurentiu Mihalcea 0b88030785 lib: dma: add entries for imx8/imx8x's EDMA0 and HOST_DMA nodes
Add entries for EDMA0 and HOST_DMA nodes.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Laurentiu Mihalcea ca72c403a3 lib: dai: add entry for NXP's ESAI
Add entry for NXP's ESAI IP inside the "zephyr_dev" array.
What the entry does is it fetches all "struct device"s for
ESAI nodes marked as "okay".

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Laurentiu Mihalcea 43422abe02 audio: dai-zephyr: add entry for NXP'S ESAI
Add entry for NXP's ESAI IP in dai_set_config().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Laurentiu Mihalcea 2cd630465b nxp: imx8/imx8x: add SAI, EDMA, ESAI and HOST_DMA nodes
Add nodes for the following IPs: SAI, EDMA and ESAI. Also,
add node for HOST_DMA. These are all required for switching
to Zephyr native drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Laurentiu Mihalcea 4284556e9b nxp: imx8/imx8x: switch to Zephyr logging
Switch to using Zephyr logging on imx8 and imx8x to
prepare for using native Zephyr drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Grzegorz Bernat db97b54939 Audio: basefw: Implement ipc4 pipeline info get
Added support for ipc4 query no 255 (10).
This make it possible to get information about
the current loaded pipelines.

Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
2024-04-23 12:16:50 +01:00
Laurentiu Mihalcea ebe33ca38d .github/zephyr: disable disassembly with inline source code
By default, the disassembly file (.lst) generated
during the build process when enabling `CONFIG_OUTPUT_DISASSEMBLY`
will also contain inline source code. This is not ideal
for reproducible builds that compare the .lst files
obtained on different platforms (i.e: Windows and Linux)
because of the differences in the inline source code that
may appear.

One of the identified causes for such differences were
the ".." include paths, which resulted in the Windows
.lst omitting some bits of the inline source code that
were present in the Linux .lst file.

Because these issues are hard to debug and unintuitive,
the solution is to disable the inline source code. This way,
the CI can keep testing for reproductibility using just the
assembly and machine code from the .lst file, which are
more important than the inline source code.

This fixes thesofproject/sof/issues/9034.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 11:49:04 +03:00
Laurentiu Mihalcea ef674a274a west.yml: update Zephyr to fb7e9379e137
Pulls in the following patches relevant to SOF:

94d156c9c84c nxp: imx8ulp: enable serial interface
bc63835ba240 dts: xtensa: intel_adsp_cavs25_tgph: correct SSP definition
aecf19c3c1be dts: xtensa: intel_adsp_ace15: correct SSP definition
45205f865e18 dts: xtensa: intel_adsp_ace20: correct SSP definition
17081222e2e7 drivers: dai: intel: ssp: fix LOG_ERR level / false positive
fb7e9379e137 cmake: add control over inline source code disassembly

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 11:49:04 +03:00
Marc Herbert 665817fe84 xtensa-build-zephyr.py: add flexibility to generate `tools/` only
Installing most of the tools/ directory does not technically require
building any platform, so add that possibility.

This is useful because the Jenkins-based CI builds the (userspace) tools
separately. So far it has been picking hardcoded source paths but of
course the HWMv2 transition just broke that:
https://github.com/thesofproject/sof/pull/8913

While it's too late this time (we want to keep CI able to test stable
branches for some time), this commit prepares a future where all CIs can
stop hardcoding Zephyr source paths and pick the output of the
xtensa-build-zephyr.py installer and indirection layer instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-04-22 18:26:09 +03:00
Serhiy Katsyuba 06869cb20d detect_test: Fix processing for 24in32 format
* Added sign extension to properly convert 24in32 sample to int32_t.

* To choose default threshold valid sample size should be used instead
of container size.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-04-22 14:24:53 +01:00
Tobiasz Dryjanski 8a84d02bac volume: fix wrong volume ramp being chosen
Fade out was not working due to wrong order of operations. Ramp type was
set up before the correct type was set, so the default was always used.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-22 14:18:58 +01:00
Serhiy Katsyuba 30b3011bd8 ipc4: mixin: Add gain support (generic and HIFI3)
Restore gain support which was accidentally removed during previous
HIFI optimization/refactoring.

This commit only adds gain supports to "generic" and "HIFI3" mixin
implementation.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-04-22 14:18:17 +01:00
Mac Chiang 4c1cd870e6 topology2: add rt1318 and rt714 support on LNL
This patch adds following hardware configuration on LNL product:

SDW link0: RT714 DMIC
SDW link1: RT1318 Left Speaker
SDW link2: RT1318 Right Speaker

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-04-22 13:44:29 +01:00
Johny Lin 58f141c19e module_adapter: return error if get_conf is not implemented
At present, if get_configuration is not implemented by internal module,
module_adapter will return 0 directly on config read commands. Under
the circumstances, the host will suppose the reading is succeeded, but
in fact the ata in IPC buffer is unwanted.

This commit changes the return code to non-zero for such cases, which
prevents the host getting the unwanted config data.

Signed-off-by: Johny Lin <johnylin@google.com>
2024-04-18 11:55:13 +03:00
Kai Vehmanen 14c4e86757 audio: base_fw: add platform layer to IPC4 hw_config data
Some of the IPC4 HW_CONFIG fields are platform specific and cannot be
filled with generic code.

Handle this functionality by separating platform specific parts of
base_fw to a new base_fw_platform.h interface. Move out existing code
for Intel cAVS and ACE platforms. Add a new stub implementation for
posix platform. This posix stub can be also used as a starting point
when adding IPC4 support to new platforms.

This platform construct can be later used to move out other
vendor and platform data out from base_fw.c.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 16:20:48 +01:00
Kai Vehmanen f1afff0c01 west.yml: update zephyr to 3614d4cb88f4
Update Zephyr to new baseline containing following patches
affecting SOF targets:

8a63a0a56339 intel_adsp: ipc: Fix policy state lock usage
e85226fd1a03 soc/intel_adsp: ipc: Remove fragile device state check
741bbaca6dd7 soc/intel_adsp: ipc: Remove unnecessary device state lock
a200dd88d878 dts: xtensa: intel_adsp: Set soft-off state as disabled
d5897a48aaab ipc: intel_adsp: Ensure IPC completion before runtime idle

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 16:53:27 +03:00
Peter Ujfalusi 3f7a589678 topology2: intel: hdmi-generic: Update rates and format support in pcm.caps
With ChainDMA the HDMI PCM can support IEC958_SUBFRAME_LE and the rate
is not limited to 48K only.

To be able to use bytestream passthrough (DD/DTS/etc).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-17 12:47:18 +01:00