diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 23 | ||||
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 10 |
2 files changed, 26 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; } diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 73c9313..e2b34ee 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -122,6 +122,16 @@ const StringToEnum sFormatNameToEnumTable[] = { STRING_TO_ENUM(AUDIO_FORMAT_PCM_24_BIT_PACKED), STRING_TO_ENUM(AUDIO_FORMAT_MP3), STRING_TO_ENUM(AUDIO_FORMAT_AAC), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_MAIN), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_LC), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_SSR), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_LTP), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_HE_V1), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_SCALABLE), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_ERLC), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_LD), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_HE_V2), + STRING_TO_ENUM(AUDIO_FORMAT_AAC_ELD), STRING_TO_ENUM(AUDIO_FORMAT_VORBIS), STRING_TO_ENUM(AUDIO_FORMAT_HE_AAC_V1), STRING_TO_ENUM(AUDIO_FORMAT_HE_AAC_V2), |