-
Notifications
You must be signed in to change notification settings - Fork 189
/
bluealsa-api.txt
180 lines (116 loc) · 6.7 KB
/
bluealsa-api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
Manager hierarchy
=================
Service org.bluealsa[.unique ID]
Interface org.bluealsa.Manager1
Object path [variable prefix]/
Properties string Version [readonly]
Version of BlueALSA service.
array{string} Adapters [readonly]
Used HCI adapters. The device names ("hci0", etc.) of
Bluetooth adapters that the BlueALSA service is using.
array{string} Profiles [readonly]
Used (enabled) Bluetooth profiles.
array{string} Codecs [readonly]
Used (enabled) Bluetooth audio codecs. The Bluetooth
audio codec name format: "<profile-name>:<codec-name>"
PCM hierarchy
=============
Service org.bluealsa[.unique ID]
Interface org.bluealsa.PCM1
Object path [variable prefix]/{hci0,...}/dev_XX_XX_XX_XX_XX_XX/[type]/[mode]
Methods fd, fd Open()
Open BlueALSA PCM stream. This method returns two file
descriptors, respectively PCM stream PIPE and PCM
controller SEQPACKET socket.
Controller socket commands: "Drain", "Drop", "Pause",
"Resume"
Possible Errors: dbus.Error.InvalidArguments
dbus.Error.NotSupported
dbus.Error.Failed
array{string, dict} GetCodecs()
Return the array of additional PCM codecs. Client can
switch to one of these codecs with the SelectCodec()
D-Bus method call.
void SelectCodec(string codec, dict props)
Select PCM codec. This call shall be made before PCM
stream opening for given transport type, otherwise the
ongoing stream (or PCM counterpart: sink, source) will
be terminated.
For A2DP codecs, client can override built-in logic
for selecting codec configuration by providing the
configuration blob via the "Configuration" property.
Possible Errors: dbus.Error.InvalidArguments
dbus.Error.NotSupported
dbus.Error.Failed
Properties object Device [readonly]
BlueZ device object path.
uint32 Sequence [readonly]
This property indicates the sequence in which devices
connected. The larger the value, the later the device
was connected.
string Transport [readonly]
Underlying Bluetooth transport type.
Possible values: "A2DP-sink", "A2DP-source", "HFP-AG",
"HFP-HF", "HSP-AG" or "HSP-HS"
string Mode [readonly]
PCM stream operation mode (direction).
Possible values: "sink" or "source"
boolean Running [readonly]
This property is true when the Bluetooth transport for
this PCM is acquired and able to transfer audio samples.
uint16 Format [readonly]
Stream format identifier. The highest two bits of the
16-bit identifier determine the signedness and the
endianness. Next 6 bits determine the physical width
of a sample in bytes. The lowest 8 bits are used to
store the actual sample bit-width.
Examples: 0x4210 - unsigned 16-bit 2 bytes big-endian
0x8418 - signed 24-bit 4 bytes little-endian
byte Channels [readonly]
Number of audio channels.
uint32 Sampling [readonly]
Sampling frequency.
uint16 Codec [readonly]
Bluetooth transport codec. The meaning of this value
depends on the Bluetooth transport type. This property
is available only when transport codec is selected.
array{byte} CodecConfiguration [readonly]
Optional. Bluetooth transport codec configuration blob.
This property is available only for transports which
support codec configuration (e.g. A2DP).
uint16 Delay [readonly]
Approximate PCM delay in 1/10 of millisecond.
boolean SoftVolume [readwrite]
This property determines whether BlueALSA will make
volume control internally or will delegate this task
to BlueALSA PCM client or connected Bluetooth device
respectively for PCM sink or PCM source.
uint16 Volume [readwrite]
This property holds volume (loudness) value and mute
information for channel 1 (left) and 2 (right). Data
for channel 1 is stored in the upper byte, channel 2
is stored in the lower byte. The highest bit of both
bytes determines whether channel is muted.
Possible A2DP values: 0-127
Possible SCO values: 0-15
RFCOMM hierarchy
================
Service org.bluealsa[.unique ID]
Interface org.bluealsa.RFCOMM1
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/rfcomm
Methods fd Open()
Open RFCOMM socket for dispatching AT commands not
handled internally by BlueALSA. This method returns
a SEQPACKET socket.
Possible Errors: dbus.Error.NotSupported
dbus.Error.Failed
Properties string Transport [readonly]
HFP/HSP transport type.
Possible values: "HFP-AG", "HFP-HF", "HSP-AG" or
"HSP-HS"
uint32 Features [readonly]
HFP feature bitmask. Note, that this value depends on
the connection mode.
byte Battery [readonly]
Remote device battery level.
Possible values: 0-100 or -1