Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a8e25ee authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[19/19] get_btm_client_interface().sco.BTM_WriteVoiceSettings" into main

parents d28840d3 2300a7b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@
#include "osi/include/alarm.h"
#include "osi/include/alarm.h"
#include "osi/include/compat.h"
#include "osi/include/compat.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "types/raw_address.h"
#include "types/raw_address.h"


using namespace bluetooth;
using namespace bluetooth;
@@ -420,7 +420,7 @@ void bta_ag_api_enable(tBTA_AG_CBACK* p_cback) {
  bta_ag_cb.p_cback = p_cback;
  bta_ag_cb.p_cback = p_cback;


  /* call init call-out */
  /* call init call-out */
  BTM_WriteVoiceSettings(AG_VOICE_SETTINGS);
  get_btm_client_interface().sco.BTM_WriteVoiceSettings(AG_VOICE_SETTINGS);


  bta_sys_collision_register(BTA_ID_AG, bta_ag_collision_cback);
  bta_sys_collision_register(BTA_ID_AG, bta_ag_collision_cback);


+2 −1
Original line number Original line Diff line number Diff line
@@ -236,7 +236,8 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) {
      /* Bypass vendor specific and voice settings if enhanced eSCO supported */
      /* Bypass vendor specific and voice settings if enhanced eSCO supported */
      if (!(bluetooth::shim::GetController()->IsSupported(
      if (!(bluetooth::shim::GetController()->IsSupported(
              bluetooth::hci::OpCode::ENHANCED_SETUP_SYNCHRONOUS_CONNECTION))) {
              bluetooth::hci::OpCode::ENHANCED_SETUP_SYNCHRONOUS_CONNECTION))) {
        BTM_WriteVoiceSettings(BTM_VOICE_SETTING_CVSD);
        get_btm_client_interface().sco.BTM_WriteVoiceSettings(
            BTM_VOICE_SETTING_CVSD);
      }
      }


      /* If SCO open was initiated by AG and failed for mSBC T2, try mSBC T1
      /* If SCO open was initiated by AG and failed for mSBC T2, try mSBC T1
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,7 +27,7 @@
#include "internal_include/bt_target.h"
#include "internal_include/bt_target.h"
#include "osi/include/allocator.h"
#include "osi/include/allocator.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/sdp_api.h"
#include "stack/include/sdp_api.h"
#include "types/raw_address.h"
#include "types/raw_address.h"


@@ -440,7 +440,7 @@ tBTA_STATUS bta_hf_client_api_enable(tBTA_HF_CLIENT_CBACK* p_cback,
  bta_hf_client_create_record(&bta_hf_client_cb_arr, p_service_name);
  bta_hf_client_create_record(&bta_hf_client_cb_arr, p_service_name);


  /* set same setting as AG does */
  /* set same setting as AG does */
  BTM_WriteVoiceSettings(AG_VOICE_SETTINGS);
  get_btm_client_interface().sco.BTM_WriteVoiceSettings(AG_VOICE_SETTINGS);


  bta_sys_collision_register(BTA_ID_HS, bta_hf_client_collision_cback);
  bta_sys_collision_register(BTA_ID_HS, bta_hf_client_collision_cback);