~aleteoryx/muditaos

24f27ac30d075ad3b5ae3fbc5b938bf359bf8e92 — Mateusz Piesta 4 years ago bca0f9a
[BH-1331] Volume control fix

Fixed initial volume value.
1 files changed, 4 insertions(+), 1 deletions(-)

M module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp
M module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp => module-audio/board/rt1051/bellpx/BellPxAudioCodec.cpp +4 -1
@@ 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);