Loading hal/audio_extn/a2dp.c +11 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #ifdef A2DP_OFFLOAD_ENABLED #define BT_IPC_LIB_NAME "libbthost_if.so" #define BTAUDIO_OFFLOAD_LIB_NAME "btaudio_offload_if.so" // Media format definitions #define ENC_MEDIA_FMT_AAC 0x00010DA6 Loading Loading @@ -78,6 +79,7 @@ // System properties used for A2DP Offload #define SYSPROP_A2DP_OFFLOAD_SUPPORTED "ro.bluetooth.a2dp_offload.supported" #define SYSPROP_A2DP_OFFLOAD_DISABLED "persist.bluetooth.a2dp_offload.disabled" #define SYSPROP_BLUETOOTH_AUDIO_HAL_ENABLED "persist.vendor.bluetooth.bluetooth_audio_hal.enabled" #define SYSPROP_A2DP_CODEC_LATENCIES "vendor.audio.a2dp.codec.latency" // Default encoder bit width Loading Loading @@ -676,8 +678,9 @@ fail: static int open_a2dp_output() { int ret = 0; ALOGD("%s: Open A2DP output start", __func__); bool hal_v2_enabled = property_get_bool(SYSPROP_BLUETOOTH_AUDIO_HAL_ENABLED, false); if (a2dp.bt_state != A2DP_STATE_DISCONNECTED) { ALOGD("%s: Called A2DP open with improper state, Ignoring request state %d", Loading @@ -686,9 +689,13 @@ static int open_a2dp_output() } if (a2dp.bt_lib_handle == NULL) { ALOGD("%s: Requesting for Bluetooth IPC lib handle", __func__); ALOGD("%s: Requesting for Bluetooth IPC lib handle [%s]", __func__, hal_v2_enabled ? BTAUDIO_OFFLOAD_LIB_NAME : BT_IPC_LIB_NAME); if (hal_v2_enabled) { a2dp.bt_lib_handle = dlopen(BTAUDIO_OFFLOAD_LIB_NAME, RTLD_NOW); } else { a2dp.bt_lib_handle = dlopen(BT_IPC_LIB_NAME, RTLD_NOW); } if (a2dp.bt_lib_handle == NULL) { ret = -errno; ALOGE("%s: DLOPEN failed for %s errno %d strerror %s", __func__, Loading Loading
hal/audio_extn/a2dp.c +11 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #ifdef A2DP_OFFLOAD_ENABLED #define BT_IPC_LIB_NAME "libbthost_if.so" #define BTAUDIO_OFFLOAD_LIB_NAME "btaudio_offload_if.so" // Media format definitions #define ENC_MEDIA_FMT_AAC 0x00010DA6 Loading Loading @@ -78,6 +79,7 @@ // System properties used for A2DP Offload #define SYSPROP_A2DP_OFFLOAD_SUPPORTED "ro.bluetooth.a2dp_offload.supported" #define SYSPROP_A2DP_OFFLOAD_DISABLED "persist.bluetooth.a2dp_offload.disabled" #define SYSPROP_BLUETOOTH_AUDIO_HAL_ENABLED "persist.vendor.bluetooth.bluetooth_audio_hal.enabled" #define SYSPROP_A2DP_CODEC_LATENCIES "vendor.audio.a2dp.codec.latency" // Default encoder bit width Loading Loading @@ -676,8 +678,9 @@ fail: static int open_a2dp_output() { int ret = 0; ALOGD("%s: Open A2DP output start", __func__); bool hal_v2_enabled = property_get_bool(SYSPROP_BLUETOOTH_AUDIO_HAL_ENABLED, false); if (a2dp.bt_state != A2DP_STATE_DISCONNECTED) { ALOGD("%s: Called A2DP open with improper state, Ignoring request state %d", Loading @@ -686,9 +689,13 @@ static int open_a2dp_output() } if (a2dp.bt_lib_handle == NULL) { ALOGD("%s: Requesting for Bluetooth IPC lib handle", __func__); ALOGD("%s: Requesting for Bluetooth IPC lib handle [%s]", __func__, hal_v2_enabled ? BTAUDIO_OFFLOAD_LIB_NAME : BT_IPC_LIB_NAME); if (hal_v2_enabled) { a2dp.bt_lib_handle = dlopen(BTAUDIO_OFFLOAD_LIB_NAME, RTLD_NOW); } else { a2dp.bt_lib_handle = dlopen(BT_IPC_LIB_NAME, RTLD_NOW); } if (a2dp.bt_lib_handle == NULL) { ret = -errno; ALOGE("%s: DLOPEN failed for %s errno %d strerror %s", __func__, Loading