Commit Graph

12610 Commits

Author SHA1 Message Date
Ranjani Sridharan ce385cf32a tools: plugin: Add index for kcontrols
Add an index field for kcontrols. This will be useful in differenciating
kcontrols of the same type in a widget. Modify the signature of the
control callback function to pass the index as an argument when creating
kcontrols. Pass 0 for ipc3 kcontrol builds as it will be unused in this
case anyway.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-17 16:21:25 +01:00
Kai Vehmanen dfd74b1765 versions.json: set version to 2.11.99
Open tree for 2.12 development now that stable-v2.11 is branched out.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-17 16:20:33 +01:00
Seppo Ingalsuo 56c60cd19b Tools: Topology2: Add build of 96 kHz DMIC nocodec topologies for PTL
This patch adds build of topologies where DMIC0 related pipelines
and PCMs are set to operate with 96 kHz rate.

- sof-ptl-nocodec-dmic-4ch-96k.tplg
- sof-ptl-nocodec-fpga-dmic-4ch-96k.tplg

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-17 14:18:58 +01:00
Seppo Ingalsuo 31cfb30b6f Tools: Topology2: Add topology sof-ptl-max98357a-rt5682-ssp2-ssp0
The topology is built into development to be used for testing and
further development.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-17 14:18:58 +01:00
Seppo Ingalsuo 350c7bd62b Tools: Topology2: Build nocodec topologies for PTL and PTL FPGA
This patch builds test topologies sof-ptl-nocodec.tplg,
sof-ptl-nocodec-fpga-2ch-pdm0.tplg, and sof-ptl-nocodec-fpga-4ch.tplg.
The changes include:

- New ptl.conf where DMIC and SSP versions are updated
  vs. LNL and MTL.
- The definitions for blob 3.0 format are added to
  instruct alsa-utils to process a new format SSP blob.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-17 14:18:58 +01:00
Kai Vehmanen f39e416a80 zephyr: dai.h: fix typos in code comments
Fix errors in code documentation to match the implementation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 8f3b12ffbe xtos: sof/lib/shim.h: remove header
Remove the shim.h interface from RTOS layer as there is no use
of this interface anymore in SOF codebase.

Link: https://github.com/thesofproject/sof/issues/9015
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 5c60405368 platform: intel: remove shim.h interface as it's no longer needed
All users of shim.h have been either removed and/or moved to
Zephyr, so the interface can be removed from codebase.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 80ec0a532b platform: intel: cavs: remove unused pm_memory.h
Memory power management has been moved to Zephyr for these platforms, so
this file can be removed. Removing this file allow to remove the SOF shim.h
layer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 6fb0b001d3 platform: intel: cavs: remove unused asm_memory_management.h
Memory management has been moved to Zephyr for these platforms, so this
file can be removed. Removing this file allow to remove the SOF shim.h
layer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen a7d61cbe45 platform: intel: cavs: remove unused dw-dma.h
Only native Zephyr drivers supported now for Intel cAVS, so dw-dma.h
can be removed. Removing this file allow to remove the SOF shim.h
layer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 17724b7195 platform: tigerlake: move remain use of shim.h to cavs code
The only remaining user of the SOF shim.h platform interface
is Intel Tiger Lake platform. And even for this target, only a very
small part of the interface is used. Everything else is either
not used, and/or moved to Zephyr.

Move the remaining definitions to the Tiger Lake implementation,
allowing the interface to be removed from SOF platform layer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 20:52:05 +03:00
Kai Vehmanen 48193f89e1 xtos: move list.h to application interface
sof/list.h is a software interface used by the audio pipeline
framework and should not be in the RTOS abstraction layer.

Link: https://github.com/thesofproject/sof/issues/9015
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 19:16:58 +03:00
Kai Vehmanen 55ecc19ab6 app: intel_adsp_ace15_mtpm.conf: set DRC as built-in
Set DRC back as built-in (CONFIG_COMP_DRC=y) for these platforms.
DRC is now part of many common upstream topologies and as MTL
is a shipping platform, we cannot guarantee end-users have
sufficiently new kernel to support module loading.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-16 19:15:54 +03:00
Laurentiu Mihalcea 76e650e565 .github/zephyr: switch to python 3.10 on windows
Zephyr commit b3b8360f3993 ("west: runners: Add `west rtt` command
with pyocd implementation") adds some functionality to the
west commands making use of the pipe ("|") operator for
function return type hinting. As per PEP 604 [1], this operator
can be used for writing union types starting from python 3.10.
Since the SOF windows builds use python 3.8 this leads to
the CI failing.

To fix this, switch to using python 3.10. This is not a
problem for Linux CI jobs as they already use python 3.10.

The following is a snippet of a failed windows CI job
regarding this:

File "D:\a\sof\sof\workspace\zephyr\scripts/west_commands\runners\core.py",
line 780, in ZephyrBinaryRunner

    def get_rtt_address(self) -> int | None:

    TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

[1]: https://peps.python.org/pep-0604/

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-13 12:52:32 +03:00
Ranjani Sridharan 89e417a888 tools: topology2: sof-plugin: Add an option for mixin-mixout pipelines for playback
This will be useful to test volume controls with the plugin.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 08754de013 plugin: alsaplug: Add kcontrol set up callback
Define the callback for setting up kcontrols in the plugin. Add a few
new fields in struct plug_shm_ctl to store the module info and the
volume table for converting mixer values to linear volume gain.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 58465b8750 tools: plugin: tplg: Pass comp_info when creating controls for pga
This will be used to store the module id and instance ID when creating
the volume controls.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 4c3c1ed7dd plugin: alsaplug: pcm: Init the global context earlier
Initialize the shared memory for the global context during init so that
it can be used to store the kcontrol info during topology parsing. Move
the glb_ctx field from struct snd_sof_pcm to struct snd_sof_plug so that
it can be accessed during topology parsing.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 40c1a7d55f tools: plugin: alsaplug: ctl: Fix control ops for IPC4
Fix the read/write integer operations for IPC4 and the IPC messages
queues in the plugin kcontrol. Convert the bytes/enum ops implementation
to stubs. Support for these will be added later.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 139120033f plugin: alsaplug: Modify the signature of plug_parse_conf()
In preparation for parsing just the topology file from the command line
for kcontrols, modify the signature of plug_parse_conf() to add an
argument to specify it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Ranjani Sridharan 119af89754 ipc4: handler: Handle the set/get large config IPCs for CONFIG_LIBRARY
Add the logic to copy the data to/from the mailbox when CONFIG_LIBRARY
is enabled with the set_large_config and get_large_config IPCs.
Also, make sure to copy the data to the mailbox along with the replay
message.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-13 12:50:54 +03:00
Peter Ujfalusi 1956aec13b topology2: tplg-targets-hda-generic: Add support for HDMI + DMIC combination
Extend the HDMI only configuration to support idsip + DMIC setups.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-13 10:50:08 +03:00
Guennadi Liakhovetski 5c025b0d9d asrc: enable building as an llext module
Add support for LLEXT building to asrc.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski ed65e22943 eq-fir: enable building as an llext module
Add support for LLEXT building to eq-fir.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski c7bbfedf4b llext: export symbols, required for eq_fir
When built as an llext module, eq_fir requires several base-firmware
provided symbols, export them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski dcd21cd0cb volume: add LLEXT support
This makes it possible to build volume as an LLEXT module to be
loaded at run-time.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski c7e82df356 llext: export 2 symbols, required for modular volume
When building volume as an LLEXT module, two more symbols are
required: __divdi3() and module_set_configuration(), export them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski 1dd1b278d8 volume: move gain.toml and peakvol.toml into volume.toml
To make volume an LLEXT module it should have a single TOML
configuration file named volume.toml. This is easy to do, using
respective Kconfig options.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Guennadi Liakhovetski cfd27fbde0 src: convert to a loadable module
Build src as a loadable llext module.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 18:07:16 +03:00
Kai Vehmanen 0c3be86751 platform: lunarlake: remove drivers/interrupt.h
Remove the unused platform header.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-12 16:42:19 +03:00
Jyri Sarha 7dd2d7fca0 debug: debug_stream: Couple of debug print and comment typo fixes
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-11 18:32:04 +03:00
Jyri Sarha 8884a5dae7 debug: debug_stream_slot: Fix circular buffer alignment and update comments
The cache-line alignment was removed from circular buffer descriptors
on last moments of debug_stream_slot PR's review process. This broke
the circular buffer alignment and its now fixed in this PR. The commit
also contains the documentation update for the alignment removal change
that was also forgotten from the original PR.

Since this only affects the offsets of the circular buffers, that are
explicitly written in the debug window slot, there is no need to
update anything on the host side client. Also the unaligned circular
buffers appeared to work just fine, because of that.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-11 18:32:04 +03:00
Curtis Malainey 0ab4441e74 ipc3: check alignment of ext data
Sizes are not currently checked for alignment, this can generated
unaligned pointers for aligned types which is undefined behaviour.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-11 16:12:51 +03:00
Seppo Ingalsuo 97e5c0ded9 Tools: Topology2: Enable DMIC capture pre-processing for hda-generic
This patch adds to DMIC0 capture TDFB beamformer and DRC for
dynamic range control. The impacted topology names are:

- sof-hda-generic-2ch.tplg
- sof-hda-generic-4ch.tplg
- sof-hda-generic-cavs25-2ch.tplg
- sof-hda-generic-cavs25-4ch.tplg
- sof-hda-generic-ace1-2ch.tplg
- sof-hda-generic-ace2-2ch.tplg

The DMIC0 capture pipelines before this patch was:

DAI-copier -> IIR -> gain -> module copier -> host-copier

After:

DAI-copier -> IIR -> gain -> module copier ->
TDFB -> DRC -> host-copier

The beamformer is set for 2ch topologies to a narrow user
direction stereo image enhance with about 3 dB signal-to-noise
ratio improvement with blob "line2_generic_pm10deg.conf". In 4ch
topologies the beamformer is set to pass-through due to large
variations in notebook array geometries. The processing need to
be enabled per product by UCM2. The beamformer control switch is
by default off.

The DRC is set with blob "dmic_default.conf" to produce up to
10 dB boost in capture level. It helps to make DMIC capture louder
in normal silent conditions while it prevents clipping of samples
in loud conditions. The DRC control switch is by default off.

The added controls (seen with "amixer -c0 controls") are:

- Dmic0 Capture DRC bytes
- Dmic0 Capture DRC switch
- Dmic0 Capture TDFB angle set enum
- Dmic0 Capture TDFB beam switch
- Dmic0 Capture TDFB bytes

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-11 14:12:19 +01:00
Seppo Ingalsuo 707c0c5bce Tools: Topology2: Add beamformer and DRC to HDA analog capture
This patch adds to analog microphone capture pipeline TDFB
beamformer and DRC for dynamic range control.

The enhanced host copier pipeline is enabled if
HDA_MIC_ENHANCED_CAPTURE is set to true in topologies build.
The keys EFX_HDA_MIC_TDFB_PARAMS and EFX_HDA_MIC_DRC_PARAMS
control the applied configurations blobs.

There is no processing applied to capture audio since the
topology is built with pass-through blobs. E.g. UCM2 should
set up processing with blobs those have effect.

The change impacts sof-hda-generic.tplg. The other topologies
with DMIC are kept as before without added processing. The
analog capture pipelines are before this change:

dai-copier -> eqiir -> module-copier -> host-copier

After:

dai-copier -> eqiir -> module-copier -> TDFB -> DRC -> host-copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-11 14:18:53 +03:00
Seppo Ingalsuo cf7f45ecb0 Tools: Topology2: Add module copier to HDA analog capture
This patch changes in cavs-mixin-mixout-hda based topologies the
analog capture pipeline from

dai-copier -> eqiir -> host-copier

to

dai-copier -> eqiir -> module-copier -> host-copier

It allows more flexibility with processing add into host-copier
pipeline and allow capture stream duplication to multiple PCMs.

This change adds 2.2 MCPS from module-copier in TGL platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-11 14:18:53 +03:00
Seppo Ingalsuo b9aa4c5603 Tools: Topology2: Cleanup dai-copier-eqiir-module-copier-capture
The pipeline is generic for any type of DAI, so using DMIC0_DAI_EQIIR
to select IIR blob is wrong. The blob definition need to be done
at upper level where endpoint is known.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-11 14:18:53 +03:00
Seppo Ingalsuo 51f6eaeb4b Tools: Topology2: Remove unused include from cavs-es83x6.conf
The topologies built with cavs-es83x6.conf
(sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg and sof-mtl-hdmi-ssp02)
are not using dai-copier-eqiir-module-copier-capture pipeline,
so this include can be deleted.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-11 14:18:53 +03:00
Curtis Malainey 186251cddc fuzzer: add ubsan support
Adds support for undefined fuzzing

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-09-11 14:04:01 +03:00
Kai Vehmanen e983b510be base_fw: move SRAM bank details to Intel specific code
The SRAM definitions like SRAM_BANK_SIZE and EBB_BANKS_IN_SEGMENT
are only used in Intel specific code and not really needed in
platform layer that needs to implemented by all platforms.
Move these definitions to base_fw_intel.c and clean up related
definitions from platform layer.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-11 14:00:03 +03:00
Kai Vehmanen 8c619cf740 rtos: add Zephyr implementation of sof/lib/dai.h
Implement sof/lib/dai.h for Zephyr build and do not rely o
the xtos version for Zephyr builds. Add a warning to catch
invalid build configurations.

Link: https://github.com/thesofproject/sof/issues/9015
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-11 09:51:33 +03:00
SaiSurya Ch d00561e1a3 amd: Remove inclusion of unrequired header files.
amd: Remove inclusion of unrequired header files.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch 9e3ad3de83 src: alloc: Remove unused functions
src: alloc: Remove unused get memory size functions.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch dbe3d45a67 spinlock: Remove unused variable 'result'
Remove the unused variable 'result' that is causing the build error with GCC 11.4.0.
error: variable 'result' set but not used [-Werror=unused-but-set-variable]

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch c34c0e0483 platform: Add ACP_7_0 platform support
- Add ACP_7_0 platform support

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch d2713622d5 amd: acp_7_0: add build support for ACP_7_0
Add build support to enable ACP_7_0 platform.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch 22744b16ad rimage: config: add acp_7_0 toml file to support acp_7_0 build
Add acp_7_0 toml file to support sof-acp_7_0.ri binary build

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch 979abb6d8d tools: topology: add ACP_7_0 topology support
Add ACP_7_0 platform topology.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00
SaiSurya Ch c3dff854a8 src: arch: xtensa: configs: add ACP_7_0 defconfig
Add defconfig for ACP_7_0 platform.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2024-09-11 09:28:36 +03:00