summaryrefslogtreecommitdiffstats
path: root/doc/audio-api.txt
blob: a73ba20dd902e65a231faa4846d2a7abcb4dcfa0 (plain)
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
BlueZ D-Bus Audio API description
*********************************

Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org>
Copyright (C) 2005-2007  Johan Hedberg <johan.hedberg@nokia.com>
Copyright (C) 2005-2006  Brad Midgley <bmidgley@xmission.com>


Headset hierarchy
=================

Service		org.bluez
Interface	org.bluez.Headset
Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX

Methods		void Connect()

			Connect to the HSP/HFP service on the remote device.

		void Disconnect()

			Disconnect from the HSP/HFP service on the remote
			device.

		boolean IsConnected() {deprecated}

			Returns TRUE if there is a active connection to the
			HSP/HFP connection on the remote device.

		void IndicateCall()

			Indicate an incoming call on the headset
			connected to the stream. Will continue to
			ring the headset about every 3 seconds.

		void CancelCall()

			Cancel the incoming call indication.

		void Play()

			Open the audio connection to the headset.

		void Stop()

			Close the audio connection.

		boolean IsPlaying() {deprecated}

			Returns true if an audio connection to the headset
			is active.

		uint16 GetSpeakerGain() {deprecated}

			Returns the current speaker gain if available,
			otherwise returns the error NotAvailable.

		uint16 GetMicrophoneGain() {deprecated}

			Returns the current microphone gain if available,
			otherwise returns the error NotAvailable.

		void SetSpeakerGain(uint16 gain) {deprecated}

			Changes the current speaker gain if possible.

		void SetMicrophoneGain(uint16 gain) {deprecated}

			Changes the current speaker gain if possible.

		dict GetProperties()

			Returns all properties for the interface. See the
			properties section for available properties.

			Possible Errors: org.bluez.Error.InvalidArguments

		void SetProperty(string name, variant value)

			Changes the value of the specified property. Only
			properties that are listed a read-write are changeable.
			On success this will emit a PropertyChanged signal.

			Possible Errors: org.bluez.Error.DoesNotExist
					 org.bluez.Error.InvalidArguments

Signals		void AnswerRequested()

			Sent when the answer button is pressed on the headset

		void Connected() {deprecated}

			Sent when the device has been connected to.

		void Disconnected() {deprecated}

			Sent when the device has been disconnected from.

		void Stopped() {deprecated}

			Sent when the audio connection is closed

		void Playing() {deprecated}

			Sent when the audio connection is opened

		void SpeakerGainChanged(uint16 gain) {deprecated}

			The speaker gain changed.

		void MicrophoneGainChanged(uint16 gain) {deprecated}

			The microphone gain changed.

		PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

properties	boolean Connected [readonly]

			Indicates if there is a active connection to the
			HSP/HFP connection on the remote device.

		boolean Playing  [readonly]

			Indicates if an audio connection to the headset
			is active.

		uint16 SpeakerGain  [readwrite]

			The speaker gain when available.

		uint16 MicrophoneGain  [readwrite]

			The speaker gain when available.


AudioSink hierarchy
===================

Service		org.bluez
Interface	org.bluez.AudioSink
Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX

Methods		void Connect()

			Connect and setup a stream to a A2DP sink on the
			remote device.

		void Disconnect()

			Disconnect from the remote device.

		boolean IsConnected() {deprecated}

			Returns TRUE if a stream is setup to a A2DP sink on
			the remote device.

		dict GetProperties()

			Returns all properties for the interface. See the
			properties section for available properties.

			Possible Errors: org.bluez.Error.InvalidArguments

Signals		void Connected() {deprecated}

			Sent when a successful connection has been made to the
			remote A2DP Sink

		void Disconnected() {deprecated}

			Sent when the device has been disconnected from.

		void Playing() {deprecated}

			Sent when a stream with remote device is started.

		void Stopped() {deprecated}

			Sent when a stream with remote device is suspended.

		PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

properties	boolean Connected [readonly]

			Indicates if a stream is setup to a A2DP sink on
			the remote device.

		boolean Playing  [readonly]

			Indicates if a stream is active to a A2DP sink on
			the remote device.