• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #ifndef CRAS_BT_CONSTANTS_H_
7 #define CRAS_BT_CONSTANTS_H_
8 
9 #define BLUEZ_SERVICE "org.bluez"
10 
11 #define BLUEZ_INTERFACE_ADAPTER "org.bluez.Adapter1"
12 #define BLUEZ_INTERFACE_BATTERY_PROVIDER "org.bluez.BatteryProvider1"
13 #define BLUEZ_INTERFACE_BATTERY_PROVIDER_MANAGER                               \
14 	"org.bluez.BatteryProviderManager1"
15 #define BLUEZ_INTERFACE_DEVICE "org.bluez.Device1"
16 #define BLUEZ_INTERFACE_MEDIA "org.bluez.Media1"
17 #define BLUEZ_INTERFACE_MEDIA_ENDPOINT "org.bluez.MediaEndpoint1"
18 #define BLUEZ_INTERFACE_MEDIA_PLAYER "org.mpris.MediaPlayer2.Player"
19 #define BLUEZ_INTERFACE_MEDIA_TRANSPORT "org.bluez.MediaTransport1"
20 #define BLUEZ_INTERFACE_PLAYER "org.bluez.MediaPlayer1"
21 #define BLUEZ_INTERFACE_PROFILE "org.bluez.Profile1"
22 #define BLUEZ_PROFILE_MGMT_INTERFACE "org.bluez.ProfileManager1"
23 /* Remove once our D-Bus header files are updated to define this. */
24 #ifndef DBUS_INTERFACE_OBJECT_MANAGER
25 #define DBUS_INTERFACE_OBJECT_MANAGER "org.freedesktop.DBus.ObjectManager"
26 #endif
27 #define DBUS_SIGNAL_INTERFACES_ADDED "InterfacesAdded"
28 #define DBUS_SIGNAL_INTERFACES_REMOVED "InterfacesRemoved"
29 #define DBUS_SIGNAL_PROPERTIES_CHANGED "PropertiesChanged"
30 
31 /* UUIDs taken from lib/uuid.h in the BlueZ source */
32 #define HSP_HS_UUID "00001108-0000-1000-8000-00805f9b34fb"
33 #define HSP_AG_UUID "00001112-0000-1000-8000-00805f9b34fb"
34 
35 #define HFP_HF_UUID "0000111e-0000-1000-8000-00805f9b34fb"
36 #define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
37 
38 #define A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb"
39 #define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb"
40 
41 #define AVRCP_REMOTE_UUID "0000110e-0000-1000-8000-00805f9b34fb"
42 #define AVRCP_TARGET_UUID "0000110c-0000-1000-8000-00805f9b34fb"
43 
44 #define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805f9b34fb"
45 
46 /* Constants for CRAS BT player */
47 #define CRAS_DEFAULT_PLAYER "/org/chromium/Cras/Bluetooth/DefaultPlayer"
48 /* The longest possible player playback status is "forward-seek" */
49 #define CRAS_PLAYER_PLAYBACK_STATUS_SIZE_MAX 13 * sizeof(char)
50 #define CRAS_PLAYER_PLAYBACK_STATUS_DEFAULT "playing"
51 /* Neither BlueZ or the MRPIS specs limited the player identity max size, 128
52  * should be large enough for most.
53  */
54 #define CRAS_PLAYER_IDENTITY_SIZE_MAX 128 * sizeof(char)
55 #define CRAS_PLAYER_IDENTITY_DEFAULT "DefaultPlayer"
56 #define CRAS_PLAYER_METADATA_SIZE_MAX 128 * sizeof(char)
57 
58 #define CRAS_DEFAULT_BATTERY_PROVIDER                                          \
59 	"/org/chromium/Cras/Bluetooth/BatteryProvider"
60 #define CRAS_DEFAULT_BATTERY_PREFIX "/org/bluez/hci0/dev_"
61 
62 /* Instead of letting CRAS obtain the A2DP streaming packet size (a.k.a. AVDTP
63  * MTU) from BlueZ Media Transport, force the packet size to the default L2CAP
64  * packet size. This prevent the audio peripheral device to negotiate a larger
65  * packet size and later failed to fulfill it and causing audio artifact. This
66  * defined constant is for experiment only and is put back behind a
67  * chrome://flag.
68  */
69 #define A2DP_FIX_PACKET_SIZE 672
70 
71 #endif /* CRAS_BT_CONSTANTS_H_ */
72