bluetooth: enable A2DP sink

* A2DP source and sink can coexist on Android 15.
  https://android-review.googlesource.com/q/topic:%22bt_a2dp_src_sink_coexist%22
* Fixes https://github.com/raspberry-vanilla/android_local_manifest/issues/188.
This commit is contained in:
Konsta
2025-03-01 18:41:53 +02:00
parent 6c7ec173b4
commit 51073dd508
7 changed files with 59 additions and 1 deletions

View File

@@ -15,8 +15,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
# Overlays
PRODUCT_PACKAGES += \
AndroidRpiOverlay \
SettingsRpiOverlay \
BluetoothRpiOverlay \
SettingsProviderRpiOverlay \
SettingsRpiOverlay \
SystemUIRpiOverlay \
WifiRpiOverlay

View File

@@ -84,6 +84,7 @@ include packages/services/Car/car_product/occupant_awareness/OccupantAwareness.m
# Overlays
PRODUCT_PACKAGES += \
AndroidRpiOverlay \
BluetoothRpiOverlay \
CarServiceRpiOverlay \
SettingsProviderRpiOverlay \
WifiRpiOverlay

View File

@@ -30,6 +30,7 @@ PRODUCT_COPY_FILES += \
# Overlays
PRODUCT_PACKAGES += \
AndroidTvRpiOverlay \
BluetoothRpiOverlay \
SettingsProviderTvRpiOverlay \
WifiRpiOverlay

View File

@@ -0,0 +1,10 @@
// Copyright (C) 2021-2022 KonstaKANG
//
// SPDX-License-Identifier: Apache-2.0
runtime_resource_overlay {
name: "BluetoothRpiOverlay",
resource_dirs: ["res"],
sdk_version: "current",
proprietary: true
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright (C) 2021-2022 KonstaKANG
**
** SPDX-License-Identifier: Apache-2.0
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.bluetooth.resources.rpi"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.bluetooth"
android:isStatic="true"
android:priority="0" />
</manifest>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2009-2012 Broadcom Corporation
Copyright (C) 2021-2022 KonstaKANG
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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- If true, device requests audio focus and start avrcp updates on source start or play -->
<bool name="a2dp_sink_automatically_request_audio_focus">true</bool>
</resources>

View File

@@ -9,8 +9,10 @@ ro.hardware.audio.primary=rpi_hdmi
# Bluetooth
bluetooth.device.class_of_device?=90,2,12
bluetooth.profile.a2dp.sink.enabled?=true
bluetooth.profile.a2dp.source.enabled?=true
bluetooth.profile.asha.central.enabled?=true
bluetooth.profile.avrcp.controller.enabled?=true
bluetooth.profile.avrcp.target.enabled?=true
bluetooth.profile.bap.broadcast.assist.enabled?=true
bluetooth.profile.bap.unicast.client.enabled?=true