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

Commit 121eb18b authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Automerger Merge Worker
Browse files

leaudio: Fix build on Linux am: e404389f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1859539

Change-Id: Ie59b875a04263969ac50d985cd2244f343bb85a0
parents 0e7c3d42 e404389f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ cc_library_static {
        "vc/vc.cc",
        "le_audio/client.cc",
        "le_audio/devices.cc",
        "le_audio/hal_verifier.cc",
        "le_audio/state_machine.cc",
        "le_audio/client_parser.cc",
        "le_audio/client_audio.cc",
@@ -134,6 +135,10 @@ cc_library_static {
        "avrcp-target-service",
        "lib-bt-packets",
    ],
    shared_libs: [
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
    ],
    host_supported: true,
}

@@ -468,6 +473,7 @@ cc_test {
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs : [
        ":TestMockBtaLeAudioHalVerifier",
        "gatt/database.cc",
        "gatt/database_builder.cc",
        "le_audio/client.cc",
@@ -487,6 +493,8 @@ cc_test {
        "test/common/mock_device_groups.cc",
    ],
    shared_libs: [
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "libprotobuf-cpp-lite",
        "libcrypto",
        "liblog",
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ static_library("bta") {
    "jv/bta_jv_act.cc",
    "jv/bta_jv_api.cc",
    "jv/bta_jv_cfg.cc",
    "le_audio/client_linux.cc",
    "le_audio/hal_verifier_linux.cc",
    "pan/bta_pan_act.cc",
    "pan/bta_pan_api.cc",
    "pan/bta_pan_ci.cc",
+9 −0
Original line number Diff line number Diff line
@@ -17,9 +17,18 @@

#pragma once

#include <base/bind.h>
#include <base/callback.h>
#include <base/callback_forward.h>
#include <hardware/bt_le_audio.h>

#include <vector>

class LeAudioHalVerifier {
 public:
  static bool SupportsLeAudio();
};

/* Interface class */
class LeAudioClient {
 public:
+46 −0
Original line number Diff line number Diff line
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "bta_le_audio_api.h"

class LeAudioClientImpl : public LeAudioClient {
 public:
  LeAudioClientImpl(void) = default;
  ~LeAudioClientImpl(void) override = default;

  void RemoveDevice(const RawAddress& address) override {}
  void Connect(const RawAddress& address) override {}
  void Disconnect(const RawAddress& address) override {}
  void GroupAddNode(const int group_id, const RawAddress& addr) override {}
  void GroupRemoveNode(const int group_id, const RawAddress& addr) override {}
  void GroupStream(const int group_id, const uint16_t content_type) override {}
  void GroupSuspend(const int group_id) override {}
  void GroupStop(const int group_id) override {}
  void GroupDestroy(const int group_id) override {}
  void GroupSetActive(const int group_id) override {}
  std::vector<RawAddress> GetGroupDevices(const int group_id) override {
    return {};
  }
};

void LeAudioClient::Initialize(
    bluetooth::le_audio::LeAudioClientCallbacks* callbacks,
    base::Closure initCb, base::Callback<bool()> hal_2_1_verifier) {}
void LeAudioClient::Cleanup(void) {}
LeAudioClient* LeAudioClient::Get(void) { return nullptr; }
void LeAudioClient::DebugDump(int fd) {}
void LeAudioClient::AddFromStorage(const RawAddress& addr, bool autoconnect) {}
bool LeAudioClient::IsLeAudioClientRunning() { return false; }
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "audio_hal_interface/hal_version_manager.h"
#include "bta_le_audio_api.h"

bool LeAudioHalVerifier::SupportsLeAudio() {
  return bluetooth::audio::HalVersionManager::GetHalVersion() ==
         bluetooth::audio::BluetoothAudioHalVersion::VERSION_2_1;
}
Loading