Loading media/libstagefright/ExtendedUtils.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -944,7 +944,6 @@ sp<MetaData> ExtendedUtils::updatePCMFormatAndBitwidth( sp<MetaData> tempMetadata = new MetaData; sp<MetaData> format = audioSource->getFormat(); int bitWidth = 16; #if defined (PCM_OFFLOAD_ENABLED) || defined (PCM_OFFLOAD_ENABLED_24) format->findInt32(kKeyBitsPerSample, &bitWidth); tempMetadata->setInt32(kKeyBitsPerSample, bitWidth); tempMetadata->setInt32(kKeyPcmFormat, AUDIO_FORMAT_PCM_16_BIT); Loading @@ -955,7 +954,6 @@ sp<MetaData> ExtendedUtils::updatePCMFormatAndBitwidth( (!strcmp(prop_pcmoffload, "true") || atoi(prop_pcmoffload))) { tempMetadata->setInt32(kKeyPcmFormat, AUDIO_FORMAT_PCM_8_24_BIT); } #endif return tempMetadata; } Loading services/audiopolicy/Android.mk +81 −75 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) ifeq ($(call is-vendor-board-platform,QCOM),true) ifeq ($(call is-board-platform-in-list, apq8084 msm8974 msm8226 msm8610),true) ifneq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),false) common_cflags += -DAUDIO_EXTN_COMPRESS_VOIP_ENABLED endif endif ifneq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),false) common_cflags += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true) common_cflags += -DAUDIO_EXTN_FM_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true) common_cflags += -DAUDIO_EXTN_HDMI_SPK_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) ifneq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),false) common_cflags += -DAUDIO_EXTN_INCALL_MUSIC_ENABLED endif endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) common_cflags += -DMULTIPLE_OFFLOAD_ENABLED endif ifneq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),false) common_cflags += -DAUDIO_EXTN_AFE_PROXY_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) common_cflags += -DAUDIO_EXTN_SSR_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true) common_cflags += -DVOICE_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) common_cflags += -DRECORD_PLAY_CONCURRENCY endif ifeq ($(strip $(DOLBY_UDC)),true) common_cflags += -DDOLBY_UDC endif #DOLBY_UDC ifeq ($(strip $(DOLBY_DDP)),true) common_cflags += -DDOLBY_DDP endif #DOLBY_DDP ifeq ($(strip $(DOLBY_DAP)),true) ifdef DOLBY_DAP_OPENSLES common_cflags += -DDOLBY_DAP_OPENSLES endif endif #DOLBY_END ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) common_cflags += -DHDMI_PASSTHROUGH_ENABLED endif ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true) common_cflags += -DENABLE_AV_ENHANCEMENTS endif endif include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ Loading Loading @@ -46,7 +115,7 @@ LOCAL_STATIC_LIBRARIES := \ libmedia_helper LOCAL_MODULE := libaudiopolicyservice LOCAL_CFLAGS += $(common_cflags) LOCAL_CFLAGS += -fvisibility=hidden include $(BUILD_SHARED_LIBRARY) Loading @@ -59,12 +128,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ AudioPolicyManager.cpp ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) LOCAL_CFLAGS += -DDTS_EAGLE LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_SRC_FILES += AudioUtil.c endif LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ Loading @@ -74,73 +137,13 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \ libmedia_helper ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_COMPRESS_VOIP_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FM_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_HDMI_SPK_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_INCALL_MUSIC_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) LOCAL_CFLAGS += -DMULTIPLE_OFFLOAD_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_16 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_AFE_PROXY_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_SSR_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true) LOCAL_CFLAGS += -DVOICE_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY endif ifeq ($(strip $(DOLBY_UDC)),true) LOCAL_CFLAGS += -DDOLBY_UDC endif #DOLBY_UDC ifeq ($(strip $(DOLBY_DDP)),true) LOCAL_CFLAGS += -DDOLBY_DDP endif #DOLBY_DDP ifeq ($(strip $(DOLBY_DAP)),true) ifdef DOLBY_DAP_OPENSLES LOCAL_CFLAGS += -DDOLBY_DAP_OPENSLES endif endif #DOLBY_END ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) LOCAL_CFLAGS += -DDTS_EAGLE LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_SRC_FILES += AudioUtil.c endif ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true) LOCAL_CFLAGS += -DENABLE_AV_ENHANCEMENTS endif LOCAL_CFLAGS += $(common_cflags) LOCAL_MODULE := libaudiopolicymanagerdefault Loading @@ -158,7 +161,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libaudiopolicymanager LOCAL_CFLAGS += $(common_cflags) include $(BUILD_SHARED_LIBRARY) endif endif services/audiopolicy/AudioPolicyManager.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -5374,8 +5374,6 @@ AudioPolicyManager::routing_strategy AudioPolicyManager::getStrategy( return STRATEGY_SONIFICATION_RESPECTFUL; case AUDIO_STREAM_DTMF: return STRATEGY_DTMF; default: ALOGE("unknown stream type %d", stream); case AUDIO_STREAM_SYSTEM: // NOTE: SYSTEM stream uses MEDIA strategy because muting music and switching outputs // while key clicks are played produces a poor result Loading @@ -5392,7 +5390,10 @@ AudioPolicyManager::routing_strategy AudioPolicyManager::getStrategy( return STRATEGY_ACCESSIBILITY; case AUDIO_STREAM_REROUTING: return STRATEGY_REROUTING; default: ALOGE("unknown stream type %d", stream); } return STRATEGY_MEDIA; } uint32_t AudioPolicyManager::getStrategyForAttr(const audio_attributes_t *attr) { Loading Loading
media/libstagefright/ExtendedUtils.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -944,7 +944,6 @@ sp<MetaData> ExtendedUtils::updatePCMFormatAndBitwidth( sp<MetaData> tempMetadata = new MetaData; sp<MetaData> format = audioSource->getFormat(); int bitWidth = 16; #if defined (PCM_OFFLOAD_ENABLED) || defined (PCM_OFFLOAD_ENABLED_24) format->findInt32(kKeyBitsPerSample, &bitWidth); tempMetadata->setInt32(kKeyBitsPerSample, bitWidth); tempMetadata->setInt32(kKeyPcmFormat, AUDIO_FORMAT_PCM_16_BIT); Loading @@ -955,7 +954,6 @@ sp<MetaData> ExtendedUtils::updatePCMFormatAndBitwidth( (!strcmp(prop_pcmoffload, "true") || atoi(prop_pcmoffload))) { tempMetadata->setInt32(kKeyPcmFormat, AUDIO_FORMAT_PCM_8_24_BIT); } #endif return tempMetadata; } Loading
services/audiopolicy/Android.mk +81 −75 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) ifeq ($(call is-vendor-board-platform,QCOM),true) ifeq ($(call is-board-platform-in-list, apq8084 msm8974 msm8226 msm8610),true) ifneq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),false) common_cflags += -DAUDIO_EXTN_COMPRESS_VOIP_ENABLED endif endif ifneq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),false) common_cflags += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true) common_cflags += -DAUDIO_EXTN_FM_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true) common_cflags += -DAUDIO_EXTN_HDMI_SPK_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) ifneq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),false) common_cflags += -DAUDIO_EXTN_INCALL_MUSIC_ENABLED endif endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) common_cflags += -DMULTIPLE_OFFLOAD_ENABLED endif ifneq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),false) common_cflags += -DAUDIO_EXTN_AFE_PROXY_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) common_cflags += -DAUDIO_EXTN_SSR_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true) common_cflags += -DVOICE_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) common_cflags += -DRECORD_PLAY_CONCURRENCY endif ifeq ($(strip $(DOLBY_UDC)),true) common_cflags += -DDOLBY_UDC endif #DOLBY_UDC ifeq ($(strip $(DOLBY_DDP)),true) common_cflags += -DDOLBY_DDP endif #DOLBY_DDP ifeq ($(strip $(DOLBY_DAP)),true) ifdef DOLBY_DAP_OPENSLES common_cflags += -DDOLBY_DAP_OPENSLES endif endif #DOLBY_END ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) common_cflags += -DHDMI_PASSTHROUGH_ENABLED endif ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true) common_cflags += -DENABLE_AV_ENHANCEMENTS endif endif include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ Loading Loading @@ -46,7 +115,7 @@ LOCAL_STATIC_LIBRARIES := \ libmedia_helper LOCAL_MODULE := libaudiopolicyservice LOCAL_CFLAGS += $(common_cflags) LOCAL_CFLAGS += -fvisibility=hidden include $(BUILD_SHARED_LIBRARY) Loading @@ -59,12 +128,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ AudioPolicyManager.cpp ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) LOCAL_CFLAGS += -DDTS_EAGLE LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_SRC_FILES += AudioUtil.c endif LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ Loading @@ -74,73 +137,13 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \ libmedia_helper ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_COMPRESS_VOIP_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FM_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_HDMI_SPK_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INCALL_MUSIC)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_INCALL_MUSIC_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) LOCAL_CFLAGS += -DMULTIPLE_OFFLOAD_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_16 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_AFE_PROXY_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SSR)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_SSR_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true) LOCAL_CFLAGS += -DVOICE_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true) LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY endif ifeq ($(strip $(DOLBY_UDC)),true) LOCAL_CFLAGS += -DDOLBY_UDC endif #DOLBY_UDC ifeq ($(strip $(DOLBY_DDP)),true) LOCAL_CFLAGS += -DDOLBY_DDP endif #DOLBY_DDP ifeq ($(strip $(DOLBY_DAP)),true) ifdef DOLBY_DAP_OPENSLES LOCAL_CFLAGS += -DDOLBY_DAP_OPENSLES endif endif #DOLBY_END ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH)),true) LOCAL_CFLAGS += -DHDMI_PASSTHROUGH_ENABLED ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true) LOCAL_CFLAGS += -DDTS_EAGLE LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_SRC_FILES += AudioUtil.c endif ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true) LOCAL_CFLAGS += -DENABLE_AV_ENHANCEMENTS endif LOCAL_CFLAGS += $(common_cflags) LOCAL_MODULE := libaudiopolicymanagerdefault Loading @@ -158,7 +161,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libaudiopolicymanager LOCAL_CFLAGS += $(common_cflags) include $(BUILD_SHARED_LIBRARY) endif endif
services/audiopolicy/AudioPolicyManager.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -5374,8 +5374,6 @@ AudioPolicyManager::routing_strategy AudioPolicyManager::getStrategy( return STRATEGY_SONIFICATION_RESPECTFUL; case AUDIO_STREAM_DTMF: return STRATEGY_DTMF; default: ALOGE("unknown stream type %d", stream); case AUDIO_STREAM_SYSTEM: // NOTE: SYSTEM stream uses MEDIA strategy because muting music and switching outputs // while key clicks are played produces a poor result Loading @@ -5392,7 +5390,10 @@ AudioPolicyManager::routing_strategy AudioPolicyManager::getStrategy( return STRATEGY_ACCESSIBILITY; case AUDIO_STREAM_REROUTING: return STRATEGY_REROUTING; default: ALOGE("unknown stream type %d", stream); } return STRATEGY_MEDIA; } uint32_t AudioPolicyManager::getStrategyForAttr(const audio_attributes_t *attr) { Loading