Commit Graph

11341 Commits

Author SHA1 Message Date
Baofeng Tian 9e0f7eecec audio: eq_iir: create generic/ipc3/ipc4 source files for eq_iir
Create generic ipc3 ipc4 source files and move related code
into these source files.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian 0153f9f2fa audio: eq_iir: public common functions for ipc3 and ipc4
this is preparation for later ipc3 and ipc4 code split out
from eq_iir.c, these common functions will be used both by
ipc3 and ipc4.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian c1ba0949f7 audio: eq_iir: move iir structure definition to header file
this structure is common for both ipc3 and ipc4, move it
to header file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Baofeng Tian 9a9fa5d6fb audio: eq_iir: move iir header file to its own directory
move header file from include path to its directory path.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Marc Herbert e114166983 Delete inherited tools/rimage/.gitignore
rimage is not so special that it needs its personalized .gitignore

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-20 12:28:42 +01:00
Seppo Ingalsuo 76754b52d0 App: Intel: Enable Aria build for TGL and TGL-H platforms
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-20 12:35:53 +03:00
Ranjani Sridharan d03dcda88f audio: aria: Add set_large_config op
This patch is needed to make the module work with linux and avoid
firmware crash. This patch sets the attenuation parameters with the
bytes control since the setup parameters can't be passed in init()
as in Windows OS.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-20 12:35:53 +03:00
Seppo Ingalsuo 3f2ebb81d0 Tools: Tune: TDFB: Add support for IPC4 and tplg2 blobs
This patch adds generation of.conf format blobs for tplg2
with IPC4 format blob. The blob ABI header retrieving is
changed to common helper functions path those already have
the support.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-20 12:05:11 +03:00
Jyri Sarha 2eeae16d24 topology2: doc: Fix main page
The main page sources were dropped out from the document sources in the
last review rounds of the original PR. Add *.doxy to FILE_PATTERNS to
add it back.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-10-20 11:42:22 +03:00
Ranjani Sridharan b6d34fb4a8 topology2: Replace audio_format objects
Replace audio_format objects with input_audio_format/output_audio_format
objects in preparation for deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-19 20:57:23 +03:00
Ranjani Sridharan 7c735fe7a7 topology2: deepbuffer-playback: Remove stale comments
These were left over when the audio formats were cleaned up.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-19 20:57:23 +03:00
SaiSurya Ch 4c5409235e rimage: config: add acp_6_3 toml file to support acp_6_3 build
Add acp_6_3 toml file to support sof-acp_6_3.ri binary build

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 51a44aadb6 Enable PLL clock for the platform ACP_6_3
Enable PLL clock for the platform ACP_6_3.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 5e583c4c8a Add cascaded interrupt in the platform ACP_6_3
Add cascaded interrupt in the platform ACP_6_3.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 354029acbd Update clock switching sequence and return EBUSY for IPC when Host busy
- Update clock switching and clock frequency sequence.
- Return EBUSY for IPC when Host busy with previous ipc.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 8fab6f2236 platform: Add ACP_6_3 platform support
Add ACP_6_3 platform support

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 559f3ffdb9 tools: topology: add ACP_6_3 topology support
Add ACP_6_3 platform topology.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 2e5703d7d7 amd: acp_6_3: add build support for ACP_6_3
Add build support to enable ACP_6_3 platform.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch 2c4d02df1e src: arch: xtensa: configs: add ACP_6_3 defconfig
Add defconfig for ACP_6_3 platform.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
SaiSurya Ch b593e33af6 scripts: add support for ACP_6_3 platform
Add support for ACP_6_3 in build scripts.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-10-19 20:47:38 +03:00
Anas Nashif 82e05a6d61 platform: INTEL_HDA does not exist in the kconfig namespace
INTEL_HDA was removed in 59028ad3d1

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-19 17:09:17 +03:00
Ranjani Sridharan 054003f292 topology2: host-gateway-playback: Replace audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Fixes: 7a11e27bf2 ('topology2: host-gateway-capture: Replace audio_format objects')
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan 5945235b42 topology2: mixout-gain-dai-copier-playback: Replace audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan 1125fe06bc topology2: gain-copier-capture: Replace use of audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Ranjani Sridharan f64cc8f528 topology2: dmic-generic: Replace use of audio_format objects
Use input_audio_format/output_audio_format explicitly in preparation for
deprecating the audio_format class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-10-18 16:56:59 +01:00
Keqiao Zhang 02a7c98534 topology: add test TPLGs for LNL-RVP
There're no differences for SSP and SoundWire TPLGs between
MTL and LNL, we can reuse MTL TPLGs for LNL.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
2023-10-18 17:41:22 +03:00
Mac Chiang e3fc9c1c8e topology2: add rt713_rt1316, no sdw_dmic config
This is additional HW board: No SDW_DMIC connection

SDW0: rt713 Jack codec
SDW1: rt1316 smart amp l
SDW2: rt1316 smart amp r

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-10-18 16:32:15 +03:00
Jaroslaw Stelter ec3ca41b60 DP: fix DP thread priority
After enabling deadline calculation DP threads began to lose priority
in relation to logger thread which currently is set to the same priority
but has zeroed deadline.
Since processing should be not disturbed by logging operations, the
ZEPHYR_DP_THREAD_PRIORITY must be set to lower value than logger.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-10-18 16:30:38 +03:00
Baofeng Tian 56dae244ae audio: perf: enable dsp clock for performance measurement
previously, performance measurement based on platform clock, source
clock is 38.4mhz, for better align with CPC calculation, change
clock to dsp clock, this will be done through enable config:
CONFIG_TIMING_FUNCTIONS, and this config only be used with perf_cnt
header file, so this change only have impact on performance build.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-18 15:57:55 +03:00
Seppo Ingalsuo fab0f72901 Tools: Rimage: Config: Add RTC_AEC to TGL. TGL-H, and LNL
This patch adds same RTC_AEC module entry as added earlier
to config/mtl.toml. The purpose is enable testing the component
in other platforms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-18 14:50:18 +03:00
Marc Herbert 8bbad9f263 .github: re-enable rimage workflows
Migrate rimage build and cppcheck workflows from
sof/tools/rimage/.github/workflows/ (where they're ignored) to
sof/.github/workflows/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-18 13:42:40 +03:00
Marc Herbert 13a9c2558d Delete inherited rimage/.github/ workflows yamllint and checkpatch
We already have these checks in sof.git so they don't need to be
migrated.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-18 13:42:40 +03:00
Baofeng Tian 19c26ea9f4 audio: volume: add config for peak volume
Add config to control peak volume code need build or not.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-18 13:23:09 +03:00
Baofeng Tian 8fc405d119 audio: volume: reduce ramp volume calculation
Will first check whether have same target volume, if same,
then only calculate one channel and copy to other channels.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-18 13:23:09 +03:00
Baofeng Tian 1012cea3d6 audio: volume: remove one space in volume code
remove space to align with coding standard.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-18 13:23:09 +03:00
Rander Wang 1fc1d28584 topology2: clean up audio format
Separate the input & output audio format.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-17 15:55:07 -07:00
Rander Wang 4dad5c2d5c topolog2: nocodec: set output_pin number
The num_output_pins was set for pass-through path but missed in normal
path. Without it Linux kernel driver wouldn't set second output pin
format for dai copier which connects smart amp and gain module.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-10-17 15:55:07 -07:00
Seppo Ingalsuo c22e3f438d Tools: Topology2: Use windows_fade in nocodec topologies
This patch changes all cavs-nocodec.conf based topologies to
use exponential Windows fade curve_type in gain components. It
is done to ensure the ramp gets tested after change of gain
curve_type default to linear.

The gain in included deep buffer playback pipeline (hw:0,31) and
in mixer pipeline (hw:0,41) are not changed because they are used
also in normal topologies. Also in capture direction DMIC raw
(hw:0,10) remains curve_type 2. Other gains are curve_type 1
Windows fade.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-17 17:33:50 +01:00
Seppo Ingalsuo 9aadd197ab Tools: Topology2: Change gain default curve type to linear
This change can drop in TGL platform 2ch 48 kHz gain component
peak load e.g. from 16.7 to 7.09 MCPS CPU_PEAK(MAX) reported by
sof_perf_analyzer.py. The peak varies a bit time. If several
gain instances ramp simulatenously in stream start, the peak
MCPS consumption could be source for xruns and glitches if overall
load is high.

The change with linear curve is barely audible. The
computationally heavier Windows fade exponential curve is required
only with Windows OS. Since Windows is not using ALSA topologies
this change does not impact it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-17 17:33:50 +01:00
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