Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d5c409e authored by Ramjee Singh's avatar Ramjee Singh Committed by Steve Kondik
Browse files

audio: Set OutputFormat of AudioMixer to PCM16

- MixerThread sets OutputFormat to PCM_FLOAT by default
  We are having issue with SRS Effects due to this format
- Fix is to select always PCM16 format as Audio HAL supports
  only PCM16

Change-Id: I26d23836180fe95b4c32b071593827b6fe4d674e
parent 756e75e7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3111,11 +3111,15 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud
    }
    if (initFastMixer) {
        audio_format_t fastMixerFormat;
#ifndef QCOM_DIRECTTRACK
        if (mMixerBufferEnabled && mEffectBufferEnabled) {
            fastMixerFormat = AUDIO_FORMAT_PCM_FLOAT;
        } else {
#endif
            fastMixerFormat = AUDIO_FORMAT_PCM_16_BIT;
#ifndef QCOM_DIRECTTRACK
        }
#endif
        if (mFormat != fastMixerFormat) {
            // change our Sink format to accept our intermediate precision
            mFormat = fastMixerFormat;