Commit Graph

11202 Commits

Author SHA1 Message Date
Ranjani Sridharan aeb83eccc4 topology2: sdw-jack-generic: Replace audio_format objects
Use input_output_format/output_audio_format explicitly. Additionally,
this patch introduces the used of the CombineArrays feature in the
topology2 compiler to generate multiple audio format objects from the
attribute array combinations.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 16:45:29 +01:00
Ranjani Sridharan 6850be91ba topology2: deepbuffer-playback: Replace audio_format objects
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 16:45:29 +01:00
Ranjani Sridharan b0b5958875 topology2: sdw-amp/dmic-generic: Remove incorrect audio format
Setting the in bit depth for the second audio format in the
host-gateway-capture object results in resetting the channel count to 2.
The in_bit_depth is set to 32-bit by default for all audio formats in
host-gateway-capture class already.

Fixes: 7a11e27bf2 ('topology2: host-gateway-capture: Replace audio_format objects')
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-17 15:44:54 +01:00
Mac Chiang 457142ea1e mtl: add dts-codec support
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-10-17 15:44:11 +01:00
Daniel Baluta 8eeaf5aea5 drivers: imx: Select HAVE_SDMA_FIRMWARE when using MICFIL
MICFIL needs multi-fifo SDMA script so select HAVE_SDMA_FIRMWARE.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-17 15:38:25 +01:00
Daniel Baluta 93c63bd340 drivers: sdma: Add sdma script code in header file
For ease of use add sdma script code directly in the sdma
header file.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-17 15:38:25 +01:00
Marc Herbert aadbfa0a3b tools/rimage/README.md: update following transfer to sof.git
We still have tomlc99 as a git submodule for now.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-17 15:36:55 +01:00
Seppo Ingalsuo d3b7e54f3f Tools: Tune: dcblock: Create set of cut-off frequencies
This patch modifies script example_dblock.m to create in
addition to existing default coefficients blob with parameter
R=0.98 a set of blobs those provide (-3 dB) cut-off frequencies
20, 30, 40, 50, 100, 200 Hz for 16 kHz and 48 kHz for various
usages. Human understandable parameters for blobs helps to select
the configuration for the needed dcblock usage.

The parameter value R for given frequencies is calculated
with iterative function dcblock_rval_calculate(). A closed
form equation might be possible to derive from the transfer
function. If such is found this function can be replaced with
quicker equation -- or with more advanced faster converging
iteration.

The topology blob export functions are also modified to add
comment line for exact build command.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-16 16:38:41 +01:00
Seppo Ingalsuo 64fcebbd64 Tools: Topology2: Add nocodec topology to test google-rtc-aec
The first playback PCM is for AEC mic input via SSP0 LBM. The second
playback PCM is for AEC reference via SSP2 LBM. The first capture
PCM is the AEC output.

The AEC (mockup) can be run and tested with the topology like
this:

$ aplay -Dhw:0,0 mic_clip.wav &
$ aplay -Dhw:0,2 ref_clip.wav &
$ arecord -Dhw:0,0 -f dat -d 10 output.wav

With AEC mockup version output.wav is mix of microphone
and reference.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-16 16:08:24 +01:00
Daniel Baluta 8819667b07 drivers: imx: Select DONE bit from software
With multi-fifo we need to enable done bit from software
as we have multiple fifos.

For this we make use of sw_done_sel configurations bits and
write proper bits into SDMA_DONE0 register.

For more information see `SDMA DONE0 Configuration
(SDMAARMx_DONE0_CONFIG)` SDMA register from i.MX8 reference manual.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Daniel Baluta 4c7b69b1c4 drivers: sdma: Set watermark level for PDM
In order to enable PDM we need to use Multi-fifo support
and mcu_2_sai RAM script.

This script defines watermark level as follows:

r7 = Watermark
    bit0~11: watermark level(wml*fifo_number)
    bit15~12: to do-fifo number
    bit16~19: fifo offset
    bit27~24: sw done selector
    bit28~31: # audio channels in one frame, 0: 1 channel,1: 2 channels
    bit23: sw done enabled

Configuration parameters should come from DAI (PDM in our specific case)
but there is no easy way to forward such information so we just make
use of some default configuration, 4 fifos, 1 channel per fifo, sw done
enabled.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Daniel Baluta 5f0d6222e7 platform: imx8m: dai: Set FIFO depth for PDM
On i.MX8MP PDM fifo has 32 entries (each with 4 bytes).

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Daniel Baluta fb1d4f80b5 drivers: imx: sdma: Enable multi-fifo script for micfil
MICFIL can support up to 8 channels. In order for this to work
we need to use multi-fifo script.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Daniel Baluta 52c4da5c95 drivers: imx: sdma: Introduce new SDMA channel type
Based on this we select proper firmware in order to
support multi-fifo.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Daniel Baluta 15507ec9ef topology: Add MICFIL topology for imx8mp
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-10-16 12:47:50 +02:00
Marcin Szkudlinski 868711c579 dp: start DP tick fixup
This is fixup for 689e8e999f

Incorrect list pointer has been used

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-10-13 14:52:19 +03:00
Bard Liao c1b74bac9b topology2: sof-mtl-rt713-l0-rt1316-l12-rt1713-l3: use default stream
name

rt713 and rt1713 are in different SoundWire links. So, no DAI type will
be appended to DAI link name. We should use default stream name in
the topology.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-10-13 12:39:38 +03:00
Seppo Ingalsuo df8f9dfc09 Tools: Topology2: Add sof-hda-benchmark-eqfir16/24/32-tgl build
This patch adds FIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 311c03026f Tools: Topology2: Add sof-hda-benchmark-eqiir16/24/32-tgl generate
This patch adds IIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 501816a90a Tools: Topology2: Add sof-hda-benchmark-drc16/24/32-tgl build
This patch adds DRC test topologies build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo a292c9cf25 Tools: Topology2: Build topologies to test processing components
This patch uses cavs-benchmark-hda.conf to build topologies to
test components in a simple playback and capture configuration.

host copier --> component --> DAI copier
host copier <-- component <-- DAI copier

The built topologies are
sof-hda-benchmark-dcblock16/24/32-tgl.tplg

The shell script bench_comp_generate.sh is added to conveniently
generate include files needed to build new test topologies for
component with s16/s24/s32 format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Seppo Ingalsuo 269d8d5924 Tools: Topology2: Add DC block component
This patch adds the widget class dcblock and a sample
bytes configuration blobs.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-13 12:34:56 +03:00
Iuliana Prodan bb8d6baf45 Revert "module_adapter: avoid module init crash in case of ipc data invalid"
This reverts 'commit e847c8b270 ("module_adapter: avoid module
init crash in case of ipc data invalid")'.

No data is not an invalid case for mixer, for example.

Fixes: #8265
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-10-13 09:13:40 +02:00
Ranjani Sridharan 7a11e27bf2 topology2: host-gateway-capture: Replace audio_format objects
With input_audio_format/output_audio_format objects in preparation to
deprecate the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-12 15:55:30 +03:00
Marc Herbert fd497c906a
Merge e330fb4ec7 into 5b5566f534 2023-10-11 16:16:37 +02:00
Anas Nashif 5b5566f534 zephyr: remove stray } from RIMAGE_CONFIG_PATH
A stray } is at the end of RIMAGE_CONFIG_PATH causing issues when
signing images.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 17:07:08 +03:00
Marcin Szkudlinski 689e8e999f dp: LL tick source start/stop fix
as DP uses LL as a tick source, it starts an empty LL task
to ensure that an instance of LL is running
This applies to mostly to secondary cores, but is may happen
that there's no LL instance started on primary

This commit fixes 2 problems
 - LL tick source was stated once for every DP module
 - LL tick source wasn't stopped when there were no DP
   modules running anymore

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-10-10 21:05:21 +03:00
Baofeng Tian d24abbc6ae audio: volume: move volume related config to component config
volume related config are missed to move during volume move out
from module adapter, move volume kconfig from module adapter folder
to volume folder with a specific volume kconfig file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-10 20:58:12 +03:00
Baofeng Tian a83df49446 audio: volume: enable linear ramp for ipc4 volume
previously, linear ramp is only applicable for ipc3, however,
linear is also applicable for chrome/linux with ipc4, so remove
this ipc3 restriction.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-10 15:56:08 +03:00
Baofeng Tian 48616b2092 audio: module adapter: create ipc3 and ipc4 specific source file
create ipc3 and ipc4 specific source file, these files will
only be used to store specific code accordingly.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-10 14:56:20 +03:00
Seppo Ingalsuo a8ee62a15c Audio: TDFB: Update component for IPC4
This patch updates the Time domain fixed beamformer (TDFB)
module prepare() to set in tdfb_params() IPC4 sink and source
parameters from initialization IPC. The notifications send to
user space for sound direction of arrival is updated to work
with IPC4 ALSA notifications.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-10 14:42:50 +03:00
Seppo Ingalsuo 3e368fefee IPC4: Add header to support user space ALSA notifications
This patch adds struct sof_ipc4_notify_module_data that matches
the Linux kernel handler for notifications from firmware to ALSA
user space. The SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL
event_id is used to identify the notifications for ALSA controls
like switch and enum.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-10 14:42:50 +03:00
Laurentiu Mihalcea da08c1a6b1 west.yml: Bump up Zephyr revision
This commit bumps up the Zephyr revision to contain
the fix for the i.MX93 CI build failure.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-10-09 18:03:47 -04:00
Marc Herbert e330fb4ec7 Delete old rimage submodule and old rimage west module
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:08:07 -07:00
Marc Herbert 98ee39f44c cmake: switch XTOS build to sof/tools/rimage
Switch away from the independent rimage submodule. Long story in
https://github.com/thesofproject/sof/issues/8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 157457c127 Switch smex and sof-logger to new sof/tools/rimage location
Switch away from the independent rimage submodule. Long story in
https://github.com/thesofproject/sof/issues/8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert f55338a985 Switch Zephyr build to new sof/tools/rimage location
Switch away from the independent rimage submodule. Long story in
https://github.com/thesofproject/sof/issues/8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 9b31875318 Add new sof/tools/rimage/tomlc99 submodule to west.yml too
Add it both as a git submodule and west submodule to minimize
disruption. The current focus is on rimage and that's a dramatic enough
change; one problem at at time.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 99206de401 Clean just inherited tools/rimage/.gitmodules file (for tomlc99)
.gitmodules files have no effect unless they're at the top-level.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert 4fe87bebbe Merge full rimage.git history back into tools/rimage/ subdir of sof.git
Merge full rimage.git history back into tools/rimage/ subdir of
sof.git thanks to:

   git merge --allow-unrelated-histories rimage-repo/main

Also list incoming tools/rimage/tomlc99 16000 gitlink in
sof/.gitmodules to avoid breaking all git submodule commands.
This MUST be done as part of this merge commit to avoid
git submodule errors and preserve git bisectability.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:04:16 -07:00
Jyri Sarha c1996e01e1 topology2: doc: Little fixes to make all classes show correctly
There were couple of classes that did not have their topology2 snippets
showing. Probably the essential problem was just the class definition
starting from the first line of the file. There was nothing obviously
wrong in the output of the filter, but the way the doxygen works is
sometimes hard to anticipate. Adding \struct before the definition
fixed the problem.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 649ac7d2d2 topology2: doc: input_audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 215d7b3a07 topology2: doc: fe_dai.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha a3e6cf7aac topology2: doc: data.conf: Change comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 22ec5b3811 topology2: doc: audio_format.conf: Translate comments to Doxygen
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha c7f0e930f2 topology2: doc: widget-common.conf: Attribute comments to Doxygen
Change attribute comments to Doxygen comments.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 2e9589069a topology2: doc: volume-playback.conf: Doxygenify existing comments
Doxygenify all comments that are correctly placed near the attribute's
or objects C-translation. This is not the case for comments before
Object.Base { } definition or comment before including
pipeline-common.conf, which is inlined by the topology2 filter, does
not end up in any relevant place, so its better just leave those
comments as they are. They can anyway be read from topology2 source
snippets.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 13cf2a2752 topology2: doc: mixer.conf: Doxygenify and improve the existing comments
Improve and convert comments to doxygen documentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 37ac9fcc6a topology2: doc: common.conf: Doxygenify the existing comments
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00
Jyri Sarha 080dc5a340 topology2: doc: gain.conf: Convert comments to Doxygen documentation
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-06 15:34:14 +01:00