Commit Graph

2446 Commits

Author SHA1 Message Date
Dharageswari R 20ca7a6079 topology2: add support for PDM DMIC with rt722 topology
Adding the support for 4 channel PDM DMIC with rt722 topology

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
2024-09-19 12:35:33 +01:00
Marcin Szkudlinski a1b89e08a2 buf: make all the modules use comp_dev_get_first_data_producer
Change all access to the first element of dev->bsource_list
from direct to API call comp_dev_get_first_data_producer

access in pipeline management code, like module adapter,
is omitted intentionally

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-19 12:43:39 +03:00
Marcin Szkudlinski 718df513f2 buf: make all the modules use comp_dev_get_first_data_consumer
Change all access to the first element of dev->bsink_list
from direct to API call comp_dev_get_first_data_consumer

access in pipeline management code, like module adapter,
is omitted intentionally

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-09-19 12:43:39 +03:00
Seppo Ingalsuo 9d1177acf4 Tools: Testbench: Convert file component to module adapter
This is done as preparation for testbench IPC4 support. The
update to IPC4 is simpler for a module adapter component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-17 16:23:47 +01:00
Ranjani Sridharan d7c0b5573f tools: plugin: Add support for enum controls
Add support for enum controls in the plugin. Fix the get_attribute and
get_enumerated_name callbacks to use the enum control items instad of
the count.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-17 16:21:25 +01:00
Ranjani Sridharan 5b606a94dd tools: plugin: ctl: Add a helper function to configure the IPC message
This will avoid the duplicated code when configuring the IPC message for
kcontrol IO.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-17 16:21:25 +01:00
Ranjani Sridharan 5416adbc23 tools: plugin: ctl: Fix reply_data_size calculation
Use the size of struct ipc4_module_large_config_reply instead of the
size of the pointer.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-17 16:21:25 +01:00
Ranjani Sridharan 0ae6a330aa tools: plugin: tplg_ctl: Use the ops info to determine kcontrol type
Use the ops info to differentiate the different kcontrols in topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-17 16:21:25 +01:00
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
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
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
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 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
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
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
Eddy Hsu 7789531bfc comp: ctc: add ctc switch control.
Add enablement switch controls of Google CTC component.

Signed-off-by: Eddy Hsu <eddyhsu@google.com>
2024-09-10 15:30:25 +01:00
Seppo Ingalsuo fce09fc56b Audio: Multiband-DRC: Move blob configuration scripts to module directory
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>
2024-09-10 12:06:37 +03:00
Seppo Ingalsuo 2950246415 Tools: Test: Audio: Add to process_test.m option to show plots
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>
2024-09-09 12:39:44 +03:00
Seppo Ingalsuo 85b8ab64ac Tools: Test: Audio: Fixes for process_test.m for moved files
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>
2024-09-09 12:39:44 +03:00
Mac Chiang 7fc758be43 topology2: Add cs42l43 and cs35l56 support on ADL/RPL, MTL/ARL, LNL
The ADL, ARL, LNL hardware board configurations are below:
ARL has the same dsp generiation as MTL. So set platform = mtl.

SoundWire#
  ├── link 0: cs42l43 Audio Jack and DMICs/Bridge to amplifiers.
      | |     -> sof-rpl-cs42l43-l0.tplg
      │ │     -> sof-mtl-cs42l43-l0.tplg
      │ │     -> sof-arl-cs42l43-l0.tplg
      │ │     -> sof-lnl-cs42l43-l0.tplg
      │ │
      │ ├── link 2: cs35l56 Left and Right Amplifier.
      │	            -> sof-arl-cs42l43-l0-cs35l56-l2.tplg
      │
      ├──── link 2: cs35l56 Right/Rightx2 Amplifier.
      ├──── link 3: cs35l56 Left/Leftx2 Amplifier.
                    -> sof-adl-cs42l43-l0-cs35l56-l23.tplg
                    -> sof-arl-cs42l43-l0-cs35l56-l23.tplg
                    -> sof-lnl-cs42l43-l0-cs35l56-l23.tplg

SoundWire#
  ├── link 2: cs42l43 Audio Jack and DMICs.
      │       -> sof-arl-cs42l43-l2.tplg
      │ 
      ├──── link 3: cs35l56 Left and Right Amplifier.
                    -> sof-arl-cs42l43-l2-cs35l56-l3.tplg

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-09-09 11:13:38 +03:00
Mac Chiang ae69f5cd26 topology2: update flags for alignment
PLATFORM=tgl, can safely removed as it is not included in cavs-sdw and
does not affect the soundwire configurations.

Remove SDW_FMT_24 flag because it has become the fixed format for
soundwire configurations.

SDW_AMP_FEEDBACK is currently used for debugging purposes. So set false
to disable it.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-09-09 11:13:38 +03:00
Jyri Sarha 9152b87a4d tools: debug_stream.py: debug_stream record receiving and decoding
Python implementation for receiving and decoding debug-stream records
from debug window slot transportation. Opens SOF debugfs file
"debug_stream" reads and decodes the records from the circular buffer
documented in soc_debug_window_slot.h. This initial version only knows
of DEBUG_STREAM_RECORD_ID_THREAD_INFO records.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-09-06 12:28:58 +03:00
Seppo Ingalsuo 82252055c0 Audio: DCblock: Tune: Move dcblock setup scripts to module directory
The change is done to consolidate the files belonging to the
module. This patch only moves the files to a new location.
Successive patches address the issues caused by this move.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 13:32:56 +01:00
Seppo Ingalsuo 80c621aeff Audio: Crossover: Move blob configuration scripts to module directory
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>
2024-09-02 11:28:58 +01:00
Ranjani Sridharan 847b2ae7a7 tools: plugin: noise_suppression: Fix build error
Recent changes to UUID naming dropped the _comp in the UUID declaration.
Fix the noise suppression module to adhere to the new naming while
declaring the module interface and trace.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-09-02 11:24:53 +01:00
Seppo Ingalsuo 73de9de524 Audio: EQ: Tune: Move equalizer setup scripts to module directory
The scripts are moved to consolidate the audio modules.

The setup tool is common for IIR and FIR where IIR is more
commonly used so the destination directory is eq_iir. The
equalizers with both IIR and FIR part are also designed in
the same run so the design is not split.

The paths are fixed in code for new location. There are no
other changes.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 11:21:20 +01:00
Seppo Ingalsuo 298687c016 Tools: Rimage: Config: Add mfcc.toml include for MTL, LNL, PTL
The MFCC component is not loading in these platforms due to
missing edit to <platform>.toml.h.

As editorial change the missing newline in the end of
ptl.toml.h is fixed.

Fixes: f7715b814b
       ("Audio: MFCC: Fix build of component for current SOF")

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-09-02 10:30:34 +01:00
Pierre-Louis Bossart 8b8c842c78 topology2: add simple passthrough for HDA tests
Long overdue, I don't know why we keep adding complicated stuff
without having a simpler baseline.

Two configurations are provided, one with default copiers and another
with CHAIN_DMA.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-08-27 14:35:32 +03:00
Seppo Ingalsuo ad85184af0 Tools: Test: Audio: Mitigate trace flood in process_test.m
The verbose test trace flood slows down the test to near
unusable test times due to a lot of text printed to Octave
console. As result also the SOF CI logs become large.

This patch adds redirect of testbench trace into a temporary
file instead of standard output in process_test.m. The trace
content is printed in comp_run.sh to console only if there has
been an error. To prevent growing /tmp the trace file is
deleted after test run and possible print to console.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-27 13:39:53 +03:00
Seppo Ingalsuo 371245bb94 Tools: Topology2: Fix cavs-nocodec.conf SSP2 PCM rates
The rate_min and rate_max no more work with IPC4 topologies. The
SSP2 PCM host pipeline contains a sample rate converter so it can
support multiple rates. With attempt to play (or capture) with
other than 48 kHz the error is printed and resulting playback has
wrong pitch:

Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
         please, try the plug plugin

Use of rates with list of all rates in topology fixes the issue.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-22 21:53:35 +03:00
Seppo Ingalsuo b1c996b21b Tools: Tune: MFCC: Fix channels handling in audio feature plotter
In test topologies the MFCC data can be packed to 1, 2, or 4
channels stream. This change fixes the shown time scale for
audio features 3D plot.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:39:05 +01:00
Seppo Ingalsuo 5c84e5bbd4 Tools: Tune: MFCC: Add export of default blob for tplg2
This patch updates the setup_mfcc.m Octave script to produce
configuration blob for topology version 2 builds.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:39:05 +01:00
Seppo Ingalsuo 75c53fb990 Tools: Topology2: Add MFCC component and topologies for hda-generic
This patch adds build of topologies
- sof-hda-generic-cavs25-2ch-mfcc.tplg
- sof-hda-generic-cavs25-4ch-mfcc.tplg
- sof-hda-generic-ace1-2ch-mfcc.tplg
- sof-hda-generic-ace1-4ch-mfcc.tplg

The MFCC is connected to 16 kHz DMIC1 DAI. The MFCC bitstream
is passed to capture PCM. The DMIC1 pipeline style is copied
from DMIC0:

DAI copier -> IIR -> gain -> module_copier -> MFCC -> host copier

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:39:05 +01:00
Seppo Ingalsuo fd70236924 Tools: Topology2: Move IIR blob define to upper level from pipeline
The same dai-copier-eqiir-gain-module-copier-capture pipeline can
be used for both DMIC0 and DMIC1, with different IIR setting,
so the blob definition is moved to dmic-generic.conf where the
pipeline is instantiated.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:39:05 +01:00
Seppo Ingalsuo f7715b814b Audio: MFCC: Fix build of component for current SOF
It has not been possible to build the component earlier for Zephyr
IPC4 systems. This patch makes the next fixes:

- Add SOF_MODULE_INIT() and include of rtos/init.h
- For unit test fix the init function to
  sys_comp_module_mfcc_interface_init()
- To Zephyr/CMakeLists.txt add the needed math library sources
- Add .toml files for rimage for IPC4 systems

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:39:05 +01:00
Seppo Ingalsuo 94e1bd2e6e Tools: test: Audio: Fix src_test.m run error
The SRC module tools have moved, so the path to retrieve SRC
filter spec has changed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-08-21 14:29:17 +01:00
Ranjani Sridharan b5c91d428c topology2: pipelines: Use SubTreeCopy where possible
Modify the class definitions for the mixout-gain-efx-dai-copier-playback
and the mixout-gain-efx-mbdrc-dai-copier-playback pipelines to use the
SubreeCopy feature to extend the mixout-gain-eqiir-eqfir pipeline class
definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-08-21 13:03:00 +01:00
Ranjani Sridharan b32de25fc1 topology2: pipelines: Add a new pipeline
Add a new pipeline, mixout-gain-eqiir-eqfir, that uses the new alsa-utils
topology feature to allow extending existing pipeline definitions. This
new class extends the base class mixout-gain-dai-copier-playback class
by adding the eqiir & eqfir widgets along with the new routes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-08-21 13:03:00 +01:00