From ba8af5891fb22aa4cc1e1af11c69ade87c72b223 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 20 Mar 2024 17:22:10 +0200 Subject: [PATCH] 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); } /**