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

Commit ccb35a8a authored by Jeremy Wu's avatar Jeremy Wu Committed by Gerrit Code Review
Browse files

Merge "Floss: update eSCO params for offloading"

parents 813103c2 c66acc98
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -415,6 +415,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) {

  /* Configure input/output data path based on HAL settings. */
  hfp_hal_interface::set_codec_datapath(esco_codec);
  hfp_hal_interface::update_esco_parameters(&params);

  /* If initiating, setup parameters to start SCO/eSCO connection */
  if (is_orig) {
+2 −0
Original line number Diff line number Diff line
@@ -87,4 +87,6 @@ void notify_sco_connection_change(RawAddress device, bool is_connected,
  // Do nothing since this is handled by Android's audio hidl.
}

// On Android, this is a no-op because the settings default to work for Android.
void update_esco_parameters(enh_esco_params_t* p_parms) {}
}  // namespace hfp_hal_interface
+2 −0
Original line number Diff line number Diff line
@@ -91,4 +91,6 @@ int get_packet_size(int codec);
void notify_sco_connection_change(RawAddress device, bool is_connected,
                                  int codec);

// Update eSCO parameters
void update_esco_parameters(enh_esco_params_t* p_parms);
}  // namespace hfp_hal_interface
+9 −0
Original line number Diff line number Diff line
@@ -450,4 +450,13 @@ void notify_sco_connection_change(RawAddress device, bool is_connected,
  close(fd);
}

void update_esco_parameters(enh_esco_params_t* p_parms) {
  if (get_offload_enabled()) {
    p_parms->input_transport_unit_size = 0x01;
    p_parms->output_transport_unit_size = 0x01;
  } else {
    p_parms->input_transport_unit_size = 0x00;
    p_parms->output_transport_unit_size = 0x00;
  }
}
}  // namespace hfp_hal_interface