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

Commit f2884f36 authored by Antoine Soulier's avatar Antoine Soulier Committed by Gerrit Code Review
Browse files

Merge changes Ib6e44620,I2a660d13 into main

* changes:
  LE Audio: Add ASRC in the software audio pipeline
  LE Audio: Fix ISO packets sequence numbers
parents 8837fe8e 8e29cde3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -324,6 +324,9 @@
    },
    {
      "name": "bluetooth_test_gdx_unit"
    },
    {
      "name": "asrc_resampler_test"
    }
  ]
}
+7 −0
Original line number Diff line number Diff line
@@ -55,3 +55,10 @@ flag {
    description: "Apply asymetric PHY setting for unidirectional CIS"
    bug: "314176433"
}

flag {
    name: "leaudio_hal_client_asrc"
    namespace: "bluetooth"
    description: "Sync audio stream with the bluetooth link clock"
    bug: "312273987"
}
+38 −0
Original line number Diff line number Diff line
@@ -100,7 +100,9 @@ cc_library_static {
        "hh/bta_hh_le.cc",
        "hh/bta_hh_main.cc",
        "hh/bta_hh_utils.cc",
        "le_audio/audio_hal_client/asrc_tables.cc",
        "le_audio/audio_hal_client/audio_sink_hal_client.cc",
        "le_audio/audio_hal_client/audio_source_hal_asrc.cc",
        "le_audio/audio_hal_client/audio_source_hal_client.cc",
        "le_audio/broadcaster/broadcaster.cc",
        "le_audio/broadcaster/broadcaster_types.cc",
@@ -806,8 +808,10 @@ cc_test {
        ":TestMockBtaLeAudioHalVerifier",
        ":TestMockMainShim",
        ":TestStubOsi",
        "le_audio/audio_hal_client/asrc_tables.cc",
        "le_audio/audio_hal_client/audio_hal_client_test.cc",
        "le_audio/audio_hal_client/audio_sink_hal_client.cc",
        "le_audio/audio_hal_client/audio_source_hal_asrc.cc",
        "le_audio/audio_hal_client/audio_source_hal_client.cc",
        "le_audio/client_parser.cc",
        "le_audio/client_parser_test.cc",
@@ -1243,3 +1247,37 @@ cc_test {
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_library_host_shared {
    name: "libasrc_resampler_test",
    defaults: ["bluetooth_cflags"],
    srcs: [
        "le_audio/audio_hal_client/asrc_resampler_test.cc",
        "le_audio/audio_hal_client/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: "le_audio/audio_hal_client/asrc_resampler_test.py",
    srcs: ["le_audio/audio_hal_client/asrc_resampler_test.py"],
    libs: ["mobly"],
    data: [":libasrc_resampler_test"],
    test_config: "le_audio/audio_hal_client/asrc_resampler_test.config",
    test_suites: ["general-tests"],
    test_options: {
        unit_test: false,
    },
}
+2 −0
Original line number Diff line number Diff line
@@ -89,7 +89,9 @@ static_library("bta") {
    "jv/bta_jv_act.cc",
    "jv/bta_jv_api.cc",
    "jv/bta_jv_cfg.cc",
    "le_audio/audio_hal_client/asrc_tables.cc",
    "le_audio/audio_hal_client/audio_sink_hal_client.cc",
    "le_audio/audio_hal_client/audio_source_hal_asrc.cc",
    "le_audio/audio_hal_client/audio_source_hal_client.cc",
    "le_audio/broadcaster/broadcaster.cc",
    "le_audio/broadcaster/broadcaster_types.cc",
+23 −0
Original line number Diff line number Diff line
#!/usr/bin/env python3
#
# Copyright 2023 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.
#

import numpy as np
import scipy.signal as signal

b, a = signal.butter(2, 1. / 60)
print(('a:' + ' {:17.10e}' * 2).format(*a[1:]))
print(('b:' + ' {:17.10e}' * 3).format(*b))
Loading