Loading hal/audio_extn/a2dp.c +8 −0 Original line number Diff line number Diff line Loading @@ -1303,6 +1303,14 @@ fail: return is_configured; } bool a2dp_set_source_backend_cfg() { if (a2dp.a2dp_source_started && !a2dp.a2dp_source_suspended) return a2dp_set_backend_cfg(SOURCE); return false; } bool configure_aac_dec_format(audio_aac_dec_config_t *aac_bt_cfg) { struct mixer_ctl *ctl_dec_data = NULL, *ctrl_bit_format = NULL; Loading hal/audio_extn/audio_extn.c +14 −1 Original line number Diff line number Diff line Loading @@ -4641,6 +4641,9 @@ static a2dp_start_capture_t a2dp_start_capture; typedef int (*a2dp_stop_capture_t)(); static a2dp_stop_capture_t a2dp_stop_capture; typedef bool (*a2dp_set_source_backend_cfg_t)(); static a2dp_set_source_backend_cfg_t a2dp_set_source_backend_cfg; typedef int (*sco_start_configuration_t)(); static sco_start_configuration_t sco_start_configuration; Loading Loading @@ -4695,7 +4698,10 @@ int a2dp_offload_feature_init(bool is_feature_enabled) !(a2dp_start_capture = (a2dp_start_capture_t)dlsym(a2dp_lib_handle, "a2dp_start_capture")) || !(a2dp_stop_capture = (a2dp_stop_capture_t)dlsym(a2dp_lib_handle, "a2dp_stop_capture"))) { (a2dp_stop_capture_t)dlsym(a2dp_lib_handle, "a2dp_stop_capture")) || !(a2dp_set_source_backend_cfg = (a2dp_set_source_backend_cfg_t)dlsym( a2dp_lib_handle, "a2dp_set_source_backend_cfg"))) { ALOGE("%s: dlsym failed", __func__); goto feature_disabled; } Loading Loading @@ -4733,6 +4739,7 @@ feature_disabled: a2dp_source_is_suspended = NULL; a2dp_start_capture = NULL; a2dp_stop_capture = NULL; a2dp_set_source_backend_cfg = NULL; ALOGW(":: %s: ---- Feature A2DP_OFFLOAD is disabled ----", __func__); return -ENOSYS; Loading Loading @@ -4831,6 +4838,12 @@ int audio_extn_a2dp_stop_capture() return (a2dp_stop_capture ? a2dp_stop_capture() : 0); } bool audio_extn_a2dp_set_source_backend_cfg() { return (a2dp_set_source_backend_cfg ? a2dp_set_source_backend_cfg() : false); } int audio_extn_sco_start_configuration() { return (sco_start_configuration? sco_start_configuration() : 0); Loading hal/audio_extn/audio_extn.h +1 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ bool audio_extn_a2dp_source_is_ready(); bool audio_extn_a2dp_source_is_suspended(); int audio_extn_a2dp_start_capture(); int audio_extn_a2dp_stop_capture(); bool audio_extn_a2dp_set_source_backend_cfg(); int audio_extn_sco_start_configuration(); void audio_extn_sco_reset_configuration(); Loading hal/audio_hw.c +5 −0 Original line number Diff line number Diff line Loading @@ -1385,6 +1385,11 @@ int enable_snd_device(struct audio_device *adev, new_snd_devices) != 0)) { ALOGV("%s: snd_device(%d: %s) is already active", __func__, snd_device, device_name); /* Set backend config for A2DP to ensure slimbus configuration is correct if A2DP is already active and backend is closed and re-opened */ if (snd_device == SND_DEVICE_OUT_BT_A2DP) audio_extn_a2dp_set_source_backend_cfg(); return 0; } Loading Loading
hal/audio_extn/a2dp.c +8 −0 Original line number Diff line number Diff line Loading @@ -1303,6 +1303,14 @@ fail: return is_configured; } bool a2dp_set_source_backend_cfg() { if (a2dp.a2dp_source_started && !a2dp.a2dp_source_suspended) return a2dp_set_backend_cfg(SOURCE); return false; } bool configure_aac_dec_format(audio_aac_dec_config_t *aac_bt_cfg) { struct mixer_ctl *ctl_dec_data = NULL, *ctrl_bit_format = NULL; Loading
hal/audio_extn/audio_extn.c +14 −1 Original line number Diff line number Diff line Loading @@ -4641,6 +4641,9 @@ static a2dp_start_capture_t a2dp_start_capture; typedef int (*a2dp_stop_capture_t)(); static a2dp_stop_capture_t a2dp_stop_capture; typedef bool (*a2dp_set_source_backend_cfg_t)(); static a2dp_set_source_backend_cfg_t a2dp_set_source_backend_cfg; typedef int (*sco_start_configuration_t)(); static sco_start_configuration_t sco_start_configuration; Loading Loading @@ -4695,7 +4698,10 @@ int a2dp_offload_feature_init(bool is_feature_enabled) !(a2dp_start_capture = (a2dp_start_capture_t)dlsym(a2dp_lib_handle, "a2dp_start_capture")) || !(a2dp_stop_capture = (a2dp_stop_capture_t)dlsym(a2dp_lib_handle, "a2dp_stop_capture"))) { (a2dp_stop_capture_t)dlsym(a2dp_lib_handle, "a2dp_stop_capture")) || !(a2dp_set_source_backend_cfg = (a2dp_set_source_backend_cfg_t)dlsym( a2dp_lib_handle, "a2dp_set_source_backend_cfg"))) { ALOGE("%s: dlsym failed", __func__); goto feature_disabled; } Loading Loading @@ -4733,6 +4739,7 @@ feature_disabled: a2dp_source_is_suspended = NULL; a2dp_start_capture = NULL; a2dp_stop_capture = NULL; a2dp_set_source_backend_cfg = NULL; ALOGW(":: %s: ---- Feature A2DP_OFFLOAD is disabled ----", __func__); return -ENOSYS; Loading Loading @@ -4831,6 +4838,12 @@ int audio_extn_a2dp_stop_capture() return (a2dp_stop_capture ? a2dp_stop_capture() : 0); } bool audio_extn_a2dp_set_source_backend_cfg() { return (a2dp_set_source_backend_cfg ? a2dp_set_source_backend_cfg() : false); } int audio_extn_sco_start_configuration() { return (sco_start_configuration? sco_start_configuration() : 0); Loading
hal/audio_extn/audio_extn.h +1 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ bool audio_extn_a2dp_source_is_ready(); bool audio_extn_a2dp_source_is_suspended(); int audio_extn_a2dp_start_capture(); int audio_extn_a2dp_stop_capture(); bool audio_extn_a2dp_set_source_backend_cfg(); int audio_extn_sco_start_configuration(); void audio_extn_sco_reset_configuration(); Loading
hal/audio_hw.c +5 −0 Original line number Diff line number Diff line Loading @@ -1385,6 +1385,11 @@ int enable_snd_device(struct audio_device *adev, new_snd_devices) != 0)) { ALOGV("%s: snd_device(%d: %s) is already active", __func__, snd_device, device_name); /* Set backend config for A2DP to ensure slimbus configuration is correct if A2DP is already active and backend is closed and re-opened */ if (snd_device == SND_DEVICE_OUT_BT_A2DP) audio_extn_a2dp_set_source_backend_cfg(); return 0; } Loading