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

Commit 1b121a28 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge "One libbluetooth_audio_session" am: ce1e0c72 am: bf10e12b am: 8b812349

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1570661

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6a5b3d05bddfdaaf7371b8af71361a5836078d02
parents 348ec099 8b812349
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@
#include <fmq/MessageQueue.h>
#include <hidl/MQDescriptor.h>

#include "BluetoothAudioSessionReport.h"
#include "BluetoothAudioSupportedCodecsDB.h"
#include "BluetoothAudioSessionReport_2_1.h"
#include "BluetoothAudioSupportedCodecsDB_2_1.h"

namespace android {
namespace hardware {
@@ -32,7 +32,7 @@ namespace audio {
namespace V2_1 {
namespace implementation {

using ::android::bluetooth::audio::BluetoothAudioSessionReport;
using ::android::bluetooth::audio::BluetoothAudioSessionReport_2_1;
using ::android::hardware::kSynchronizedReadWrite;
using ::android::hardware::MessageQueue;
using ::android::hardware::Void;
@@ -81,7 +81,7 @@ Return<void> A2dpOffloadAudioProvider::startSession(

Return<void> A2dpOffloadAudioProvider::onSessionReady(
    startSession_cb _hidl_cb) {
  BluetoothAudioSessionReport::OnSessionStarted(session_type_, stack_iface_,
  BluetoothAudioSessionReport_2_1::OnSessionStarted(session_type_, stack_iface_,
                                                    nullptr, audio_config_);
  _hidl_cb(BluetoothAudioStatus::SUCCESS, DataMQ::Descriptor());
  return Void();
+4 −4
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@

#include <android-base/logging.h>

#include "BluetoothAudioSessionReport.h"
#include "BluetoothAudioSupportedCodecsDB.h"
#include "BluetoothAudioSessionReport_2_1.h"
#include "BluetoothAudioSupportedCodecsDB_2_1.h"

namespace android {
namespace hardware {
@@ -30,7 +30,7 @@ namespace audio {
namespace V2_1 {
namespace implementation {

using ::android::bluetooth::audio::BluetoothAudioSessionReport;
using ::android::bluetooth::audio::BluetoothAudioSessionReport_2_1;
using ::android::hardware::Void;
using ::android::hardware::bluetooth::audio::V2_0::AudioConfiguration;

@@ -96,7 +96,7 @@ Return<void> A2dpSoftwareAudioProvider::startSession(
Return<void> A2dpSoftwareAudioProvider::onSessionReady(
    startSession_cb _hidl_cb) {
  if (mDataMQ && mDataMQ->isValid()) {
    BluetoothAudioSessionReport::OnSessionStarted(
    BluetoothAudioSessionReport_2_1::OnSessionStarted(
        session_type_, stack_iface_, mDataMQ->getDesc(), audio_config_);
    _hidl_cb(BluetoothAudioStatus::SUCCESS, *mDataMQ->getDesc());
  } else {
+1 −23
Original line number Diff line number Diff line
@@ -16,29 +16,7 @@ cc_library_shared {
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "libbase",
        "libbluetooth_audio_session_2_1",
        "libcutils",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libutils",
    ],
}

cc_library_shared {
    name: "libbluetooth_audio_session_2_1",
    defaults: ["hidl_defaults"],
    vendor: true,
    srcs: [
        "session/BluetoothAudioSession.cpp",
        "session/BluetoothAudioSupportedCodecsDB.cpp",
    ],
    export_include_dirs: ["session/"],
    header_libs: ["libhardware_headers"],
    shared_libs: [
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "libbase",
        "libbluetooth_audio_session",
        "libcutils",
        "libfmq",
        "libhidlbase",
+8 −8
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@

#include <android-base/logging.h>

#include "BluetoothAudioSessionReport.h"
#include "BluetoothAudioSupportedCodecsDB.h"
#include "BluetoothAudioSessionReport_2_1.h"
#include "BluetoothAudioSupportedCodecsDB_2_1.h"

namespace android {
namespace hardware {
@@ -30,7 +30,7 @@ namespace audio {
namespace V2_1 {
namespace implementation {

using ::android::bluetooth::audio::BluetoothAudioSessionReport;
using ::android::bluetooth::audio::BluetoothAudioSessionReport_2_1;
using ::android::hardware::kSynchronizedReadWrite;
using ::android::hardware::MessageQueue;
using ::android::hardware::Void;
@@ -105,7 +105,7 @@ Return<void> BluetoothAudioProvider::streamStarted(
   * HAL server should start the streaming on data path.
   */
  if (stack_iface_) {
    BluetoothAudioSessionReport::ReportControlStatus(session_type_, true,
    BluetoothAudioSessionReport_2_1::ReportControlStatus(session_type_, true,
                                                         status);
  } else {
    LOG(WARNING) << __func__ << " - SessionType=" << toString(session_type_)
@@ -125,7 +125,7 @@ Return<void> BluetoothAudioProvider::streamSuspended(
   * HAL server should suspend the streaming on data path.
   */
  if (stack_iface_) {
    BluetoothAudioSessionReport::ReportControlStatus(session_type_, false,
    BluetoothAudioSessionReport_2_1::ReportControlStatus(session_type_, false,
                                                         status);
  } else {
    LOG(WARNING) << __func__ << " - SessionType=" << toString(session_type_)
@@ -139,7 +139,7 @@ Return<void> BluetoothAudioProvider::endSession() {
  LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);

  if (stack_iface_) {
    BluetoothAudioSessionReport::OnSessionEnded(session_type_);
    BluetoothAudioSessionReport_2_1::OnSessionEnded(session_type_);
    stack_iface_->unlinkToDeath(death_recipient_);
  } else {
    LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@

#include <android-base/logging.h>

#include "BluetoothAudioSupportedCodecsDB.h"
#include "BluetoothAudioSupportedCodecsDB_2_1.h"

namespace android {
namespace hardware {
Loading