diff options
author | Andy Hung <hunga@google.com> | 2015-06-22 15:41:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-22 15:41:42 +0000 |
commit | 42193b96b22782fce14c55314dfc269fb4a4ed22 (patch) | |
tree | 181361af67b8ba467038d96befcad57d207919dd /services | |
parent | 4d622375dc6c9d6b6b817cce598692ae491b2496 (diff) | |
parent | 60c545dfc4160a6d46febb9aa6684f6d300ec74d (diff) | |
download | frameworks_av-42193b96b22782fce14c55314dfc269fb4a4ed22.zip frameworks_av-42193b96b22782fce14c55314dfc269fb4a4ed22.tar.gz frameworks_av-42193b96b22782fce14c55314dfc269fb4a4ed22.tar.bz2 |
Merge "Fix FastMixer high bit depth Hal support" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/FastMixer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp index f1cf0aa..45c68b5 100644 --- a/services/audioflinger/FastMixer.cpp +++ b/services/audioflinger/FastMixer.cpp @@ -177,6 +177,10 @@ void FastMixer::onStateChange() free(mSinkBuffer); mSinkBuffer = NULL; if (frameCount > 0 && mSampleRate > 0) { + // The mixer produces either 16 bit PCM or float output, select + // float output if the HAL supports higher than 16 bit precision. + mMixerBufferFormat = mFormat.mFormat == AUDIO_FORMAT_PCM_16_BIT ? + AUDIO_FORMAT_PCM_16_BIT : AUDIO_FORMAT_PCM_FLOAT; // FIXME new may block for unbounded time at internal mutex of the heap // implementation; it would be better to have normal mixer allocate for us // to avoid blocking here and to prevent possible priority inversion |