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

Commit c4cd266a authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge "le_audio: Move ASRC implementation to new direction system/audio/asrc" into main

parents c4f282de 796891c1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ cc_library_shared {
        "libbluetooth_core_rs_bridge",
        "libbluetooth_crypto_toolbox",
        "libbluetooth_gd",
        "libbt-audio-asrc",
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
+65 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_bt_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["system_bt_license"],
}

cc_library_static {
    name: "libbt-audio-asrc",
    defaults: [],
    srcs: [
        "asrc/asrc_resampler.cc",
        "asrc/asrc_tables.cc",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system/gd",
    ],
    shared_libs: [
        "libchrome",
    ],
    static_libs: [
        "libflatbuffers-cpp",
    ],
    host_supported: true,
    min_sdk_version: "33",
    apex_available: [
        "com.android.btservices",
    ],
}

cc_library_host_shared {
    name: "libasrc_resampler_test",
    defaults: ["bluetooth_cflags"],
    srcs: [
        "asrc/asrc_resampler_test.cc",
        "asrc/asrc_tables.cc",
    ],
    static_libs: [
        "libchrome",
        "libflatbuffers-cpp",
    ],
    stl: "libc++_static",
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
    ],
}

python_test_host {
    name: "asrc_resampler_test",
    main: "asrc/asrc_resampler_test.py",
    srcs: ["asrc/asrc_resampler_test.py"],
    libs: ["mobly"],
    data: [":libasrc_resampler_test"],
    test_config: "asrc/asrc_resampler_test.config",
    test_suites: ["general-tests"],
    test_options: {
        unit_test: false,
    },
}

system/audio/BUILD.gn

0 → 100644
+34 −0
Original line number Diff line number Diff line
#
#  Copyright 2015 Google, Inc.
#
#  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.
#

source_set("libbt-audio-asrc") {
  sources = [
    "asrc/asrc_tables.cc",
    "asrc/asrc_resampler.cc",
  ]

  include_dirs = [
    "asrc",
  ]

  configs += [
    "//bt/system:target_defaults",
  ]

  deps = [
    "//bt/system/gd:gd_default_deps"
  ]
}
+3 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#include "audio_source_hal_asrc.h"
#include "asrc_resampler.h"

#include <base/logging.h>
#include <base/strings/stringprintf.h>
@@ -25,7 +25,7 @@
#include "asrc_tables.h"
#include "hal/nocp_iso_clocker.h"

namespace le_audio {
namespace bluetooth::audio::asrc {

class SourceAudioHalAsrc::ClockRecovery : ::bluetooth::hal::NocpIsoHandler {
  const int interval_;
@@ -621,4 +621,4 @@ SourceAudioHalAsrc::Run(const std::vector<uint8_t>& in) {
  return out;
}

}  // namespace le_audio
}  // namespace bluetooth::audio::asrc
Loading