diff options
author | aarti jadhav-gaikwad <agaikwad@nvidia.com> | 2014-06-18 15:25:26 +0530 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-07-11 09:53:16 -0700 |
commit | 2829edccd7d2bb8244246f316face82b650b8949 (patch) | |
tree | 485dbd465bc203b2227c87fe582abeffd1ece08c /services/audioflinger | |
parent | 7bad72237b49ac47e77ffe2a89fd26f3d171324c (diff) | |
download | frameworks_av-2829edccd7d2bb8244246f316face82b650b8949.zip frameworks_av-2829edccd7d2bb8244246f316face82b650b8949.tar.gz frameworks_av-2829edccd7d2bb8244246f316face82b650b8949.tar.bz2 |
stagefright: Pass audio aac sub formats in offloadinfo
Pass audio aac sub formats in offloadinfo according to
aac profile. Audio HAL can take decision about offload
using DSP capabilities
Change-Id: If269a3654b5d2b09c183212b0646ef03e06f2d8f
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 2124f85..5fed0c1 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -106,13 +106,19 @@ static const nsecs_t kMinGlobalEffectEnabletimeNs = seconds(7200); // ---------------------------------------------------------------------------- const char *formatToString(audio_format_t format) { - switch(format) { - case AUDIO_FORMAT_PCM_SUB_8_BIT: return "pcm8"; - case AUDIO_FORMAT_PCM_SUB_16_BIT: return "pcm16"; - case AUDIO_FORMAT_PCM_SUB_32_BIT: return "pcm32"; - case AUDIO_FORMAT_PCM_SUB_8_24_BIT: return "pcm8.24"; - case AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED: return "pcm24"; - case AUDIO_FORMAT_PCM_SUB_FLOAT: return "pcmfloat"; + switch (format & AUDIO_FORMAT_MAIN_MASK) { + case AUDIO_FORMAT_PCM: + switch (format) { + case AUDIO_FORMAT_PCM_16_BIT: return "pcm16"; + case AUDIO_FORMAT_PCM_8_BIT: return "pcm8"; + case AUDIO_FORMAT_PCM_32_BIT: return "pcm32"; + case AUDIO_FORMAT_PCM_8_24_BIT: return "pcm8.24"; + case AUDIO_FORMAT_PCM_FLOAT: return "pcmfloat"; + case AUDIO_FORMAT_PCM_24_BIT_PACKED: return "pcm24"; + default: + break; + } + break; case AUDIO_FORMAT_MP3: return "mp3"; case AUDIO_FORMAT_AMR_NB: return "amr-nb"; case AUDIO_FORMAT_AMR_WB: return "amr-wb"; @@ -120,6 +126,9 @@ const char *formatToString(audio_format_t format) { case AUDIO_FORMAT_HE_AAC_V1: return "he-aac-v1"; case AUDIO_FORMAT_HE_AAC_V2: return "he-aac-v2"; case AUDIO_FORMAT_VORBIS: return "vorbis"; + case AUDIO_FORMAT_OPUS: return "opus"; + case AUDIO_FORMAT_AC3: return "ac-3"; + case AUDIO_FORMAT_E_AC3: return "e-ac-3"; default: break; } |