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

Commit b35c8d2f authored by Yuyang Huang's avatar Yuyang Huang
Browse files

add implementation for StopRequest and GetPresentationPosition

Bug: 294134504
Bug: 315234036
Test: mmm packages/modules/Bluetooth/system/audio_hal_interface
Change-Id: Ie58699282081acb9343227eae98924702fa7557a
parent 9bae1793
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -121,12 +121,6 @@ BluetoothAudioCtrlAck HfpTransport::SuspendRequest() {

void HfpTransport::SetLatencyMode(LatencyMode latency_mode) {}

bool GetPresentationPosition(uint64_t* remote_delay_report_ns,
                             uint64_t* total_bytes_read,
                             timespec* data_position) {
  return false;
}

void HfpTransport::SourceMetadataChanged(
    const source_metadata_v7_t& source_metadata) {}

@@ -134,6 +128,12 @@ void HfpTransport::SinkMetadataChanged(const sink_metadata_v7_t&) {}

void HfpTransport::ResetPresentationPosition() {}

bool HfpTransport::GetPresentationPosition(uint64_t* remote_delay_report_ns,
                                           uint64_t* total_bytes_read,
                                           timespec* data_position) {
  return false;
}

// Source / sink functions
HfpDecodingTransport::HfpDecodingTransport(SessionType session_type)
    : IBluetoothSinkTransportInstance(session_type, (AudioConfiguration){}) {
@@ -185,6 +185,8 @@ uint8_t HfpDecodingTransport::GetPendingCmd() const {

void HfpDecodingTransport::ResetPendingCmd() { transport_->ResetPendingCmd(); }

void HfpDecodingTransport::StopRequest() { transport_->StopRequest(); }

HfpEncodingTransport::HfpEncodingTransport(SessionType session_type)
    : IBluetoothSourceTransportInstance(session_type, (AudioConfiguration){}) {
  transport_ = new HfpTransport();
@@ -200,6 +202,8 @@ BluetoothAudioCtrlAck HfpEncodingTransport::SuspendRequest() {
  return transport_->SuspendRequest();
}

void HfpEncodingTransport::StopRequest() { transport_->StopRequest(); }

void HfpEncodingTransport::SetLatencyMode(LatencyMode latency_mode) {
  transport_->SetLatencyMode(latency_mode);
}