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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Platforms that can only be built with Zephyr, can directly use
Zephyr cached/uncached functions in memory.h. It turns out the SRAM
address and size definitions were only needed for these duplicate
cache operations, so they can be removed as well.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The paths to topology and sof-ctl blobs are updated. The paths
to other setup scripts (common, crossover, drc, eq) are set with
a new helper function multiband_drc_paths.m.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
To consolidate the audio moves the scripts are moved to the same
directory as the module. This first step only moves the files.
The next steps rename the scripts and fix possible issue to
directories move.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Currently LLEXT module starting addresses are hard-coded in their
respective CMakeLists.txt files. This is very wasteful, since it's
unknown in what order modules are loaded, inflexible and not easily
extendible to other platforms. Switch to calculating addresses
automatically based on a single per-platform Kconfig value.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a Kconfig option that can be used to flip all LLEXT-supporting
code to a modular build. Use that global flag for smart-amp-test,
mixin-mixout and eq-iir.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This change replaces 6th argument with show_plots. If it is
set to 1, the plots are not hidden. If set to 2, also the
temporary sound files are not deleted that is useful for
debugging.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The full process test fails due to changed paths of Octave
module setup scripts.
The path EQ blob decoder has changed after the EQ tool was moved
under the module. Also the SOF ABI version retrieve function
path need to be set to tune/common to use the generic function
instead of the first version that was made for EQ export.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>