From 07f1086ff02439dc20f3bff6607be920630185e0 Mon Sep 17 00:00:00 2001 From: Ramjee Singh Date: Mon, 2 Feb 2015 20:09:35 +0530 Subject: 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 --- services/audioflinger/Threads.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'services/audioflinger') diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index cdf8b1e..d70e457 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -3319,11 +3319,15 @@ AudioFlinger::MixerThread::MixerThread(const sp& audioFlinger, Aud } if (initFastMixer) { audio_format_t fastMixerFormat; +#ifdef LEGACY_ALSA_AUDIO + fastMixerFormat = AUDIO_FORMAT_PCM_16_BIT; +#else if (mMixerBufferEnabled && mEffectBufferEnabled) { fastMixerFormat = AUDIO_FORMAT_PCM_FLOAT; } else { fastMixerFormat = AUDIO_FORMAT_PCM_16_BIT; } +#endif if (mFormat != fastMixerFormat) { // change our Sink format to accept our intermediate precision mFormat = fastMixerFormat; -- cgit v1.1