Loading hal/audio_extn/audio_extn.h +4 −0 Original line number Diff line number Diff line Loading @@ -1287,6 +1287,10 @@ int audio_extn_utils_get_license_params(const struct audio_device *adev, struct #define audio_extn_auto_hal_set_audio_port_config(dev, config) (0) #define audio_extn_auto_hal_set_parameters(adev, parms) (0) #else #define AUDIO_OUTPUT_FLAG_MEDIA 0x100000 #define AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION 0x200000 #define AUDIO_OUTPUT_FLAG_NAV_GUIDANCE 0x400000 #define AUDIO_OUTPUT_FLAG_PHONE 0x800000 int32_t audio_extn_auto_hal_init(struct audio_device *adev); void audio_extn_auto_hal_deinit(void); int audio_extn_auto_hal_create_audio_patch(struct audio_hw_device *dev, Loading hal/audio_extn/auto_hal.c +9 −0 Original line number Diff line number Diff line Loading @@ -446,11 +446,16 @@ int32_t audio_extn_auto_hal_open_output_stream(struct stream_out *out) ret = -EINVAL; goto error; } if (out->flags == AUDIO_OUTPUT_FLAG_NONE || out->flags == AUDIO_OUTPUT_FLAG_PRIMARY) out->flags |= AUDIO_OUTPUT_FLAG_MEDIA; break; case CAR_AUDIO_STREAM_SYS_NOTIFICATION: /* sys notification bus stream shares pcm device with low-latency */ out->usecase = USECASE_AUDIO_PLAYBACK_SYS_NOTIFICATION; out->config = pcm_config_low_latency; if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION; break; case CAR_AUDIO_STREAM_NAV_GUIDANCE: out->usecase = USECASE_AUDIO_PLAYBACK_NAV_GUIDANCE; Loading @@ -462,10 +467,14 @@ int32_t audio_extn_auto_hal_open_output_stream(struct stream_out *out) ret = -EINVAL; goto error; } if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_NAV_GUIDANCE; break; case CAR_AUDIO_STREAM_PHONE: out->usecase = USECASE_AUDIO_PLAYBACK_PHONE; out->config = pcm_config_low_latency; if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_PHONE; break; default: ALOGE("%s: Car audio stream %x not supported", __func__, Loading hal/audio_extn/utils.c +6 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,12 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_VOIP_RX), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_BD), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_INTERACTIVE), #ifdef AUDIO_EXTN_AUTO_HAL_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_MEDIA), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_NAV_GUIDANCE), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_PHONE), #endif STRING_TO_ENUM(AUDIO_INPUT_FLAG_NONE), STRING_TO_ENUM(AUDIO_INPUT_FLAG_FAST), STRING_TO_ENUM(AUDIO_INPUT_FLAG_HW_HOTWORD), Loading Loading
hal/audio_extn/audio_extn.h +4 −0 Original line number Diff line number Diff line Loading @@ -1287,6 +1287,10 @@ int audio_extn_utils_get_license_params(const struct audio_device *adev, struct #define audio_extn_auto_hal_set_audio_port_config(dev, config) (0) #define audio_extn_auto_hal_set_parameters(adev, parms) (0) #else #define AUDIO_OUTPUT_FLAG_MEDIA 0x100000 #define AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION 0x200000 #define AUDIO_OUTPUT_FLAG_NAV_GUIDANCE 0x400000 #define AUDIO_OUTPUT_FLAG_PHONE 0x800000 int32_t audio_extn_auto_hal_init(struct audio_device *adev); void audio_extn_auto_hal_deinit(void); int audio_extn_auto_hal_create_audio_patch(struct audio_hw_device *dev, Loading
hal/audio_extn/auto_hal.c +9 −0 Original line number Diff line number Diff line Loading @@ -446,11 +446,16 @@ int32_t audio_extn_auto_hal_open_output_stream(struct stream_out *out) ret = -EINVAL; goto error; } if (out->flags == AUDIO_OUTPUT_FLAG_NONE || out->flags == AUDIO_OUTPUT_FLAG_PRIMARY) out->flags |= AUDIO_OUTPUT_FLAG_MEDIA; break; case CAR_AUDIO_STREAM_SYS_NOTIFICATION: /* sys notification bus stream shares pcm device with low-latency */ out->usecase = USECASE_AUDIO_PLAYBACK_SYS_NOTIFICATION; out->config = pcm_config_low_latency; if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION; break; case CAR_AUDIO_STREAM_NAV_GUIDANCE: out->usecase = USECASE_AUDIO_PLAYBACK_NAV_GUIDANCE; Loading @@ -462,10 +467,14 @@ int32_t audio_extn_auto_hal_open_output_stream(struct stream_out *out) ret = -EINVAL; goto error; } if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_NAV_GUIDANCE; break; case CAR_AUDIO_STREAM_PHONE: out->usecase = USECASE_AUDIO_PLAYBACK_PHONE; out->config = pcm_config_low_latency; if (out->flags == AUDIO_OUTPUT_FLAG_NONE) out->flags |= AUDIO_OUTPUT_FLAG_PHONE; break; default: ALOGE("%s: Car audio stream %x not supported", __func__, Loading
hal/audio_extn/utils.c +6 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,12 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_VOIP_RX), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_BD), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_INTERACTIVE), #ifdef AUDIO_EXTN_AUTO_HAL_ENABLED STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_MEDIA), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_NAV_GUIDANCE), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_PHONE), #endif STRING_TO_ENUM(AUDIO_INPUT_FLAG_NONE), STRING_TO_ENUM(AUDIO_INPUT_FLAG_FAST), STRING_TO_ENUM(AUDIO_INPUT_FLAG_HW_HOTWORD), Loading