From 732f07c296751beb2d059373483ab02c814e1000 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Wed, 20 Mar 2024 10:27:30 +0100 Subject: [PATCH 01/17] ipc4: Ensure pipeline component directions are synchronized This patch addresses an issue where audio output could be silent due to the direction property of pipeline components not being set. The problem manifests when the pipeline is initialized in the sequence: Init -> Reset -> Pause -> Ready In this scenario, the direction property may remain unset, leading to incorrect pipeline behavior. In flow of transitions: Init -> Pause -> Ready, this issue does not occur because the firmware attempts to set the directions in pipe components during the transition from Init to Pause. This step is skipped if Pause is done after Reset, which is the scenario that this patch addresses. The added code ensures that if the source component's direction is unset but the sink's direction is set, or vice versa, the direction is copied from the set component to the unset one. This synchronization of the direction property guarantees that the pipeline's data flow is correctly established. This synchronization of the direction property guarantees that the pipeline's data flow is correctly established, allowing the `pipeline_for_each_comp` function to traverse and process all components as intended, thus resolving the silent audio output problem. Signed-off-by: Tomasz Leman --- src/ipc/ipc4/handler.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ipc/ipc4/handler.c b/src/ipc/ipc4/handler.c index e54b886434bb..171ffd6a79ad 100644 --- a/src/ipc/ipc4/handler.c +++ b/src/ipc/ipc4/handler.c @@ -251,6 +251,28 @@ static struct ipc_comp_dev *pipeline_get_host_dev(struct ipc_comp_dev *ppl_icd) struct ipc *ipc = ipc_get(); int host_id; + /* If the source component's direction is not set but the sink's direction is, + * this block will copy the direction from the sink to the source component and + * mark the source's direction as set. + */ + if (!ppl_icd->pipeline->source_comp->direction_set && + ppl_icd->pipeline->sink_comp->direction_set) { + ppl_icd->pipeline->source_comp->direction = + ppl_icd->pipeline->sink_comp->direction; + ppl_icd->pipeline->source_comp->direction_set = true; + } + + /* If the sink component's direction is not set but the source's direction is, + * this block will copy the direction from the source to the sink component and + * mark the sink's direction as set. + */ + if (!ppl_icd->pipeline->sink_comp->direction_set && + ppl_icd->pipeline->source_comp->direction_set) { + ppl_icd->pipeline->sink_comp->direction = + ppl_icd->pipeline->source_comp->direction; + ppl_icd->pipeline->sink_comp->direction_set = true; + } + if (ppl_icd->pipeline->source_comp->direction == SOF_IPC_STREAM_PLAYBACK) host_id = ppl_icd->pipeline->source_comp->ipc_config.id; else From 6980cdd7b433a7601c00745c61ec8f9ebf9a6ec7 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 4 Apr 2024 14:44:00 +0300 Subject: [PATCH 02/17] Tools: Tune: Eq: Fix IIR data files names in example_spk_eq.m The IIR files export overwrites the FIR files due to mistake in the script. Fixes commit 5ddbd34ba917 ("Tools: Tune: EQ: Add tplg2 blobs create") Signed-off-by: Seppo Ingalsuo --- tools/tune/eq/example_spk_eq.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tune/eq/example_spk_eq.m b/tools/tune/eq/example_spk_eq.m index f2411de98a70..80c4d1fac5c7 100644 --- a/tools/tune/eq/example_spk_eq.m +++ b/tools/tune/eq/example_spk_eq.m @@ -30,9 +30,9 @@ function example_spk_eq() fir.bin = 'eq_fir_spk.bin'; fir.tplg1 = 'eq_fir_coef_spk.m4'; fir.tplg2 = 'example_speaker.conf'; -iir.txt = 'eq_fir_spk.txt'; -iir.bin = 'eq_fir_spk.bin'; -iir.tplg1 = 'eq_fir_coef_spk.m4'; +iir.txt = 'eq_iir_spk.txt'; +iir.bin = 'eq_iir_spk.bin'; +iir.tplg1 = 'eq_iir_coef_spk.m4'; iir.tplg2 = 'example_speaker.conf'; %% Get defaults for equalizer design From 1e9a49731618155b690cb213c0348c782be5d8b2 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Wed, 27 Mar 2024 13:05:58 -0500 Subject: [PATCH 03/17] topology2: add support for MTL HP Omen14 This device has RT711 on link0, RT1316 on link3 and 2 PCH-attached DMICs. Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no support for -pdm1. Link: https://github.com/thesofproject/linux/issues/4880 Signed-off-by: Pierre-Louis Bossart --- .../topology2/production/tplg-targets-ace1.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/topology/topology2/production/tplg-targets-ace1.cmake b/tools/topology/topology2/production/tplg-targets-ace1.cmake index d192dca5fd9b..0aee8eb155f9 100644 --- a/tools/topology/topology2/production/tplg-targets-ace1.cmake +++ b/tools/topology/topology2/production/tplg-targets-ace1.cmake @@ -9,6 +9,22 @@ DMIC0_ID=2,DMIC1_ID=3,NUM_HDMIS=0,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl- "cavs-sdw\;sof-mtl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\ SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture" +"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l3\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,\ +SDW_SPK_STREAM=SDW3-Playback,SDW_SPK_IN_STREAM=SDW3-Capture,\ +HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6" + +"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l3-4ch\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,\ +SDW_SPK_STREAM=SDW3-Playback,SDW_SPK_IN_STREAM=SDW3-Capture,\ +NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-rt711-l0-rt1316-l3-4ch.bin,\ +HDMI1_ID=6,HDMI2_ID=7,HDMI3_ID=8" + +"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l3-2ch\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,\ +SDW_SPK_STREAM=SDW3-Playback,SDW_SPK_IN_STREAM=SDW3-Capture,\ +NUM_DMICS=2,PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-rt711-l0-rt1316-l3-2ch.bin,\ +HDMI1_ID=6,HDMI2_ID=7,HDMI3_ID=8" + "cavs-sdw\;sof-mtl-rt712-l0-rt1712-l3\;PLATFORM=mtl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack" From 2126e2896e75e8800036b04bc9dd8e51bad31a71 Mon Sep 17 00:00:00 2001 From: Ievgen Ganakov Date: Fri, 2 Feb 2024 11:43:25 +0100 Subject: [PATCH 04/17] dai: use ibs/obs for dma buffer size calculation Use ibs/obs size from ipc4_base_module_cfg to properly calculate period_count. It is especially important when FW aggregation mode is enabled and there are multiple DMAs allocated under one copier instance. That way period count for every DMA will be correctly evaluated and used for DMA buffer size calculation. Signed-off-by: Ievgen Ganakov --- src/audio/dai-zephyr.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 6fe221e4d1f8..b9b4e1f50f4a 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -848,12 +848,28 @@ static int dai_set_dma_buffer(struct dai_data *dd, struct comp_dev *dev, /* calculate DMA buffer size */ period_count = dd->dma->plat_data.period_count; + +#if CONFIG_IPC_MAJOR_4 + struct ipc4_copier_module_cfg *copier_cfg = dd->dai_spec_config; + uint32_t dma_buff_length_periods; + + /* copier ibs/obs is set to size of one period */ + if (dev->direction == SOF_IPC_STREAM_CAPTURE) + dma_buff_length_periods = dd->ipc_config.dma_buffer_size / copier_cfg->base.ibs; + else + dma_buff_length_periods = dd->ipc_config.dma_buffer_size / copier_cfg->base.obs; + + period_count = MAX(period_count, dma_buff_length_periods); +#else + period_count = MAX(period_count, + SOF_DIV_ROUND_UP(dd->ipc_config.dma_buffer_size, period_bytes)); +#endif /* CONFIG_IPC_MAJOR_4 */ + if (!period_count) { comp_err(dev, "dai_set_dma_buffer(): no valid dma buffer period count"); return -EINVAL; } - period_count = MAX(period_count, - SOF_DIV_ROUND_UP(dd->ipc_config.dma_buffer_size, period_bytes)); + buffer_size = ALIGN_UP(period_count * period_bytes, align); *pc = period_count; From 929b194b1c8cb8e1b77e19ddd0894c4067890e9c Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 15 Mar 2024 11:39:50 -0700 Subject: [PATCH 05/17] .github/zephyr: upgrade obsolete actions/setup-python@v4 to v5 Fixes the following warning: https://github.com/thesofproject/sof/actions/runs/8289483047 ``` Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. ``` Signed-off-by: Marc Herbert --- .github/workflows/zephyr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 2b12a78ca82a..1101d08f0635 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -297,7 +297,7 @@ jobs: run: zephyr-sdk-0.16.4_windows-x86_64/zephyr-sdk-0.16.4/setup.cmd /t all /h /c - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' @@ -320,7 +320,7 @@ jobs: # Call Setup Python again to save the PIP packages in cache - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 id: cache-python with: python-version: '3.8' From 07b762e0ae77f8bfa0e6749c7265a74ab39b1aed Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 21 Nov 2023 20:36:54 +0200 Subject: [PATCH 06/17] topology2: pipeline: add constraints on pipeline.priority attribute Add constraints on valid pipeline priority values and document the semantics so that 0 is considered the highest priority and such pipeline should be run first. The range matches definitions in include/ipc4/pipeline.h and SOF_IPC4_MAX_PIPELINE_PRIORITY. Signed-off-by: Kai Vehmanen --- tools/topology/topology2/include/components/pipeline.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology2/include/components/pipeline.conf b/tools/topology/topology2/include/components/pipeline.conf index ddb6448bd4cb..3a69354e30d2 100644 --- a/tools/topology/topology2/include/components/pipeline.conf +++ b/tools/topology/topology2/include/components/pipeline.conf @@ -57,10 +57,14 @@ Class.Widget."pipeline" { } } - # pipeline priority + # pipeline priority (0 = highest priority, 7 = lowest) DefineAttribute."priority" { # Token reference and type token_ref "scheduler.word" + constraints { + min 0 + max 7 + } } # core that the pipeline should be scheduled on From 2e71793421a06c706fedf173840122f3baa0f44c Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 8 Apr 2024 05:29:49 +0000 Subject: [PATCH 07/17] Topology2: sof-tgl-rt712: remove SDWx from stream name The widget name size will exceed the character limit and lead to below error failed to find module info for widget alh-copier.SDW0-Playback-SimpleJack.0 with UUID 00000000-0000-0000-0000-000000000000 Shorten the stream name to fix it. Signed-off-by: Bard Liao --- .../topology2/production/tplg-targets-cavs25.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/topology/topology2/production/tplg-targets-cavs25.cmake b/tools/topology/topology2/production/tplg-targets-cavs25.cmake index 8d68bdac25c9..08cd71e5a66a 100644 --- a/tools/topology/topology2/production/tplg-targets-cavs25.cmake +++ b/tools/topology/topology2/production/tplg-targets-cavs25.cmake @@ -30,10 +30,10 @@ SDW_DMIC_STREAM=Capture-SmartMic,SDW_JACK_OUT_STREAM=Playback-SimpleJack,\ SDW_JACK_IN_STREAM=Capture-SimpleJack,SDW_AMP_FMT_24=true,SDW_JACK_FMT_24=true" # IPC4 topology for TGL rt712 Headset, Amp and DMIC -"cavs-sdw\;sof-tgl-rt712\;SDW_JACK_OUT_STREAM=SDW0-Playback-SimpleJack,\ -SDW_JACK_IN_STREAM=SDW0-Capture-SimpleJack,SDW_SPK_STREAM=SDW0-Playback-SmartAmp,\ -SDW_DMIC_STREAM=SDW1-Capture-SmartMic,HDMI1_ID=5,HDMI2_ID=6,HDMI3_ID=7,\ -NUM_SDW_AMP_LINKS=1,SDW_AMP_FEEDBACK=false,SDW_DMIC=1,SDW_DMIC_STREAM=SDW1-Capture-SmartMic" +"cavs-sdw\;sof-tgl-rt712\;SDW_JACK_OUT_STREAM=Playback-SimpleJack,\ +SDW_JACK_IN_STREAM=Capture-SimpleJack,SDW_SPK_STREAM=Playback-SmartAmp,\ +SDW_DMIC_STREAM=Capture-SmartMic,HDMI1_ID=5,HDMI2_ID=6,HDMI3_ID=7,\ +NUM_SDW_AMP_LINKS=1,SDW_AMP_FEEDBACK=false,SDW_DMIC=1,SDW_DMIC_STREAM=Capture-SmartMic" "cavs-sdw\;sof-adl-rt711-4ch\;NUM_DMICS=4,DMIC0_ID=2,DMIC1_ID=3,\ PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,HDMI1_ID=4,HDMI2_ID=5,\ From 0542687ad92185cc84208dd78522ba6f0fdf230e Mon Sep 17 00:00:00 2001 From: Marcin Szkudlinski Date: Tue, 19 Mar 2024 13:57:05 +0100 Subject: [PATCH 08/17] debug: add an overlay enabling Zephyr's kernel tracing This commit adds an overlay enabling kernel traces from Zephyr. Those traces may be read on the host side from memory window Signed-off-by: Marcin Szkudlinski --- app/ctf_kernel_traces_overlay.conf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/ctf_kernel_traces_overlay.conf diff --git a/app/ctf_kernel_traces_overlay.conf b/app/ctf_kernel_traces_overlay.conf new file mode 100644 index 000000000000..9cbbe33735cd --- /dev/null +++ b/app/ctf_kernel_traces_overlay.conf @@ -0,0 +1,9 @@ +# enable traces from Zephyr kernel + +CONFIG_TRACING_BACKEND_ADSP_MEMORY_WINDOW=y +CONFIG_TRACING_ASYNC=n +CONFIG_TRACING_SYNC=y +CONFIG_TRACING=y +CONFIG_TRACING_CTF=y +CONFIG_THREAD_NAME=y +CONFIG_DEBUG_THREAD_INFO=y From 00ab55462cb374cb911063a5ae7289d62edd0904 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Thu, 4 Apr 2024 11:30:45 +0300 Subject: [PATCH 09/17] west.yml: update Zephyr to fd1a129a3e63 Contains the following patches affecting SOF: bba8641354bf dts: xtensa: nxp_imx8: add ESAI0 node bd9b3c67b240 drivers: dai: add driver for NXP's ESAI f4c73105e55a drivers: dai: sai: add pinctrl support Signed-off-by: Laurentiu Mihalcea --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index b3ddc5a56c30..8d96ba0ae5d2 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 1f55be8b42dfd54308038d1e422d8d4e0e7f39ab + revision: fd1a129a3e6330bdf44324e47ac7638dd6cdf5a5 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision From c159c1fa35329eca92db26140a589f22e7d6811f Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Tue, 9 Apr 2024 10:48:43 +0200 Subject: [PATCH 10/17] init: Refactor check_restore to return bool This patch refactors the `check_restore` function to return a `bool` instead of an `int`. This change enhances code readability and clarifies the intent of the function, which is to return a true or false value based on the presence of core structures in memory. No functional changes are introduced by this patch; it is purely a code quality improvement. Signed-off-by: Tomasz Leman --- src/init/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/init/init.c b/src/init/init.c index 86049d8b6be1..dba599661a7a 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -89,7 +89,7 @@ static inline void lp_sram_unpack(void) #ifndef __ZEPHYR__ -static int check_restore(void) +static bool check_restore(void) { struct idc *idc = *idc_get(); struct task *task = *task_main_get(); @@ -100,10 +100,7 @@ static int check_restore(void) * are available in memory, it means that this is not cold boot and memory * has not been powered off. */ - if (!idc || !task || !notifier || !schedulers) - return 0; - - return 1; + return !!idc && !!task && !!notifier && !!schedulers; } static int secondary_core_restore(void) From a43981e472e5122af9ad86f38f8aab90ee004957 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Fri, 5 Apr 2024 17:27:00 +0200 Subject: [PATCH 11/17] init: zephyr: Fix memory leak during secondary core init This patch refines the initialization process for secondary cores in a multicore environment when using Zephyr as the RTOS. The patch introduces a `check_restore` function specifically for Zephyr, which checks if basic core structures (IDC, notifier, schedulers) have been previously allocated and are still present in memory, indicating that the system is not undergoing a cold boot. By adding this check, the system avoids unnecessary re-allocation of these structures during the power-up sequence of secondary cores, effectively preventing the memory leak observed during repeated power cycle tests. fix #9005 Signed-off-by: Tomasz Leman --- src/init/init.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/init/init.c b/src/init/init.c index dba599661a7a..c9cc1eed6fec 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -87,7 +87,24 @@ static inline void lp_sram_unpack(void) #if CONFIG_MULTICORE -#ifndef __ZEPHYR__ +#ifdef __ZEPHYR__ + +static bool check_restore(void) +{ + struct idc *idc = *idc_get(); + struct notify *notifier = *arch_notify_get(); + struct schedulers *schedulers = *arch_schedulers_get(); + + /* check whether basic core structures has been already allocated. If they + * are available in memory, it means that this is not cold boot and memory + * has not been powered off. + */ + return !!idc && !!notifier && !!schedulers; +} + +static inline int secondary_core_restore(void) { return 0; }; + +#else static bool check_restore(void) { @@ -155,7 +172,7 @@ int secondary_core_init(struct sof *sof) err = arch_init(); if (err < 0) sof_panic(SOF_IPC_PANIC_ARCH); - +#endif /* check whether we are in a cold boot process or not (e.g. D0->D0ix * flow when primary core disables all secondary cores). If not, we do * not have allocate basic structures like e.g. schedulers, notifier, @@ -164,7 +181,6 @@ int secondary_core_init(struct sof *sof) */ if (check_restore()) return secondary_core_restore(); -#endif trace_point(TRACE_BOOT_SYS_NOTIFIER); init_system_notify(sof); From 2cfc85eda04221c89e53180695c421f6029e36c0 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 26 Dec 2023 20:45:24 +0000 Subject: [PATCH 12/17] Use new '-DREM=#' prefix to preserve comments in pre-processed .toml Having to find source files to read comments is not convenient. This depends on https://github.com/zephyrproject-rtos/zephyr/pull/67019 which was merged a while ago. Signed-off-by: Marc Herbert --- src/audio/aria/aria.toml | 6 +++--- src/audio/codec/dts/dts.toml | 6 +++--- src/audio/copier/copier.toml | 4 ++-- src/audio/crossover/crossover.toml | 10 +++++----- src/audio/dcblock/dcblock.toml | 6 +++--- src/audio/drc/drc.toml | 6 +++--- src/audio/eq_fir/eq_fir.toml | 6 +++--- src/audio/eq_iir/eq_iir.toml | 6 +++--- src/audio/google/google_rtc_audio_processing.toml | 4 ++-- src/audio/igo_nr/igo_nr.toml | 6 +++--- src/audio/kpb.toml | 4 ++-- src/audio/mixin_mixout/mixin_mixout.toml | 8 ++++---- src/audio/module_adapter/module/cadence.toml | 6 +++--- src/audio/multiband_drc/multiband_drc.toml | 6 +++--- src/audio/mux/mux.toml | 4 ++-- src/audio/rtnr/rtnr.toml | 6 +++--- src/audio/selector/selector.toml | 4 ++-- src/audio/src/src.toml | 6 +++--- src/audio/src/src_lite.toml | 8 ++++---- src/audio/tdfb/tdfb.toml | 6 +++--- src/audio/up_down_mixer/up_down_mixer.toml | 4 ++-- src/audio/volume/gain.toml | 4 ++-- src/audio/volume/peakvol.toml | 4 ++-- src/probe/probe.toml | 2 +- src/samples/audio/detect_test.toml | 4 ++-- src/samples/audio/smart_amp_test.toml | 6 +++--- 26 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/audio/aria/aria.toml b/src/audio/aria/aria.toml index 5dd20c6cfc1d..ac28785583db 100644 --- a/src/audio/aria/aria.toml +++ b/src/audio/aria/aria.toml @@ -1,4 +1,4 @@ - // Aria module config + REM # Aria module config [[module.entry]] name = "ARIA" uuid = "99F7166D-372C-43EF-81F6-22007AA15F03" @@ -11,11 +11,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 260, 1063000, 16, 21, 0, 0, 0, 1, 0, 0, 0, 260, 1873500, 192, 256, 0, 0, 0, 2, 0, 0, 0, 260, 2680000, 32, 42, 0, 0, 0, diff --git a/src/audio/codec/dts/dts.toml b/src/audio/codec/dts/dts.toml index 73a9418938e5..17f029df67d0 100644 --- a/src/audio/codec/dts/dts.toml +++ b/src/audio/codec/dts/dts.toml @@ -1,4 +1,4 @@ - // dts codec module config + REM # dts codec module config [[module.entry]] name = "DTS" uuid = "D95FC34F-370F-4AC7-BC86-BFDC5BE241E6" @@ -10,11 +10,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 296, 5000000, 384, 384, 0, 5000, 0] index = __COUNTER__ diff --git a/src/audio/copier/copier.toml b/src/audio/copier/copier.toml index aa53ea2bddd3..4a6abc9712c4 100644 --- a/src/audio/copier/copier.toml +++ b/src/audio/copier/copier.toml @@ -9,14 +9,14 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 280, 4918000, 768, 768, 0, 4918, 0, 2, 0, 0, 0, 280, 6526000, 768, 768, 0, 6526, 0, 3, 0, 0, 0, 280, 6388000, 384, 384, 0, 6388, 0, diff --git a/src/audio/crossover/crossover.toml b/src/audio/crossover/crossover.toml index 2c9913a8acb6..dd3804f93031 100644 --- a/src/audio/crossover/crossover.toml +++ b/src/audio/crossover/crossover.toml @@ -1,6 +1,6 @@ - // Crossover module config - // Note: Crossover has init_config set to 1 to let kernel know that the base_cfg_ext needs to - // be appended to the IPC payload. The Extension is needed to know the output pin indices. + REM # Crossover module config + REM # Note: Crossover has init_config set to 1 to let kernel know that the base_cfg_ext needs to + REM # be appended to the IPC payload. The Extension is needed to know the output pin indices. [[module.entry]] name = "XOVER" uuid = "948C9AD1-806A-4131-AD6C-B2BDA9E35A9F" @@ -12,9 +12,9 @@ init_config = "1" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/dcblock/dcblock.toml b/src/audio/dcblock/dcblock.toml index ecd67eda710b..69796d3a67e3 100644 --- a/src/audio/dcblock/dcblock.toml +++ b/src/audio/dcblock/dcblock.toml @@ -1,4 +1,4 @@ - // DCblock module config + REM # DCblock module config [[module.entry]] name = "DCBLOCK" uuid = "B809EFAF-5681-42B1-9ED6-04BB012DD384" @@ -9,9 +9,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/drc/drc.toml b/src/audio/drc/drc.toml index a67c5d038466..29ee8d856cbb 100644 --- a/src/audio/drc/drc.toml +++ b/src/audio/drc/drc.toml @@ -1,4 +1,4 @@ - // DRC module config + REM # DRC module config [[module.entry]] name = "DRC" uuid = "B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE" @@ -9,9 +9,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/eq_fir/eq_fir.toml b/src/audio/eq_fir/eq_fir.toml index faf0ce1837e7..2e647fe97ab8 100644 --- a/src/audio/eq_fir/eq_fir.toml +++ b/src/audio/eq_fir/eq_fir.toml @@ -1,4 +1,4 @@ - // eq fir module config + REM # eq fir module config [[module.entry]] name = "EQFIR" uuid = "43A90CE7-f3A5-41Df-AC06-BA98651AE6A3" @@ -10,11 +10,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/eq_iir/eq_iir.toml b/src/audio/eq_iir/eq_iir.toml index cda18f191260..e2a81bf8d495 100644 --- a/src/audio/eq_iir/eq_iir.toml +++ b/src/audio/eq_iir/eq_iir.toml @@ -1,4 +1,4 @@ - // eq iir module config + REM # eq iir module config [[module.entry]] name = "EQIIR" uuid = "5150C0E6-27F9-4EC8-8351-C705B642D12F" @@ -10,11 +10,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 1000, 0, 0, 0, 0, 0, 4096, 20663000, 768, 768, 0, 20663, 0, 0, 0, 0, 0, 4096, 11357000, 384, 384, 0, 11357, 0] diff --git a/src/audio/google/google_rtc_audio_processing.toml b/src/audio/google/google_rtc_audio_processing.toml index 9ceec7da853f..7561dfe7fe26 100644 --- a/src/audio/google/google_rtc_audio_processing.toml +++ b/src/audio/google/google_rtc_audio_processing.toml @@ -1,7 +1,7 @@ [[module.entry]] name = "RTC_AEC" uuid = "B780A0A6-269F-466F-B477-23DFA05AF758" - // bit #i = 1 means core #i is allowed. + REM # bit #i = 1 means core #i is allowed. affinity_mask = "0x7" instance_count = "1" domain_types = "1" @@ -11,7 +11,7 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0x8, 0x2, 0x2, 0x1, 0, 0, 0x8, 0x2, 0x2, 0x4, 1, 0, 0x8, 0x2, 0x2, 0x1] diff --git a/src/audio/igo_nr/igo_nr.toml b/src/audio/igo_nr/igo_nr.toml index 926b3cef063f..b0be41b21878 100644 --- a/src/audio/igo_nr/igo_nr.toml +++ b/src/audio/igo_nr/igo_nr.toml @@ -1,5 +1,5 @@ - // IGO_NR module config + REM # IGO_NR module config [[module.entry]] name = "IGO_NR" uuid = "696AE2BC-2877-11EB-ADC1-0242AC120002" @@ -10,9 +10,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/kpb.toml b/src/audio/kpb.toml index 85d0278580fe..1aa10e007b76 100644 --- a/src/audio/kpb.toml +++ b/src/audio/kpb.toml @@ -9,11 +9,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 14400, 1114000, 16, 16, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/mixin_mixout/mixin_mixout.toml b/src/audio/mixin_mixout/mixin_mixout.toml index 7eb84c27dd59..9aedd0c7dc9d 100644 --- a/src/audio/mixin_mixout/mixin_mixout.toml +++ b/src/audio/mixin_mixout/mixin_mixout.toml @@ -9,13 +9,13 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 296, 4996000, 384, 384, 0, 4996, 0, 2, 0, 0, 0, 296, 2652000, 384, 384, 0, 2652, 0, 3, 0, 0, 0, 296, 2928000, 512, 512, 0, 2928, 0, @@ -35,7 +35,7 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 0, 0, 0xfeef, 0xc, 0x8, 0x45ff, @@ -46,7 +46,7 @@ 0, 0, 0xfeef, 0xc, 0x8, 0x45ff, 1, 0, 0xfeef, 0xc, 0x8, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 520, 2280000, 384, 384, 0, 2280, 0, 2, 0, 0, 0, 520, 1988000, 384, 384, 0, 1988, 0, 3, 0, 0, 0, 520, 7631000, 512, 512, 0, 7631, 0, diff --git a/src/audio/module_adapter/module/cadence.toml b/src/audio/module_adapter/module/cadence.toml index 6655af709408..078e8ec6bba8 100644 --- a/src/audio/module_adapter/module/cadence.toml +++ b/src/audio/module_adapter/module/cadence.toml @@ -1,4 +1,4 @@ - // Cadence module config + REM # Cadence module config [[module.entry]] name = "CADENCE" uuid = "D8218443-5FF3-4A4C-B388-6CFE07B956AA" @@ -11,12 +11,12 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/multiband_drc/multiband_drc.toml b/src/audio/multiband_drc/multiband_drc.toml index 2cc60e825407..a60bedd91287 100644 --- a/src/audio/multiband_drc/multiband_drc.toml +++ b/src/audio/multiband_drc/multiband_drc.toml @@ -1,4 +1,4 @@ - // Multiband-DRC module config + REM # Multiband-DRC module config [[module.entry]] name = "MB_DRC" uuid = "0D9F2256-8E4F-47B3-8448-239A334F1191" @@ -9,9 +9,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/mux/mux.toml b/src/audio/mux/mux.toml index 21478e4b04a3..e9fa8b7dbd36 100644 --- a/src/audio/mux/mux.toml +++ b/src/audio/mux/mux.toml @@ -9,12 +9,12 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 280, 460700, 16, 16, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/rtnr/rtnr.toml b/src/audio/rtnr/rtnr.toml index f071d5845bdf..4a03ca2e52c5 100644 --- a/src/audio/rtnr/rtnr.toml +++ b/src/audio/rtnr/rtnr.toml @@ -1,4 +1,4 @@ - // RTNR module config + REM # RTNR module config [[module.entry]] name = "RTNR" uuid = "5C7CA334-E15D-11EB-BA80-0242AC130004" @@ -9,9 +9,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/selector/selector.toml b/src/audio/selector/selector.toml index 772db941f157..5d42e9b04b98 100644 --- a/src/audio/selector/selector.toml +++ b/src/audio/selector/selector.toml @@ -10,10 +10,10 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xe, 0xa, 0x45ff, 1, 0, 0xfeef, 0xe, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 960, 488500, 16, 16, 0, 0, 0, 1, 0, 0, 0, 960, 964500, 16, 16, 0, 0, 0, 2, 0, 0, 0, 960, 2003000, 16, 16, 0, 0, 0] diff --git a/src/audio/src/src.toml b/src/audio/src/src.toml index 1d5cdab52533..52ca9c8a262c 100644 --- a/src/audio/src/src.toml +++ b/src/audio/src/src.toml @@ -2,18 +2,18 @@ name = "SRC" uuid = "E61BB28D-149A-4C1F-B709-46823EF5F5AE" affinity_mask = "0x1" - //instance_count = "10" + REM #instance_count = "10" domain_types = "0" load_type = "0" module_type = "7" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xffff, 0xc, 0x8, 0x05ff, 1, 0, 0xf6c9, 0xc, 0x8, 0x05ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 12832, 15976000, 128, 512, 0, 15976, 0, 2, 0, 0, 0, 12832, 15340000, 64, 256, 0, 15340, 0, 3, 0, 0, 0, 12832, 21880000, 96, 512, 0, 21880, 0, diff --git a/src/audio/src/src_lite.toml b/src/audio/src/src_lite.toml index 68d9f9e27ea9..8479b29263ac 100644 --- a/src/audio/src/src_lite.toml +++ b/src/audio/src/src_lite.toml @@ -1,20 +1,20 @@ - // SRC lite module config + REM # SRC lite module config [[module.entry]] name = "SRC_LITE" uuid = "33441051-44CD-466A-83A3-178478708AEA" affinity_mask = "0x1" - //instance_count = "10" + REM #instance_count = "10" domain_types = "0" load_type = "0" module_type = "0x1F" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xffff, 0xc, 0x8, 0x05ff, 1, 0, 0xf6c9, 0xc, 0x8, 0x05ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 12832, 1365500, 0, 0, 0, 1365, 0, 1, 0, 0, 0, 12832, 2302300, 0, 0, 0, 2302, 0, 2, 0, 0, 0, 12832, 3218200, 0, 0, 0, 3218, 0, diff --git a/src/audio/tdfb/tdfb.toml b/src/audio/tdfb/tdfb.toml index cf6c491e938e..277779e53936 100644 --- a/src/audio/tdfb/tdfb.toml +++ b/src/audio/tdfb/tdfb.toml @@ -1,4 +1,4 @@ - // TDFB module config + REM # TDFB module config [[module.entry]] name = "TDFB" uuid = "DD511749-D9FA-455C-B3A7-13585693F1AF" @@ -9,9 +9,9 @@ module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/up_down_mixer/up_down_mixer.toml b/src/audio/up_down_mixer/up_down_mixer.toml index 2257664212f2..fc18abcc7c77 100644 --- a/src/audio/up_down_mixer/up_down_mixer.toml +++ b/src/audio/up_down_mixer/up_down_mixer.toml @@ -9,11 +9,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xffff, 0xc, 0x8, 0x05ff, 1, 0, 0xffff, 0xc, 0x8, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 216, 5044000, 384, 192, 0, 5044, 0, 2, 0, 0, 0, 216, 2660000, 384, 384, 0, 2660, 0, 3, 0, 0, 0, 216, 3164000, 576, 384, 0, 3164, 0, diff --git a/src/audio/volume/gain.toml b/src/audio/volume/gain.toml index f290db523314..71e69c9b1bb2 100644 --- a/src/audio/volume/gain.toml +++ b/src/audio/volume/gain.toml @@ -9,11 +9,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 416, 12100000, 1536, 1536, 0, 12100, 0, 2, 0, 0, 0, 416, 10183000, 384, 384, 0, 10183, 0, 3, 0, 0, 0, 416, 8192000, 512, 512, 0, 8192, 0, diff --git a/src/audio/volume/peakvol.toml b/src/audio/volume/peakvol.toml index c71b92a2af46..04240ece10ef 100644 --- a/src/audio/volume/peakvol.toml +++ b/src/audio/volume/peakvol.toml @@ -9,11 +9,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [1, 0, 0, 0, 480, 11667000, 384, 384, 0, 11667, 0, 2, 0, 0, 0, 480, 5943000, 192, 192, 0, 5943, 0, 3, 0, 0, 0, 480, 12567000, 720, 720, 0, 12567, 0, diff --git a/src/probe/probe.toml b/src/probe/probe.toml index 00d5905c255a..b3ae8f8d4c9e 100644 --- a/src/probe/probe.toml +++ b/src/probe/probe.toml @@ -9,7 +9,7 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 100000, 48, 48, 0, 1000, 0] index = __COUNTER__ diff --git a/src/samples/audio/detect_test.toml b/src/samples/audio/detect_test.toml index 6c139522f820..8173ef5f10c1 100644 --- a/src/samples/audio/detect_test.toml +++ b/src/samples/audio/detect_test.toml @@ -9,11 +9,11 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 480, 1114000, 64, 64, 0, 0, 0] index = __COUNTER__ diff --git a/src/samples/audio/smart_amp_test.toml b/src/samples/audio/smart_amp_test.toml index 13b21ef41343..3e02feac280d 100644 --- a/src/samples/audio/smart_amp_test.toml +++ b/src/samples/audio/smart_amp_test.toml @@ -1,4 +1,4 @@ - // smart amp test module config + REM # smart amp test module config [[module.entry]] name = "SMATEST" uuid = "167A961E-8AE4-11EA-89F1-000C29CE1635" @@ -11,12 +11,12 @@ auto_start = "0" sched_caps = [1, 0x00008000] - // pin = [dir, type, sample rate, size, container, channel-cfg] + REM # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - // mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 296, 5000000, 384, 384, 0, 5000, 0] index = __COUNTER__ From 51c686f9532aecb1d79031f5d835d018dd856916 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 14 Mar 2024 19:21:54 +0200 Subject: [PATCH 13/17] Audio: Volume: Fix ongoing gain ramp stop and wrong final gain In IPC4 the individual channel gains are passed in separate messages. One channel may have started to ramp to a new gain while a new channel gain arrives for other channel. If the gain is same as the previous control value, the ongoing ramp is stopped and the gain remains at a transition value. The incorrect code is not fixed but instead the volume_set_volume() function is simplified. When a volume control is received, it is assumed that pass-through mode is disabled and ramp is prepared. If the control is received but gains are not changed, the ramp mode is finished and pass-through is restored in ramp function. The volume_set_switch() function is updated similarly to ensure similar operation. Signed-off-by: Seppo Ingalsuo --- src/audio/volume/volume_ipc4.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/audio/volume/volume_ipc4.c b/src/audio/volume/volume_ipc4.c index d12eed346d77..ddac8dac0d07 100644 --- a/src/audio/volume/volume_ipc4.c +++ b/src/audio/volume/volume_ipc4.c @@ -79,6 +79,8 @@ static uint32_t convert_volume_ipc3_to_ipc4(uint32_t volume) static void init_ramp(struct vol_data *cd, uint32_t curve_duration, uint32_t target_volume) { + cd->ramp_finished = false; + /* In IPC4 driver sends curve_duration in hundred of ns - it should be * converted into ms value required by firmware */ @@ -213,8 +215,6 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data, } init_ramp(cd, cdata.curve_duration, cdata.target_volume); - cd->ramp_finished = true; - channels_count = mod->priv.cfg.base_cfg.audio_fmt.channels_count; if (channels_count > SOF_IPC_MAX_CHANNELS) { comp_err(dev, "Invalid channels count %u", channels_count); @@ -232,8 +232,6 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data, volume_set_chan(mod, i, cd->tvolume[i], true); } - if (cd->volume[i] != cd->tvolume[i]) - cd->ramp_finished = false; } } else { if (cd->muted[cdata.channel_id]) { @@ -247,25 +245,12 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data, volume_set_chan(mod, cdata.channel_id, cd->tvolume[cdata.channel_id], true); } - if (cd->volume[cdata.channel_id] != cd->tvolume[cdata.channel_id]) - cd->ramp_finished = false; - } - - cd->is_passthrough = cd->ramp_finished; - - for (i = 0; i < channels_count; i++) { - if (cd->volume[i] != VOL_ZERO_DB) { - cd->is_passthrough = false; - break; - } } + cd->is_passthrough = false; volume_set_ramp_channel_counter(cd, channels_count); - cd->scale_vol = vol_get_processing_function(dev, cd); - volume_prepare_ramp(dev, cd); - return 0; } @@ -322,8 +307,6 @@ static int volume_set_switch(struct processing_module *mod, const uint8_t *data, ctl = (struct sof_ipc4_control_msg_payload *)data; - cd->ramp_finished = true; - channels_count = mod->priv.cfg.base_cfg.audio_fmt.channels_count; if (channels_count > SOF_IPC_MAX_CHANNELS) { comp_err(dev, "Invalid channels count %u", channels_count); @@ -344,11 +327,13 @@ static int volume_set_switch(struct processing_module *mod, const uint8_t *data, volume_set_chan_unmute(mod, i); else volume_set_chan_mute(mod, i); - - if (cd->volume[i] != cd->tvolume[i]) - cd->ramp_finished = false; } + cd->ramp_finished = false; + cd->is_passthrough = false; + volume_set_ramp_channel_counter(cd, channels_count); + cd->scale_vol = vol_get_processing_function(dev, cd); + volume_prepare_ramp(dev, cd); return 0; } From eb463a5f2aad5e10e37453cd53678f720f60c5bb Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 15 Mar 2024 14:04:30 +0200 Subject: [PATCH 14/17] Audio: Volume: Add linear ramp coefficient function with fixes The linear slope coefficient calculation is moved to a separate function. Two functional changes are done. - The ramp_coef for channel is set to zero if there is no transition for the channel. The ensure of non-zero coefficient is only needed if there is a transition that is so slow that the slope coefficient would round to zero. If this function is called for equal volume and tvolume for channel, the ramp_coef remains zero, and not smallest non-zero value. - The handling of ramp disable with zero initial_ramp is changed to similar as for windows fade. The set of coefficient to volume delta (a large value for large volume jump) is not correct even if it appeared to work. It is a remain from old code where ramp was not a function of time but a constant step added. Signed-off-by: Seppo Ingalsuo --- src/audio/volume/volume.c | 108 +++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 49 deletions(-) diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index 2bb5c2a5842d..bf4833173002 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -216,6 +216,9 @@ static const struct comp_zc_func_map zc_func_map[] = { */ static inline int32_t volume_linear_ramp(struct vol_data *cd, int32_t ramp_time, int channel) { + if (!cd->initial_ramp) + return cd->tvolume[channel]; + return cd->rvolume[channel] + ramp_time * cd->ramp_coef[channel]; } #endif @@ -415,6 +418,59 @@ static int volume_free(struct processing_module *mod) return 0; } +static void set_linear_ramp_coef(struct vol_data *cd, int chan, bool constant_rate_ramp) +{ + int32_t delta; + int32_t delta_abs; + int32_t coef; + + if (!cd->initial_ramp) + return; + + /* Get volume transition delta and absolute value */ + delta = cd->tvolume[chan] - cd->volume[chan]; + if (!delta) { + cd->ramp_coef[chan] = 0; + return; + } + + delta_abs = ABS(delta); + + /* The ramp length (initial_ramp [ms]) describes time of mute + * to vol_max unmuting. Normally the volume ramp has a + * constant linear slope defined this way and variable + * completion time. However in streaming start it is feasible + * to apply the entire topology defined ramp time to unmute to + * any used volume. In this case the ramp rate is not constant. + * Note also the legacy mode without known vol_ramp_range where + * the volume transition always uses the topology defined time. + */ + if (constant_rate_ramp && cd->vol_ramp_range > 0) + coef = cd->vol_ramp_range; + else + coef = delta_abs; + + /* Divide and round to nearest. Note that there will + * be some accumulated error in ramp time the longer + * the ramp and the smaller the transition is. + */ + coef = (2 * coef / cd->initial_ramp + 1) >> 1; + + /* Scale coefficient by 1/8, round */ + coef = ((coef >> 2) + 1) >> 1; + + /* Ensure ramp coefficient is at least min. non-zero + * fractional value. + */ + coef = MAX(coef, 1); + + /* Invert sign for volume down ramp step */ + if (delta < 0) + coef = -coef; + + cd->ramp_coef[chan] = coef; +} + /** * \brief Sets channel target volume. * \param[in,out] mod Volume processing module handle @@ -429,9 +485,6 @@ int volume_set_chan(struct processing_module *mod, int chan, { struct vol_data *cd = module_get_private_data(mod); int32_t v = vol; - int32_t delta; - int32_t delta_abs; - int32_t coef; /* Limit received volume gain to MIN..MAX range before applying it. * MAX is needed for now for the generic C gain arithmetic to prevent @@ -456,52 +509,9 @@ int volume_set_chan(struct processing_module *mod, int chan, cd->rvolume[chan] = cd->volume[chan]; cd->vol_ramp_elapsed_frames = 0; - /* Check ramp type */ - if (cd->ramp_type == SOF_VOLUME_LINEAR || - cd->ramp_type == SOF_VOLUME_LINEAR_ZC) { - /* Get volume transition delta and absolute value */ - delta = cd->tvolume[chan] - cd->volume[chan]; - delta_abs = ABS(delta); - - /* The ramp length (initial_ramp [ms]) describes time of mute - * to vol_max unmuting. Normally the volume ramp has a - * constant linear slope defined this way and variable - * completion time. However in streaming start it is feasible - * to apply the entire topology defined ramp time to unmute to - * any used volume. In this case the ramp rate is not constant. - * Note also the legacy mode without known vol_ramp_range where - * the volume transition always uses the topology defined time. - */ - if (cd->initial_ramp > 0) { - if (constant_rate_ramp && cd->vol_ramp_range > 0) - coef = cd->vol_ramp_range; - else - coef = delta_abs; - - /* Divide and round to nearest. Note that there will - * be some accumulated error in ramp time the longer - * the ramp and the smaller the transition is. - */ - coef = (2 * coef / cd->initial_ramp + 1) >> 1; - } else { - coef = delta_abs; - } - - /* Scale coefficient by 1/8, round */ - coef = ((coef >> 2) + 1) >> 1; - - /* Ensure ramp coefficient is at least min. non-zero - * fractional value. - */ - coef = MAX(coef, 1); - - /* Invert sign for volume down ramp step */ - if (delta < 0) - coef = -coef; - - cd->ramp_coef[chan] = coef; - comp_dbg(mod->dev, "cd->ramp_coef[%d] = %d", chan, cd->ramp_coef[chan]); - } + /* Ramp type specific initialize */ + if (cd->ramp_type == SOF_VOLUME_LINEAR || cd->ramp_type == SOF_VOLUME_LINEAR_ZC) + set_linear_ramp_coef(cd, chan, constant_rate_ramp); return 0; } From e23a663d13ef059246b77f471b89eff39038fbbc Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 15 Mar 2024 16:38:11 +0200 Subject: [PATCH 15/17] Audio: Volume: Fix condition for identical ramp The "is_same_volume=true" was returned if target volumes for all channels are the same. The check omitted the fact that start volumes for ramp can be different, e.g. one channel is attenuated while others are 0 dB. This change fixes the random ignore of volume ramp and smooth transition when a volume control is changed. Signed-off-by: Seppo Ingalsuo --- src/audio/volume/volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index bf4833173002..7c888212c0f3 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -252,7 +252,7 @@ void volume_set_ramp_channel_counter(struct vol_data *cd, uint32_t channels_coun bool is_same_volume = true; for (i = 1; i < channels_count; i++) { - if (cd->tvolume[0] != cd->tvolume[i]) { + if (cd->tvolume[0] != cd->tvolume[i] || cd->volume[0] != cd->volume[i]) { is_same_volume = false; break; } From bc506f12c80ba1e2e20d1855d7a7fdd92bf5d01b Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 20 Mar 2024 17:20:03 +0200 Subject: [PATCH 16/17] Audio: Volume: Jump volume directly to target when no ramp This ensures that volume for a channel changes immediately after receiving the control if ramp duration is zero or if type is no fade. Signed-off-by: Seppo Ingalsuo --- src/audio/volume/volume.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index 7c888212c0f3..499fd67ff767 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -513,6 +513,9 @@ int volume_set_chan(struct processing_module *mod, int chan, if (cd->ramp_type == SOF_VOLUME_LINEAR || cd->ramp_type == SOF_VOLUME_LINEAR_ZC) set_linear_ramp_coef(cd, chan, constant_rate_ramp); + if (!cd->initial_ramp || cd->ramp_type == SOF_VOLUME_WINDOWS_NO_FADE) + cd->volume[chan] = v; + return 0; } From b6aa921e02f6281673eee580a49151b16fe8338a Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 20 Mar 2024 17:22:10 +0200 Subject: [PATCH 17/17] Audio: Volume: No update of process function for every ramp value The volume process function for pass-through can be changed when all ramps are completed. This change that avoids processing function lookup in worst case every 128 us is measured to save in TGL platform about 1 MCPS from CPU_PEAK(MAX). Signed-off-by: Seppo Ingalsuo --- src/audio/volume/volume.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index 499fd67ff767..a16819a985b6 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -347,7 +347,8 @@ static inline void volume_ramp(struct processing_module *mod) } } - set_volume_process(cd, dev, true); + if (cd->is_passthrough) + set_volume_process(cd, dev, true); } /**