From 5c5428879a2c8b35906e5e0d11b8dcbc3b4fd956 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 15 Sep 2023 14:03:33 +0300 Subject: [PATCH] Tools: Topology2: Change in capture gain curve_duration to 50 ms This change increases the ramp duration from 20 ms to 50 ms. It lowers the peak load of peak volume component due to longer same gain value blocks. The internal update rate for gain becomes 250 us instead of 125 us. The longer fade-in ramp also conceals better possible analog capture start transients. This changes for 4ch capture for gain.11.1 in sof-hda-generic-4ch.tplg from CPU_PEAK(MAX) = 21.95 PEAK(MAX)/AVG(AVG) = 7.51 to CPU_PEAK(MAX) = 9.07 PEAK(MAX)/AVG(AVG) = 3.12 Signed-off-by: Seppo Ingalsuo --- tools/topology/topology2/cavs-nocodec-multicore.conf | 3 +++ tools/topology/topology2/cavs-nocodec.conf | 6 ++++++ tools/topology/topology2/platform/intel/dmic-generic.conf | 1 + 3 files changed, 10 insertions(+) diff --git a/tools/topology/topology2/cavs-nocodec-multicore.conf b/tools/topology/topology2/cavs-nocodec-multicore.conf index 9c7e9c833b59..d9fae0e3ec4b 100644 --- a/tools/topology/topology2/cavs-nocodec-multicore.conf +++ b/tools/topology/topology2/cavs-nocodec-multicore.conf @@ -335,6 +335,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -396,6 +397,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -454,6 +456,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index bac1fe2118c7..6cc7f0d3753e 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -275,6 +275,7 @@ IncludeByKey.PASSTHROUGH { pcm_id $SSP0_PCM_ID } Object.Widget.gain.1 { + curve_duration 500000 Object.Control.mixer.1 { name 'Post Demux $SSP0_PCM_NAME Capture Volume' } @@ -289,6 +290,7 @@ IncludeByKey.PASSTHROUGH { pcm_id $SSP0_CAPTURE_PCM_ID } Object.Widget.gain.1 { + curve_duration 500000 Object.Control.mixer.1 { name 'Post Demux $SSP0_CAPTURE_PCM Volume' } @@ -329,6 +331,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -394,6 +397,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 Object.Control.mixer.1 { name 'Pre Demux $SSP0_PCM_NAME Capture Volume' } @@ -699,6 +703,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -755,6 +760,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 006505ca011f..9548ab885c72 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -102,6 +102,7 @@ IncludeByKey.PASSTHROUGH { } } Object.Widget.gain.1 { + curve_duration 500000 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 {