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

Commit 24bcdab6 authored by Lauren Minchin's avatar Lauren Minchin Committed by Jeremy Wu
Browse files

Revert "Floss: implement le_audio_shim"

This reverts commit 155fb1bd.

Reason for revert: Investigating potential culprit for b/339380984

Change-Id: I78d034137ae634dbde19cd3158306b485e30d603
parent 3c7ccd11
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ cc_library_static {
        "gatt/gatt_ble_scanner_shim.cc",
        "gatt/gatt_shim.cc",
        "hfp/hfp_shim.cc",
        "le_audio/le_audio_shim.cc",
        "vc/vc_shim.cc",
    ],
    generated_headers: [
@@ -91,7 +90,6 @@ gensrcs {
        "src/profiles/csis.rs",
        "src/profiles/gatt.rs",
        "src/profiles/hfp.rs",
        "src/profiles/le_audio.rs",
        "src/profiles/vc.rs",
    ],
    output_extension: "rs.h",
@@ -110,7 +108,6 @@ gensrcs {
        "src/profiles/csis.rs",
        "src/profiles/gatt.rs",
        "src/profiles/hfp.rs",
        "src/profiles/le_audio.rs",
        "src/profiles/vc.rs",
    ],
    output_extension: "cc",
+0 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ cxxbridge_header("btif_bridge_header") {
    "src/profiles/csis.rs",
    "src/profiles/gatt.rs",
    "src/profiles/hfp.rs",
    "src/profiles/le_audio.rs",
    "src/profiles/vc.rs",
  ]
  all_dependent_configs = [ ":rust_topshim_config" ]
@@ -47,7 +46,6 @@ cxxbridge_cc("btif_bridge_code") {
    "src/profiles/csis.rs",
    "src/profiles/gatt.rs",
    "src/profiles/hfp.rs",
    "src/profiles/le_audio.rs",
    "src/profiles/vc.rs",
  ]
  deps = [
@@ -71,7 +69,6 @@ source_set("btif_cxx_bridge_code") {
    "gatt/gatt_ble_scanner_shim.cc",
    "gatt/gatt_shim.cc",
    "hfp/hfp_shim.cc",
    "le_audio/le_audio_shim.cc",
    "vc/vc_shim.cc",
    "metrics/metrics_shim.cc",
  ]
+0 −564

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −83
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.
 */

#pragma once

#include <memory>

#include "audio_hal_interface/le_audio_software_host.h"
#include "include/hardware/bt_le_audio.h"
#include "rust/cxx.h"
#include "types/raw_address.h"

namespace bluetooth {
namespace topshim {
namespace rust {

struct BtLeAudioCodecConfig;
enum class BtLeAudioDirection : uint8_t;
struct BtLePcmConfig;
struct SourceMetadata;
struct SinkMetadata;

class LeAudioClientIntf {
 public:
  LeAudioClientIntf(le_audio::LeAudioClientInterface* intf) : intf_(intf){};

  void init(
      /*
LeAudioClientCallbacks* callbacks,
const std::vector<le_audio::btle_audio_codec_config_t>& offloading_preference
*/);
  void connect(RawAddress addr);
  void disconnect(RawAddress addr);
  void set_enable_state(RawAddress addr, bool enabled);
  void cleanup();
  void remove_device(RawAddress addr);
  void group_add_node(int group_id, RawAddress addr);
  void group_remove_node(int group_id, RawAddress addr);
  void group_set_active(int group_id);
  void set_codec_config_preference(
      int group_id,
      BtLeAudioCodecConfig input_codec_config,
      BtLeAudioCodecConfig output_codec_config);
  void set_ccid_information(int ccid, int context_type);
  void set_in_call(bool in_call);
  void send_audio_profile_preferences(
      int group_id, bool is_output_preference_le_audio, bool is_duplex_preference_le_audio);
  void set_unicast_monitor_mode(BtLeAudioDirection direction, bool enable);

  // interface for audio server
  bool host_start_audio_request();
  void host_stop_audio_request();
  bool peer_start_audio_request();
  void peer_stop_audio_request();
  BtLePcmConfig get_host_pcm_config();
  BtLePcmConfig get_peer_pcm_config();
  bool get_host_stream_started();
  bool get_peer_stream_started();
  void source_metadata_changed(::rust::Vec<SourceMetadata> metadata);
  void sink_metadata_changed(::rust::Vec<SinkMetadata> metadata);

 private:
  le_audio::LeAudioClientInterface* intf_;
};

std::unique_ptr<LeAudioClientIntf> GetLeAudioClientProfile(const unsigned char* btif);

}  // namespace rust
}  // namespace topshim
}  // namespace bluetooth
+0 −703

File deleted.

Preview size limit exceeded, changes collapsed.

Loading