Loading hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) LOCAL_SRC_FILES += edid.c endif ifeq ($(strip $(AUDIO_USE_LL_AS_PRIMARY_OUTPUT)),true) LOCAL_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED endif Loading hal/audio_hw.c +12 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,13 @@ #define PROXY_OPEN_RETRY_COUNT 100 #define PROXY_OPEN_WAIT_TIME 20 #ifdef USE_LL_AS_PRIMARY_OUTPUT #define USECASE_AUDIO_PLAYBACK_PRIMARY USECASE_AUDIO_PLAYBACK_LOW_LATENCY #define PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY pcm_config_low_latency #else #define USECASE_AUDIO_PLAYBACK_PRIMARY USECASE_AUDIO_PLAYBACK_DEEP_BUFFER #define PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY pcm_config_deep_buffer #endif static unsigned int configured_low_latency_capture_period_size = LOW_LATENCY_CAPTURE_PERIOD_SIZE; Loading Loading @@ -2945,11 +2951,16 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->usecase = USECASE_AUDIO_PLAYBACK_LOW_LATENCY; out->config = pcm_config_low_latency; out->sample_rate = out->config.rate; } else if (out->flags & AUDIO_OUTPUT_FLAG_DEEP_BUFFER) { format = AUDIO_FORMAT_PCM_16_BIT; out->usecase = USECASE_AUDIO_PLAYBACK_DEEP_BUFFER; out->config = pcm_config_deep_buffer; out->sample_rate = out->config.rate; } else { /* primary path is the default path selected if no other outputs are available/suitable */ format = AUDIO_FORMAT_PCM_16_BIT; out->usecase = USECASE_AUDIO_PLAYBACK_PRIMARY; out->config = pcm_config_deep_buffer; out->config = PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY; out->sample_rate = out->config.rate; } Loading Loading
hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true) LOCAL_SRC_FILES += edid.c endif ifeq ($(strip $(AUDIO_USE_LL_AS_PRIMARY_OUTPUT)),true) LOCAL_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true) LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED endif Loading
hal/audio_hw.c +12 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,13 @@ #define PROXY_OPEN_RETRY_COUNT 100 #define PROXY_OPEN_WAIT_TIME 20 #ifdef USE_LL_AS_PRIMARY_OUTPUT #define USECASE_AUDIO_PLAYBACK_PRIMARY USECASE_AUDIO_PLAYBACK_LOW_LATENCY #define PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY pcm_config_low_latency #else #define USECASE_AUDIO_PLAYBACK_PRIMARY USECASE_AUDIO_PLAYBACK_DEEP_BUFFER #define PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY pcm_config_deep_buffer #endif static unsigned int configured_low_latency_capture_period_size = LOW_LATENCY_CAPTURE_PERIOD_SIZE; Loading Loading @@ -2945,11 +2951,16 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->usecase = USECASE_AUDIO_PLAYBACK_LOW_LATENCY; out->config = pcm_config_low_latency; out->sample_rate = out->config.rate; } else if (out->flags & AUDIO_OUTPUT_FLAG_DEEP_BUFFER) { format = AUDIO_FORMAT_PCM_16_BIT; out->usecase = USECASE_AUDIO_PLAYBACK_DEEP_BUFFER; out->config = pcm_config_deep_buffer; out->sample_rate = out->config.rate; } else { /* primary path is the default path selected if no other outputs are available/suitable */ format = AUDIO_FORMAT_PCM_16_BIT; out->usecase = USECASE_AUDIO_PLAYBACK_PRIMARY; out->config = pcm_config_deep_buffer; out->config = PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY; out->sample_rate = out->config.rate; } Loading