diff options
author | David Stevens <stevensd@google.com> | 2015-05-07 14:21:54 -0700 |
---|---|---|
committer | David Stevens <stevensd@google.com> | 2015-05-13 11:01:33 -0700 |
commit | 8bdc207120d71925cd7975341445475fbaeda5b4 (patch) | |
tree | dc2b56d18939823a727e7498d83d2d5a264c6bba | |
parent | 4c29bb56021cd90bce86fdd9971d3407a3533242 (diff) | |
download | shamu-8bdc207120d71925cd7975341445475fbaeda5b4.tar.gz |
Add bt_shamu build for Bluetooth profile testing
This is the same as aosp_shamu, but with the HFP client, A2DP sink, and
AVRCP controller profiles enabled.
Bug: 20950203
Change-Id: I96022b9dba4769aa08518dd642522eb413e307e3
-rw-r--r-- | AndroidProducts.mk | 3 | ||||
-rw-r--r-- | BoardConfig.mk | 4 | ||||
-rw-r--r-- | audio_policy.conf | 8 | ||||
-rw-r--r-- | bluetooth_extra/bdroid_buildcfg.h | 30 | ||||
-rw-r--r-- | bt_shamu.mk | 30 | ||||
-rw-r--r-- | overlay_bt/packages/apps/Bluetooth/res/values/config.xml | 19 |
6 files changed, 93 insertions, 1 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 14859791..ac438d09 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,4 +15,5 @@ # PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/aosp_shamu.mk + $(LOCAL_DIR)/aosp_shamu.mk \ + $(LOCAL_DIR)/bt_shamu.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index 9a75ed3a..e0e30cb2 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -64,7 +64,11 @@ WIFI_BUS := PCIE #Bluetooth defines BOARD_HAVE_BLUETOOTH_BCM := true +ifeq ($(TARGET_PRODUCT),bt_shamu) +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/moto/shamu/bluetooth_extra +else BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/moto/shamu/bluetooth +endif TARGET_NO_RADIOIMAGE := true TARGET_BOARD_PLATFORM := msm8084 diff --git a/audio_policy.conf b/audio_policy.conf index fcba153f..9fe0ed9a 100644 --- a/audio_policy.conf +++ b/audio_policy.conf @@ -77,6 +77,14 @@ audio_hw_modules { devices AUDIO_DEVICE_OUT_ALL_A2DP } } + inputs { + a2dp { + sampling_rates 44100|48000 + channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP + } + } } usb { outputs { diff --git a/bluetooth_extra/bdroid_buildcfg.h b/bluetooth_extra/bdroid_buildcfg.h new file mode 100644 index 00000000..50f1971d --- /dev/null +++ b/bluetooth_extra/bdroid_buildcfg.h @@ -0,0 +1,30 @@ +/* + * Copyright 2015 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. + */ + +#ifndef _BDROID_BUILDCFG_H +#define _BDROID_BUILDCFG_H + +#define BTM_WBS_INCLUDED TRUE +#define BTIF_HF_WBS_PREFERRED TRUE +#define BLE_VND_INCLUDED TRUE + +/* Handsfree device */ +#define BTA_DM_COD {0x20, 0x04, 0x08} + +/* Enable A2DP sink */ +#define BTA_AV_SINK_INCLUDED TRUE + +#endif diff --git a/bt_shamu.mk b/bt_shamu.mk new file mode 100644 index 00000000..4c055df0 --- /dev/null +++ b/bt_shamu.mk @@ -0,0 +1,30 @@ +# +# Copyright 2015 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. +# + +$(call inherit-product, device/moto/shamu/aosp_shamu.mk) + +# Add overlay to enable extra Bluetooth profiles +DEVICE_PACKAGE_OVERLAYS += \ + device/moto/shamu/overlay_bt + +PRODUCT_NAME := bt_shamu +PRODUCT_DEVICE := shamu +PRODUCT_BRAND := Android +PRODUCT_MODEL := BT Shamu +PRODUCT_MANUFACTURER := motorola +PRODUCT_RESTRICT_VENDOR_FILES := true + +AUDIO_FEATURE_ENABLED_HFP := true diff --git a/overlay_bt/packages/apps/Bluetooth/res/values/config.xml b/overlay_bt/packages/apps/Bluetooth/res/values/config.xml new file mode 100644 index 00000000..c1794b2c --- /dev/null +++ b/overlay_bt/packages/apps/Bluetooth/res/values/config.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009-2012 Broadcom Corporation + 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> + <bool name="profile_supported_a2dp_sink">true</bool> + <bool name="profile_supported_avrcp_controller">true</bool> + <bool name="profile_supported_hfpclient">true</bool> +</resources> |