Loading hal/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ endif endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DFORMATS_ENABLED LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) Loading hal/audio_extn/audio_extn.h +12 −10 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ #include <cutils/str_parms.h> #ifndef PCM_OFFLOAD_ENABLED #define AUDIO_FORMAT_PCM_OFFLOAD 0x17000000UL #define AUDIO_FORMAT_PCM_OFFLOAD 0x1A000000UL #define AUDIO_FORMAT_PCM_16_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_16_BIT) #define AUDIO_FORMAT_PCM_24_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_8_24_BIT) #define AUDIO_OFFLOAD_CODEC_FORMAT "music_offload_codec_format" Loading Loading @@ -69,20 +69,20 @@ #endif #ifndef FLAC_OFFLOAD_ENABLED #define AUDIO_FORMAT_FLAC 0x1D000000UL #define AUDIO_FORMAT_FLAC 0x1B000000UL #endif #ifndef WMA_OFFLOAD_ENABLED #define AUDIO_FORMAT_WMA 0x13000000UL #define AUDIO_FORMAT_WMA_PRO 0x14000000UL #define AUDIO_FORMAT_WMA 0x12000000UL #define AUDIO_FORMAT_WMA_PRO 0x13000000UL #endif #ifndef ALAC_OFFLOAD_ENABLED #define AUDIO_FORMAT_ALAC 0x1F000000UL #define AUDIO_FORMAT_ALAC 0x1C000000UL #endif #ifndef APE_OFFLOAD_ENABLED #define AUDIO_FORMAT_APE 0x20000000UL #define AUDIO_FORMAT_APE 0x1D000000UL #endif #ifndef COMPRESS_METADATA_NEEDED Loading @@ -92,11 +92,10 @@ int audio_extn_parse_compress_metadata(struct stream_out *out, struct str_parms *parms); #endif #ifdef PCM_OFFLOAD_ENABLED_24 #define PCM_OUTPUT_BIT_WIDTH (((config->offload_info.format & AUDIO_FORMAT_PCM_24_BIT_OFFLOAD) == \ (AUDIO_FORMAT_PCM_24_BIT_OFFLOAD)) ? 24 : CODEC_BACKEND_DEFAULT_BIT_WIDTH) #ifdef AUDIO_EXTN_FORMATS_ENABLED #define AUDIO_OUTPUT_BIT_WIDTH (config->offload_info.bit_width) #else #define PCM_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH) #define AUDIO_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH) #endif #define MAX_LENGTH_MIXER_CONTROL_IN_INT (128) Loading Loading @@ -472,6 +471,9 @@ typedef enum { #ifndef AUDIO_FORMAT_E_AC3_JOC #define AUDIO_FORMAT_E_AC3_JOC 0x19000000UL #endif #ifndef AUDIO_FORMAT_DTS_LBR #define AUDIO_FORMAT_DTS_LBR 0x1E000000UL #endif int b64decode(char *inp, int ilen, uint8_t* outp); int b64encode(uint8_t *inp, int ilen, char* outp); Loading hal/audio_extn/utils.c +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ const struct string_to_enum s_format_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_FORMAT_AMR_WB), STRING_TO_ENUM(AUDIO_FORMAT_AC3), STRING_TO_ENUM(AUDIO_FORMAT_E_AC3), #ifdef FORMATS_ENABLED #ifdef AUDIO_EXTN_FORMATS_ENABLED STRING_TO_ENUM(AUDIO_FORMAT_DTS), STRING_TO_ENUM(AUDIO_FORMAT_WMA), STRING_TO_ENUM(AUDIO_FORMAT_WMA_PRO), Loading hal/audio_hw.c +2 −2 Original line number Diff line number Diff line Loading @@ -2913,7 +2913,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->compr_config.codec->ch_in = audio_channel_count_from_out_mask(config->channel_mask); out->compr_config.codec->ch_out = out->compr_config.codec->ch_in; out->bit_width = PCM_OUTPUT_BIT_WIDTH; out->bit_width = AUDIO_OUTPUT_BIT_WIDTH; /*TODO: Do we need to change it for passthrough */ out->compr_config.codec->format = SND_AUDIOSTREAMFORMAT_RAW; Loading @@ -2929,7 +2929,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, } if (config->offload_info.format == AUDIO_FORMAT_FLAC) out->compr_config.codec->options.flac_dec.sample_size = PCM_OUTPUT_BIT_WIDTH; out->compr_config.codec->options.flac_dec.sample_size = AUDIO_OUTPUT_BIT_WIDTH; if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING) out->non_blocking = 1; Loading policy_hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif LOCAL_MODULE := libaudiopolicymanager include $(BUILD_SHARED_LIBRARY) Loading Loading
hal/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ endif endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DFORMATS_ENABLED LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) Loading
hal/audio_extn/audio_extn.h +12 −10 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ #include <cutils/str_parms.h> #ifndef PCM_OFFLOAD_ENABLED #define AUDIO_FORMAT_PCM_OFFLOAD 0x17000000UL #define AUDIO_FORMAT_PCM_OFFLOAD 0x1A000000UL #define AUDIO_FORMAT_PCM_16_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_16_BIT) #define AUDIO_FORMAT_PCM_24_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_8_24_BIT) #define AUDIO_OFFLOAD_CODEC_FORMAT "music_offload_codec_format" Loading Loading @@ -69,20 +69,20 @@ #endif #ifndef FLAC_OFFLOAD_ENABLED #define AUDIO_FORMAT_FLAC 0x1D000000UL #define AUDIO_FORMAT_FLAC 0x1B000000UL #endif #ifndef WMA_OFFLOAD_ENABLED #define AUDIO_FORMAT_WMA 0x13000000UL #define AUDIO_FORMAT_WMA_PRO 0x14000000UL #define AUDIO_FORMAT_WMA 0x12000000UL #define AUDIO_FORMAT_WMA_PRO 0x13000000UL #endif #ifndef ALAC_OFFLOAD_ENABLED #define AUDIO_FORMAT_ALAC 0x1F000000UL #define AUDIO_FORMAT_ALAC 0x1C000000UL #endif #ifndef APE_OFFLOAD_ENABLED #define AUDIO_FORMAT_APE 0x20000000UL #define AUDIO_FORMAT_APE 0x1D000000UL #endif #ifndef COMPRESS_METADATA_NEEDED Loading @@ -92,11 +92,10 @@ int audio_extn_parse_compress_metadata(struct stream_out *out, struct str_parms *parms); #endif #ifdef PCM_OFFLOAD_ENABLED_24 #define PCM_OUTPUT_BIT_WIDTH (((config->offload_info.format & AUDIO_FORMAT_PCM_24_BIT_OFFLOAD) == \ (AUDIO_FORMAT_PCM_24_BIT_OFFLOAD)) ? 24 : CODEC_BACKEND_DEFAULT_BIT_WIDTH) #ifdef AUDIO_EXTN_FORMATS_ENABLED #define AUDIO_OUTPUT_BIT_WIDTH (config->offload_info.bit_width) #else #define PCM_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH) #define AUDIO_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH) #endif #define MAX_LENGTH_MIXER_CONTROL_IN_INT (128) Loading Loading @@ -472,6 +471,9 @@ typedef enum { #ifndef AUDIO_FORMAT_E_AC3_JOC #define AUDIO_FORMAT_E_AC3_JOC 0x19000000UL #endif #ifndef AUDIO_FORMAT_DTS_LBR #define AUDIO_FORMAT_DTS_LBR 0x1E000000UL #endif int b64decode(char *inp, int ilen, uint8_t* outp); int b64encode(uint8_t *inp, int ilen, char* outp); Loading
hal/audio_extn/utils.c +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ const struct string_to_enum s_format_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_FORMAT_AMR_WB), STRING_TO_ENUM(AUDIO_FORMAT_AC3), STRING_TO_ENUM(AUDIO_FORMAT_E_AC3), #ifdef FORMATS_ENABLED #ifdef AUDIO_EXTN_FORMATS_ENABLED STRING_TO_ENUM(AUDIO_FORMAT_DTS), STRING_TO_ENUM(AUDIO_FORMAT_WMA), STRING_TO_ENUM(AUDIO_FORMAT_WMA_PRO), Loading
hal/audio_hw.c +2 −2 Original line number Diff line number Diff line Loading @@ -2913,7 +2913,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->compr_config.codec->ch_in = audio_channel_count_from_out_mask(config->channel_mask); out->compr_config.codec->ch_out = out->compr_config.codec->ch_in; out->bit_width = PCM_OUTPUT_BIT_WIDTH; out->bit_width = AUDIO_OUTPUT_BIT_WIDTH; /*TODO: Do we need to change it for passthrough */ out->compr_config.codec->format = SND_AUDIOSTREAMFORMAT_RAW; Loading @@ -2929,7 +2929,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, } if (config->offload_info.format == AUDIO_FORMAT_FLAC) out->compr_config.codec->options.flac_dec.sample_size = PCM_OUTPUT_BIT_WIDTH; out->compr_config.codec->options.flac_dec.sample_size = AUDIO_OUTPUT_BIT_WIDTH; if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING) out->non_blocking = 1; Loading
policy_hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24 endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true) LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED endif LOCAL_MODULE := libaudiopolicymanager include $(BUILD_SHARED_LIBRARY) Loading