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

Commit 79a686f5 authored by En-Shuo Hsu's avatar En-Shuo Hsu
Browse files

floss: Remove ESCO_DATA_PATH

Rely on the original SCO parameter to decide the data path.

Bug: 195344796
Tag: #floss
Test: Build and verify with device for non-offload case
Change-Id: Ib54b08f1f425107820cca808bc55aad4d75d875d
parent 92ddf9c0
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -166,9 +166,6 @@ static void btm_esco_conn_rsp(uint16_t sco_inx, uint8_t hci_status,
    /* Use Enhanced Synchronous commands if supported */
    if (controller_get_interface()
            ->supports_enhanced_setup_synchronous_connection()) {
      /* Use the saved SCO routing */
      p_setup->input_data_path = p_setup->output_data_path = ESCO_DATA_PATH;

      BTM_TRACE_DEBUG(
          "%s: txbw 0x%x, rxbw 0x%x, lat 0x%x, retrans 0x%02x, "
          "pkt 0x%04x, path %u",
@@ -439,8 +436,6 @@ static tBTM_STATUS btm_send_connect_request(uint16_t acl_handle,
            ->supports_enhanced_setup_synchronous_connection()) {
      LOG_INFO("Sending enhanced SCO connect request over handle:0x%04x",
               acl_handle);
      /* Use the saved SCO routing */
      p_setup->input_data_path = p_setup->output_data_path = ESCO_DATA_PATH;
      LOG(INFO) << __func__ << std::hex << ": enhanced parameter list"
                << " txbw=0x" << unsigned(p_setup->transmit_bandwidth)
                << ", rxbw=0x" << unsigned(p_setup->receive_bandwidth)
@@ -1304,9 +1299,6 @@ static tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
    /* Use Enhanced Synchronous commands if supported */
    if (controller_get_interface()
            ->supports_enhanced_setup_synchronous_connection()) {
      /* Use the saved SCO routing */
      p_setup->input_data_path = p_setup->output_data_path = ESCO_DATA_PATH;

      btsnd_hcic_enhanced_set_up_synchronous_connection(p_sco->hci_handle,
                                                        p_setup);
      p_setup->packet_types = saved_packet_types;
+0 −8
Original line number Diff line number Diff line
@@ -25,14 +25,6 @@

constexpr uint16_t kMaxScoLinks = static_cast<uint16_t>(BTM_MAX_SCO_LINKS);

#ifndef ESCO_DATA_PATH
#ifdef OS_ANDROID
#define ESCO_DATA_PATH ESCO_DATA_PATH_PCM
#else
#define ESCO_DATA_PATH ESCO_DATA_PATH_HCI
#endif
#endif

// SCO-over-HCI audio related definitions
namespace bluetooth::audio::sco {

+0 −13
Original line number Diff line number Diff line
@@ -25,17 +25,6 @@
#include "stack/btm/btm_sco.h"
#include "udrv/include/uipc.h"

#if ESCO_DATA_PATH == ESCO_DATA_PATH_PCM
// For hardware encoding path, provide an empty implementation

namespace bluetooth::audio::sco {
void open() {}
void cleanup() {}
size_t read(uint8_t*, uint32_t) { return 0; }
size_t write(const uint8_t*, uint32_t) { return 0; }
}  // namespace bluetooth::audio::sco
#else

#define SCO_DATA_READ_POLL_MS 10
#define SCO_HOST_DATA_PATH "/var/run/bluetooth/audio/.sco_data"
// TODO(b/198260375): Make SCO data owner group configurable.
@@ -111,5 +100,3 @@ size_t write(const uint8_t* p_buf, uint32_t len) {
}  // namespace sco
}  // namespace audio
}  // namespace bluetooth

#endif