Loading hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,10 @@ ifeq ($(ENABLE_AUDIO_LEGACY_TECHPACK),true) LOCAL_HEADER_LIBRARIES += qti_legacy_audio_kernel_uapi endif ifeq ($(AUDIO_FEATURE_ENABLED_HAL_V7), true) LOCAL_CFLAGS += -DANDROID_U_HAL7 endif LOCAL_SRC_FILES := \ audio_hw.c \ acdb.c \ Loading hal/audio_extn/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -1226,6 +1226,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true) LOCAL_C_INCLUDES += $(AUDIO_KERNEL_INC) endif ifeq ($(AUDIO_FEATURE_ENABLED_HAL_V7), true) LOCAL_CFLAGS += -DANDROID_U_HAL7 endif LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libsystem_headers ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),) Loading hal/audio_extn/audio_extn.c +25 −1 Original line number Diff line number Diff line Loading @@ -6227,9 +6227,15 @@ static auto_hal_open_echo_reference_stream_t auto_hal_open_echo_reference_stream typedef bool (*auto_hal_is_bus_device_usecase_t)(audio_usecase_t); static auto_hal_is_bus_device_usecase_t auto_hal_is_bus_device_usecase; #ifdef ANDROID_U_HAL7 typedef int (*auto_hal_get_audio_port_v7_t)(struct audio_hw_device*, struct audio_port_v7*); static auto_hal_get_audio_port_v7_t auto_hal_get_audio_port_v7; #else typedef int (*auto_hal_get_audio_port_t)(struct audio_hw_device*, struct audio_port*); static auto_hal_get_audio_port_t auto_hal_get_audio_port; #endif typedef int (*auto_hal_set_audio_port_config_t)(struct audio_hw_device*, const struct audio_port_config*); Loading Loading @@ -6305,9 +6311,15 @@ int auto_hal_feature_init(bool is_feature_enabled) !(auto_hal_is_bus_device_usecase = (auto_hal_is_bus_device_usecase_t)dlsym( auto_hal_lib_handle, "auto_hal_is_bus_device_usecase")) || #ifdef ANDROID_U_HAL7 !(auto_hal_get_audio_port_v7 = (auto_hal_get_audio_port_v7_t)dlsym( auto_hal_lib_handle, "auto_hal_get_audio_port_v7")) || #else !(auto_hal_get_audio_port = (auto_hal_get_audio_port_t)dlsym( auto_hal_lib_handle, "auto_hal_get_audio_port")) || #endif !(auto_hal_set_audio_port_config = (auto_hal_set_audio_port_config_t)dlsym( auto_hal_lib_handle, "auto_hal_set_audio_port_config")) || Loading Loading @@ -6354,7 +6366,11 @@ feature_disabled: auto_hal_open_input_stream = NULL; auto_hal_open_echo_reference_stream = NULL; auto_hal_is_bus_device_usecase = NULL; #ifdef ANDROID_U_HAL7 auto_hal_get_audio_port_v7 = NULL; #else auto_hal_get_audio_port = NULL; #endif auto_hal_set_audio_port_config = NULL; auto_hal_set_parameters = NULL; auto_hal_start_hfp_downlink = NULL; Loading Loading @@ -6450,13 +6466,21 @@ bool audio_extn_auto_hal_is_bus_device_usecase(audio_usecase_t uc_id) auto_hal_is_bus_device_usecase(uc_id): false); } #ifdef ANDROID_U_HAL7 int audio_extn_auto_hal_get_audio_port_v7(struct audio_hw_device *dev, struct audio_port_v7 *config) { return ((auto_hal_get_audio_port_v7) ? auto_hal_get_audio_port_v7(dev, config): 0); } #else int audio_extn_auto_hal_get_audio_port(struct audio_hw_device *dev, struct audio_port *config) { return ((auto_hal_get_audio_port) ? auto_hal_get_audio_port(dev, config): 0); } #endif int audio_extn_auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config) { Loading hal/audio_extn/audio_extn.h +13 −0 Original line number Diff line number Diff line Loading @@ -1275,11 +1275,19 @@ static int __unused audio_extn_hw_loopback_set_audio_port_config(struct audio_hw { return 0; } #ifdef ANDROID_U_HAL7 static int __unused audio_extn_hw_loopback_get_audio_port_v7(struct audio_hw_device *dev __unused, struct audio_port_v7 *port_in __unused) { return 0; } #else static int __unused audio_extn_hw_loopback_get_audio_port(struct audio_hw_device *dev __unused, struct audio_port *port_in __unused) { return 0; } #endif static int __unused audio_extn_hw_loopback_set_param_data(audio_patch_handle_t handle __unused, audio_extn_loopback_param_id param_id __unused, audio_extn_loopback_param_payload *payload __unused) Loading Loading @@ -1393,8 +1401,13 @@ int audio_extn_auto_hal_open_input_stream(struct stream_in *in); int audio_extn_auto_hal_open_echo_reference_stream(struct stream_in *in); bool audio_extn_auto_hal_overwrite_priority_for_auto(struct stream_in *in); bool audio_extn_auto_hal_is_bus_device_usecase(audio_usecase_t uc_id); #ifdef ANDROID_U_HAL7 int audio_extn_auto_hal_get_audio_port_v7(struct audio_hw_device *dev, struct audio_port_v7 *config); #else int audio_extn_auto_hal_get_audio_port(struct audio_hw_device *dev, struct audio_port *config); #endif int audio_extn_auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config); void audio_extn_auto_hal_set_parameters(struct audio_device *adev, Loading hal/audio_extn/auto_hal.c +8 −0 Original line number Diff line number Diff line Loading @@ -665,11 +665,19 @@ bool auto_hal_overwrite_priority_for_auto(struct stream_in *in) return (in->source == AUDIO_SOURCE_ECHO_REFERENCE); } #ifdef ANDROID_U_HAL7 int auto_hal_get_audio_port_v7(struct audio_hw_device *dev __unused, struct audio_port_v7 *config __unused) { return -ENOSYS; } #else int auto_hal_get_audio_port(struct audio_hw_device *dev __unused, struct audio_port *config __unused) { return -ENOSYS; } #endif int auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config) Loading Loading
hal/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,10 @@ ifeq ($(ENABLE_AUDIO_LEGACY_TECHPACK),true) LOCAL_HEADER_LIBRARIES += qti_legacy_audio_kernel_uapi endif ifeq ($(AUDIO_FEATURE_ENABLED_HAL_V7), true) LOCAL_CFLAGS += -DANDROID_U_HAL7 endif LOCAL_SRC_FILES := \ audio_hw.c \ acdb.c \ Loading
hal/audio_extn/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -1226,6 +1226,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true) LOCAL_C_INCLUDES += $(AUDIO_KERNEL_INC) endif ifeq ($(AUDIO_FEATURE_ENABLED_HAL_V7), true) LOCAL_CFLAGS += -DANDROID_U_HAL7 endif LOCAL_HEADER_LIBRARIES += libhardware_headers LOCAL_HEADER_LIBRARIES += libsystem_headers ifneq ($(filter kona lahaina holi,$(TARGET_BOARD_PLATFORM)),) Loading
hal/audio_extn/audio_extn.c +25 −1 Original line number Diff line number Diff line Loading @@ -6227,9 +6227,15 @@ static auto_hal_open_echo_reference_stream_t auto_hal_open_echo_reference_stream typedef bool (*auto_hal_is_bus_device_usecase_t)(audio_usecase_t); static auto_hal_is_bus_device_usecase_t auto_hal_is_bus_device_usecase; #ifdef ANDROID_U_HAL7 typedef int (*auto_hal_get_audio_port_v7_t)(struct audio_hw_device*, struct audio_port_v7*); static auto_hal_get_audio_port_v7_t auto_hal_get_audio_port_v7; #else typedef int (*auto_hal_get_audio_port_t)(struct audio_hw_device*, struct audio_port*); static auto_hal_get_audio_port_t auto_hal_get_audio_port; #endif typedef int (*auto_hal_set_audio_port_config_t)(struct audio_hw_device*, const struct audio_port_config*); Loading Loading @@ -6305,9 +6311,15 @@ int auto_hal_feature_init(bool is_feature_enabled) !(auto_hal_is_bus_device_usecase = (auto_hal_is_bus_device_usecase_t)dlsym( auto_hal_lib_handle, "auto_hal_is_bus_device_usecase")) || #ifdef ANDROID_U_HAL7 !(auto_hal_get_audio_port_v7 = (auto_hal_get_audio_port_v7_t)dlsym( auto_hal_lib_handle, "auto_hal_get_audio_port_v7")) || #else !(auto_hal_get_audio_port = (auto_hal_get_audio_port_t)dlsym( auto_hal_lib_handle, "auto_hal_get_audio_port")) || #endif !(auto_hal_set_audio_port_config = (auto_hal_set_audio_port_config_t)dlsym( auto_hal_lib_handle, "auto_hal_set_audio_port_config")) || Loading Loading @@ -6354,7 +6366,11 @@ feature_disabled: auto_hal_open_input_stream = NULL; auto_hal_open_echo_reference_stream = NULL; auto_hal_is_bus_device_usecase = NULL; #ifdef ANDROID_U_HAL7 auto_hal_get_audio_port_v7 = NULL; #else auto_hal_get_audio_port = NULL; #endif auto_hal_set_audio_port_config = NULL; auto_hal_set_parameters = NULL; auto_hal_start_hfp_downlink = NULL; Loading Loading @@ -6450,13 +6466,21 @@ bool audio_extn_auto_hal_is_bus_device_usecase(audio_usecase_t uc_id) auto_hal_is_bus_device_usecase(uc_id): false); } #ifdef ANDROID_U_HAL7 int audio_extn_auto_hal_get_audio_port_v7(struct audio_hw_device *dev, struct audio_port_v7 *config) { return ((auto_hal_get_audio_port_v7) ? auto_hal_get_audio_port_v7(dev, config): 0); } #else int audio_extn_auto_hal_get_audio_port(struct audio_hw_device *dev, struct audio_port *config) { return ((auto_hal_get_audio_port) ? auto_hal_get_audio_port(dev, config): 0); } #endif int audio_extn_auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config) { Loading
hal/audio_extn/audio_extn.h +13 −0 Original line number Diff line number Diff line Loading @@ -1275,11 +1275,19 @@ static int __unused audio_extn_hw_loopback_set_audio_port_config(struct audio_hw { return 0; } #ifdef ANDROID_U_HAL7 static int __unused audio_extn_hw_loopback_get_audio_port_v7(struct audio_hw_device *dev __unused, struct audio_port_v7 *port_in __unused) { return 0; } #else static int __unused audio_extn_hw_loopback_get_audio_port(struct audio_hw_device *dev __unused, struct audio_port *port_in __unused) { return 0; } #endif static int __unused audio_extn_hw_loopback_set_param_data(audio_patch_handle_t handle __unused, audio_extn_loopback_param_id param_id __unused, audio_extn_loopback_param_payload *payload __unused) Loading Loading @@ -1393,8 +1401,13 @@ int audio_extn_auto_hal_open_input_stream(struct stream_in *in); int audio_extn_auto_hal_open_echo_reference_stream(struct stream_in *in); bool audio_extn_auto_hal_overwrite_priority_for_auto(struct stream_in *in); bool audio_extn_auto_hal_is_bus_device_usecase(audio_usecase_t uc_id); #ifdef ANDROID_U_HAL7 int audio_extn_auto_hal_get_audio_port_v7(struct audio_hw_device *dev, struct audio_port_v7 *config); #else int audio_extn_auto_hal_get_audio_port(struct audio_hw_device *dev, struct audio_port *config); #endif int audio_extn_auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config); void audio_extn_auto_hal_set_parameters(struct audio_device *adev, Loading
hal/audio_extn/auto_hal.c +8 −0 Original line number Diff line number Diff line Loading @@ -665,11 +665,19 @@ bool auto_hal_overwrite_priority_for_auto(struct stream_in *in) return (in->source == AUDIO_SOURCE_ECHO_REFERENCE); } #ifdef ANDROID_U_HAL7 int auto_hal_get_audio_port_v7(struct audio_hw_device *dev __unused, struct audio_port_v7 *config __unused) { return -ENOSYS; } #else int auto_hal_get_audio_port(struct audio_hw_device *dev __unused, struct audio_port *config __unused) { return -ENOSYS; } #endif int auto_hal_set_audio_port_config(struct audio_hw_device *dev, const struct audio_port_config *config) Loading