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

Commit 8afd1760 authored by Qasim Javed's avatar Qasim Javed Committed by Android (Google) Code Review
Browse files

Merge "Disable OPUS codec when using A2DP HIDL HAL." into tm-qpr-dev

parents 9ac5f037 9e53b50f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -145,6 +145,16 @@ void set_audio_low_latency_mode_allowed(bool allowed) {
  }
}

// Check if OPUS codec is supported
bool is_opus_supported() {
  // OPUS codec was added after HIDL HAL was frozen
  if (HalVersionManager::GetHalTransport() ==
      BluetoothAudioHalTransport::AIDL) {
    return true;
  }
  return false;
}

}  // namespace a2dp
}  // namespace audio
}  // namespace bluetooth
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ size_t read(uint8_t* p_buf, uint32_t len);
// Update A2DP delay report to BluetoothAudio HAL
void set_remote_delay(uint16_t delay_report);

// Check whether OPUS is supported
bool is_opus_supported();

}  // namespace a2dp
}  // namespace audio
}  // namespace bluetooth
+3 −0
Original line number Diff line number Diff line
@@ -272,6 +272,9 @@ size_t read(uint8_t* p_buf, uint32_t len) {
  return bytes_read;
}

// Check if OPUS codec is supported
bool is_opus_supported() { return true; }

}  // namespace a2dp
}  // namespace audio
}  // namespace bluetooth
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ struct PresentationPosition {
// Invoked by audio server to check audio presentation position periodically.
PresentationPosition GetPresentationPosition();

bool is_opus_supported();

}  // namespace a2dp
}  // namespace audio
}  // namespace bluetooth
+3 −0
Original line number Diff line number Diff line
@@ -618,6 +618,9 @@ cc_test {
        "fluoride_defaults",
        "mts_defaults",
    ],
    cflags: [
        "-DUNIT_TESTS",
    ],
    test_suites: ["device-tests"],
    host_supported: true,
    test_options: {
Loading