8d5f56fd05
Pull in raspberry-vanilla's AOSP17 device tree changes for rpi4 while keeping all PawletOS customizations (A/B partition layout, sepolicy, zram, TWRP recovery scaffolding, ALSA HDMI pre-warm, product/overlay structure) intact on top. Upstream changes absorbed: - AOSP17 audio HAL refactor (StreamAlsa split into StreamAlsaBase/ StreamAlsaMonoPipe, Utils.cpp -> UtilsAlsa.cpp, new Bluetooth/stub helper classes, libeffects AIDL rebuild via *_ndk_shared defaults) - API level 36 -> 37, FCM matrix level 202504 -> 202604 - QuickSettings tile default split (SystemUIRpiOverlay, ported into pawlet_rpi_common where this overlay now lives) - vendor_tracing_descriptors added to enforce-product-packages-exist - misc AOSP17 logging header switch (android-base/logging.h -> Log.h) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
57 lines
2.3 KiB
C++
57 lines
2.3 KiB
C++
/*
|
|
* Copyright (C) 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.
|
|
*/
|
|
|
|
#define LOG_TAG "AHAL_ModuleBluetooth"
|
|
|
|
#include <Log.h>
|
|
|
|
#include "BluetoothAudioSession.h"
|
|
#include "core-impl/DevicePortProxy.h"
|
|
#include "core-impl/ModuleBluetooth.h"
|
|
|
|
using android::bluetooth::audio::aidl::BluetoothAudioPort;
|
|
using android::bluetooth::audio::aidl::BluetoothAudioPortAidlIn;
|
|
using android::bluetooth::audio::aidl::BluetoothAudioPortAidlOut;
|
|
|
|
// TODO(b/312265159) bluetooth audio should be in its own process
|
|
// Remove this and the shared_libs when that happens
|
|
extern "C" binder_status_t createIBluetoothAudioProviderFactory();
|
|
|
|
namespace aidl::android::hardware::audio::core {
|
|
|
|
ModuleBluetooth::ModuleBluetooth(std::unique_ptr<Module::Configuration>&& config)
|
|
: ModuleBluetoothBase(std::move(config)) {
|
|
// TODO(b/312265159) bluetooth audio should be in its own process
|
|
// Remove this and the shared_libs when that happens
|
|
binder_status_t status = createIBluetoothAudioProviderFactory();
|
|
if (status != STATUS_OK) {
|
|
LOG(ERROR) << __func__ << ": Failed to create bluetooth audio provider factory. Status: "
|
|
<< ::android::statusToString(status);
|
|
}
|
|
if (!::aidl::android::hardware::bluetooth::audio::BluetoothAudioSession::IsAidlAvailable()) {
|
|
LOG(ERROR) << __func__ << ": IBluetoothAudioProviderFactory AIDL service not available";
|
|
}
|
|
}
|
|
|
|
std::shared_ptr<BluetoothAudioPort> ModuleBluetooth::createProxyInstance(bool isInput) {
|
|
return isInput ? std::shared_ptr<BluetoothAudioPort>(
|
|
std::make_shared<BluetoothAudioPortAidlIn>())
|
|
: std::shared_ptr<BluetoothAudioPort>(
|
|
std::make_shared<BluetoothAudioPortAidlOut>());
|
|
}
|
|
|
|
} // namespace aidl::android::hardware::audio::core
|