From 24f27ac30d075ad3b5ae3fbc5b938bf359bf8e92 Mon Sep 17 00:00:00 2001 From: Mateusz Piesta Date: Tue, 21 Dec 2021 08:52:24 +0100 Subject: [PATCH] [BH-1331] Volume control fix Fixed initial volume value. --- module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp b/module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp index f4ed49d5745e0ed9ed8cbe9f4a91ea529761629c..5b9ed2966f9df0f5bb66eb63db224a63f32ea4de 100644 --- a/module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp +++ b/module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp @@ -71,11 +71,14 @@ namespace audio } codecParams.sampleRate = sampleRate; - /// Set the output volume to max possible value. Volume control is implemented + /// Set the codec output volume to max possible value. Volume control is implemented /// using software scaling instead of hardware gain control. codecParams.outVolume = maxVolume; codecParams.inGain = currentFormat.inputGain; + /// Set the initial volume used by the software volume control + setOutputVolume(currentFormat.outputVolume); + txEnabled = true; initiateTxTransfer(); codec.Start(codecParams);