Loading audiod/AudioDaemon.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ namespace android { struct dirent* in_file; int fd; String8 path; String8 d_name; if ((dp = opendir(events_dir)) == NULL) { ALOGE("Cannot open switch directory to get list of audio events %s", events_dir); Loading @@ -148,8 +149,9 @@ namespace android { if (fd == -1) { ALOGE("Open %s failed : %s", path.string(), strerror(errno)); } else { mAudioEvents.push_back(std::make_pair(in_file->d_name, fd)); mAudioEventsStatus.push_back(std::make_pair(in_file->d_name, 0)); d_name = in_file->d_name; mAudioEvents.push_back(std::make_pair(d_name, fd)); mAudioEventsStatus.push_back(std::make_pair(d_name, 0)); ALOGD("event status mAudioEventsStatus= %s", mAudioEventsStatus[0].first.string()); } Loading hal/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) LOCAL_CFLAGS += -DHDMI_EDID LOCAL_SRC_FILES += edid.c endif Loading hal/audio_extn/audio_extn.h +6 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ #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" #define audio_is_offload_pcm(format) (0) #define OFFLOAD_USE_SMALL_BUFFER false #else #define OFFLOAD_USE_SMALL_BUFFER (info->use_small_bufs) #endif #ifndef AFE_PROXY_ENABLED Loading Loading @@ -316,6 +319,9 @@ void audio_extn_check_and_set_dts_hpx_state(const struct audio_device *adev); void audio_extn_dolby_set_dmid(struct audio_device *adev); #else #define audio_extn_dolby_set_dmid(adev) (0) #define AUDIO_CHANNEL_OUT_PENTA (AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER) #define AUDIO_CHANNEL_OUT_SURROUND (AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | \ AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_BACK_CENTER) #endif Loading hal/audio_extn/utils.c +7 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,9 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { #ifdef COMPRESS_VOIP_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_VOIP_RX), #endif #ifdef HDMI_PASSTHROUGH_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH), #endif }; const struct string_to_enum s_format_name_to_enum_table[] = { Loading Loading @@ -566,8 +568,11 @@ int audio_extn_utils_send_app_type_cfg(struct audio_usecase *usecase) app_type_cfg[len++] = out->app_type_cfg.app_type; app_type_cfg[len++] = acdb_dev_id; if (((out->format == AUDIO_FORMAT_E_AC3) || (out->format == AUDIO_FORMAT_E_AC3_JOC)) && (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH)) (out->format == AUDIO_FORMAT_E_AC3_JOC)) #ifdef HDMI_PASSTHROUGH_ENABLED && (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH) #endif ) app_type_cfg[len++] = sample_rate * 4; else app_type_cfg[len++] = sample_rate; Loading hal/audio_hw.c +1 −1 Original line number Diff line number Diff line Loading @@ -2921,7 +2921,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING) out->non_blocking = 1; if (config->offload_info.use_small_bufs) { if (platform_use_small_buffer(&config->offload_info)) { //this flag is set from framework only if its for PCM formats //no need to check for PCM format again out->non_blocking = 0; Loading Loading
audiod/AudioDaemon.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ namespace android { struct dirent* in_file; int fd; String8 path; String8 d_name; if ((dp = opendir(events_dir)) == NULL) { ALOGE("Cannot open switch directory to get list of audio events %s", events_dir); Loading @@ -148,8 +149,9 @@ namespace android { if (fd == -1) { ALOGE("Open %s failed : %s", path.string(), strerror(errno)); } else { mAudioEvents.push_back(std::make_pair(in_file->d_name, fd)); mAudioEventsStatus.push_back(std::make_pair(in_file->d_name, 0)); d_name = in_file->d_name; mAudioEvents.push_back(std::make_pair(d_name, fd)); mAudioEventsStatus.push_back(std::make_pair(d_name, 0)); ALOGD("event status mAudioEventsStatus= %s", mAudioEventsStatus[0].first.string()); } Loading
hal/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) LOCAL_CFLAGS += -DHDMI_EDID LOCAL_SRC_FILES += edid.c endif Loading
hal/audio_extn/audio_extn.h +6 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ #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" #define audio_is_offload_pcm(format) (0) #define OFFLOAD_USE_SMALL_BUFFER false #else #define OFFLOAD_USE_SMALL_BUFFER (info->use_small_bufs) #endif #ifndef AFE_PROXY_ENABLED Loading Loading @@ -316,6 +319,9 @@ void audio_extn_check_and_set_dts_hpx_state(const struct audio_device *adev); void audio_extn_dolby_set_dmid(struct audio_device *adev); #else #define audio_extn_dolby_set_dmid(adev) (0) #define AUDIO_CHANNEL_OUT_PENTA (AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER) #define AUDIO_CHANNEL_OUT_SURROUND (AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | \ AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_BACK_CENTER) #endif Loading
hal/audio_extn/utils.c +7 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,9 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { #ifdef COMPRESS_VOIP_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_VOIP_RX), #endif #ifdef HDMI_PASSTHROUGH_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH), #endif }; const struct string_to_enum s_format_name_to_enum_table[] = { Loading Loading @@ -566,8 +568,11 @@ int audio_extn_utils_send_app_type_cfg(struct audio_usecase *usecase) app_type_cfg[len++] = out->app_type_cfg.app_type; app_type_cfg[len++] = acdb_dev_id; if (((out->format == AUDIO_FORMAT_E_AC3) || (out->format == AUDIO_FORMAT_E_AC3_JOC)) && (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH)) (out->format == AUDIO_FORMAT_E_AC3_JOC)) #ifdef HDMI_PASSTHROUGH_ENABLED && (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH) #endif ) app_type_cfg[len++] = sample_rate * 4; else app_type_cfg[len++] = sample_rate; Loading
hal/audio_hw.c +1 −1 Original line number Diff line number Diff line Loading @@ -2921,7 +2921,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING) out->non_blocking = 1; if (config->offload_info.use_small_bufs) { if (platform_use_small_buffer(&config->offload_info)) { //this flag is set from framework only if its for PCM formats //no need to check for PCM format again out->non_blocking = 0; Loading