Loading system/audio_hal_interface/a2dp_encoding.h +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public: return BluetoothAudioStatus::FAILURE; } virtual BluetoothAudioStatus SuspendStream() const { return BluetoothAudioStatus::FAILURE; } virtual BluetoothAudioStatus StopStream() const { return SuspendStream(); } virtual BluetoothAudioStatus SetLatencyMode(bool /*low_latency*/) const { return BluetoothAudioStatus::FAILURE; } Loading system/audio_hal_interface/aidl/a2dp/a2dp_encoding_aidl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ BluetoothAudioStatus A2dpTransport::SuspendRequest() { void A2dpTransport::StopRequest() { log::info(""); auto status = bluetooth_audio_port_->SuspendStream(); auto status = bluetooth_audio_port_->StopStream(); a2dp_pending_cmd_ = status == BluetoothAudioStatus::PENDING ? A2DP_CTRL_CMD_STOP : A2DP_CTRL_CMD_NONE; } Loading system/btif/src/btif_a2dp_source.cc +16 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,7 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { // Check if the stream has already been started. if (btif_av_stream_started_ready(A2dpType::kSource)) { log::verbose("stream is already started"); return BluetoothAudioStatus::SUCCESS; } Loading @@ -386,6 +387,7 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { // Check if the stream is already suspended. if (!btif_av_stream_started_ready(A2dpType::kSource)) { btif_av_clear_remote_suspend_flag(A2dpType::kSource); log::verbose("stream is already suspended"); return BluetoothAudioStatus::SUCCESS; } Loading @@ -395,6 +397,20 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { return BluetoothAudioStatus::PENDING; } BluetoothAudioStatus StopStream() const override { // Check if the stream is already suspended. if (!btif_av_stream_started_ready(A2dpType::kSource)) { btif_av_clear_remote_suspend_flag(A2dpType::kSource); log::verbose("stream is already stopped"); return BluetoothAudioStatus::SUCCESS; } // Post stop event. The stop request is pending, but completion is not // notified to the HAL. btif_av_stream_stop(RawAddress::kEmpty); return BluetoothAudioStatus::PENDING; } BluetoothAudioStatus SetLatencyMode(bool low_latency) const override { btif_av_set_low_latency(low_latency); return BluetoothAudioStatus::SUCCESS; Loading Loading
system/audio_hal_interface/a2dp_encoding.h +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public: return BluetoothAudioStatus::FAILURE; } virtual BluetoothAudioStatus SuspendStream() const { return BluetoothAudioStatus::FAILURE; } virtual BluetoothAudioStatus StopStream() const { return SuspendStream(); } virtual BluetoothAudioStatus SetLatencyMode(bool /*low_latency*/) const { return BluetoothAudioStatus::FAILURE; } Loading
system/audio_hal_interface/aidl/a2dp/a2dp_encoding_aidl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ BluetoothAudioStatus A2dpTransport::SuspendRequest() { void A2dpTransport::StopRequest() { log::info(""); auto status = bluetooth_audio_port_->SuspendStream(); auto status = bluetooth_audio_port_->StopStream(); a2dp_pending_cmd_ = status == BluetoothAudioStatus::PENDING ? A2DP_CTRL_CMD_STOP : A2DP_CTRL_CMD_NONE; } Loading
system/btif/src/btif_a2dp_source.cc +16 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,7 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { // Check if the stream has already been started. if (btif_av_stream_started_ready(A2dpType::kSource)) { log::verbose("stream is already started"); return BluetoothAudioStatus::SUCCESS; } Loading @@ -386,6 +387,7 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { // Check if the stream is already suspended. if (!btif_av_stream_started_ready(A2dpType::kSource)) { btif_av_clear_remote_suspend_flag(A2dpType::kSource); log::verbose("stream is already suspended"); return BluetoothAudioStatus::SUCCESS; } Loading @@ -395,6 +397,20 @@ class A2dpAudioPort : public bluetooth::audio::a2dp::BluetoothAudioPort { return BluetoothAudioStatus::PENDING; } BluetoothAudioStatus StopStream() const override { // Check if the stream is already suspended. if (!btif_av_stream_started_ready(A2dpType::kSource)) { btif_av_clear_remote_suspend_flag(A2dpType::kSource); log::verbose("stream is already stopped"); return BluetoothAudioStatus::SUCCESS; } // Post stop event. The stop request is pending, but completion is not // notified to the HAL. btif_av_stream_stop(RawAddress::kEmpty); return BluetoothAudioStatus::PENDING; } BluetoothAudioStatus SetLatencyMode(bool low_latency) const override { btif_av_set_low_latency(low_latency); return BluetoothAudioStatus::SUCCESS; Loading