hal: enable app type calibration for car streams
Enable app type calibration for car streams based on output flags. Change-Id: I3f275ee674a315b0a912de2bdafd03ff2477e020
This commit is contained in:
parent
bed641e813
commit
090dfc578c
|
@ -1286,6 +1286,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,
|
||||
|
|
|
@ -264,11 +264,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;
|
||||
|
@ -280,10 +285,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__,
|
||||
|
|
|
@ -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…
Reference in New Issue