Commit Graph

177 Commits

Author SHA1 Message Date
Johan Hedberg
9722cf5f77 Make headset connecting state consistent with the rest of the interfaces
Audio, AudioSink, AudioSource and Control interfaces use "connecting"
instead of "connect in progress" so make the Headset interface consistent
with that.
2009-09-02 12:24:23 +03:00
Johan Hedberg
cd66784046 Don't enable the SCO server socket when not necessary
The SCO server socket shouldn't be enabled when neither Gateway nor
Headset support is enabled.
2009-08-11 10:32:53 +03:00
João Paulo Rechi Vita
f79bab5a11 Create A2DP Source interface. 2009-07-13 22:16:26 +03:00
Forrest Zhao
9a6d297c34 Misc fixes for HFP HF role 2009-06-30 12:36:54 +03:00
João Paulo Rechi Vita
99e1a2f757 Fix small typo 2009-06-19 23:05:40 +03:00
Luiz Augusto von Dentz
e7e1be5d17 Fix bug which cause authorization to be denied in certain headsets.
Some headsets (Nokia HS-12W) connects first on avrcp and only then on hfp
so in case Trusted property is not set this will cause agent_authorize to
return -EBUSY and drop hfp connection.

The proper solution would be to group all connections requests only
sending one authorization so the agent either accept them all or not, but
that would require API changes which we are avoiding right now, so the
current fix only send one connection request which the reponse is used for
the rest of the connections.
2009-06-15 18:10:39 +03:00
Luiz Augusto von Dentz
c3defe6db9 Fix headset never connecting on the first attempt.
manager_allow_headset_connection was considering the connection attempt
itself as a connection when it shouldn't.
2009-06-02 18:53:06 -03:00
Luiz Augusto von Dentz
c8fce6d79b Make audio plugin to use adapter references. 2009-05-27 11:25:25 -03:00
Luiz Augusto von Dentz
533793b5c7 Fix bug which prevent headset driver to load a second time.
headset driver was not closing its socket properly when an adapter is removed
which makes kernel to assume the address is already in use.
2009-04-28 14:01:50 -03:00
Johan Hedberg
70f8a458b6 Fix sending AVRCP commands to non-target devices
This patch changes the VolumeUp and VolumeDown methods to return a NotSupported
error if the remote device doesn't have a AVRCP Target service record.
2009-04-23 01:27:27 +03:00
Luiz Augusto von Dentz
5063d28f17 Make audio plugin to use disconnect watches. 2009-04-22 15:41:53 -03:00
Johan Hedberg
e5ae3e24c5 Fix manager_get_device to not always create a new device object
In the case that someone calls Adapter.RemoveDevice while we're connected to an
audio profile some function calls could be triggered to manager_get_device.
This patch makes sure these calls don't recreate the device object that was
just removed.
2009-04-11 20:01:00 +03:00
Forrest
e9ad28fb72 Add basic framework support for HFP HF role (org.bluez.HeadsetGateway) 2009-04-03 21:43:38 +03:00
Luiz Augusto von Dentz
43eef7928a Remove unused variable. 2009-04-01 13:36:09 -03:00
Luiz Augusto von Dentz
641f45806e Fix dead assignments.
Values stored to 'svclass' are never read.
2009-04-01 11:59:50 -03:00
Johan Hedberg
80b1146a20 Add support for automatic HFP+A2DP connection creation with incoming connections
This patch adds logic for automatically connecting both A2DP and HFP profiles
if the headset only connects the other. The feature can be switched off using
the AutoConnect audio.conf parameter.
2009-03-27 19:10:04 +02:00
Luiz Augusto von Dentz
47f426817d Add object field to audio ipc messages. 2009-03-25 18:56:19 -03:00
Luiz Augusto von Dentz
9bdf6ba0c5 Add source and destination fields to audio ipc messages. 2009-03-25 18:56:19 -03:00
Johan Hedberg
1f393331ef Fix audio plugin initialization failure cases 2009-03-12 11:44:38 -03:00
Johan Hedberg
a37210e15f Update HSP version to 1.2 2009-03-03 09:12:54 +02:00
Johan Hedberg
295727e042 Fix headset_connect_rfcomm error return case 2009-02-25 16:31:08 +02:00
Luiz Augusto von Dentz
10d6858927 Make use of g_io_channel_shutdown instead of deprecated g_io_channel_close. 2009-02-19 16:23:10 -03:00
Luiz Augusto von Dentz
e777c55aa7 Make use of g_error_free instead of g_clear_error when possible.
g_clear_error make an extra operation (&err = NULL) which is not necessary
when the GError is not reused.
2009-02-19 16:22:48 -03:00
Johan Hedberg
c82739046f Convert HSP/HFP to use btio confirm_cb 2009-02-19 21:08:20 +02:00
Johan Hedberg
8c26ea9f18 Add missing comma 2009-02-19 20:30:22 +02:00
Luiz Augusto von Dentz
d048052453 Make audio plugin to use BtIO API. 2009-02-19 14:27:38 +02:00
Johan Hedberg
36941ab91a Remove unnecessary empty line 2009-02-06 14:49:17 -08:00
Luiz Augusto von Dentz
60ec17b689 Make audio plugin to use audio_device sufix instead of device_.
To prevent future name clashes with btd_device API.
2009-01-08 23:44:16 +02:00
Marcel Holtmann
fb333f1c88 Update copyright information 2009-01-01 19:33:20 +01:00
Marcel Holtmann
c2f08ad646 Removed unused function 2008-12-23 05:25:18 +01:00
Luiz Augusto von Dentz
4ed78c91a7 Check if btd_device_add_uuid succeeded. 2008-12-02 09:45:22 -03:00
Johan Hedberg
0608204938 Fix manager_allow_headset_connection count check 2008-10-24 15:20:36 +03:00
Johan Hedberg
bd44943632 Use g_clear_error(&err) instead of g_error_free(err); err = NULL 2008-10-24 13:44:16 +03:00
Johan Hedberg
e32c8dcd38 Limit the amount of connected HSP/HFP devices and make it configurable
It's very tricky to get the multiple connected HSP/HFP devices use case right.
E.g. in the case of in-band ringtone the specification mandates us to open SCO
to the HFP before sending RING indications. So, in the case of multiple
connected devices we would have to open multimple simultaneous SCO connections
which simply isn't a wise thing to do.
2008-10-24 12:19:47 +03:00
Johan Hedberg
05e28841e3 Make server_is_enabled simply use the config file values for now
There's something broken in the "profile enabled" logic at the moment which
makes server_is_enabled return FALSE sometimes when it shouldn't which causes
the necessary interface not to be added to remote device objects. Use simply
the config file values for now since we don't support per-adapter server
configuration anyway.
2008-10-10 14:53:30 +02:00
Johan Hedberg
1754195619 Add mechanism for adding new UUIDs from the driver side
With this patch drivers can notify the core daemon that a device supports some
UUID. This is useful in case we don't have a service record for a profile which
the remote device initiates a connection for.
2008-10-09 15:13:28 +02:00
Johan Hedberg
548026e08b Make device driver probe calls take UUID's instead of full records
This is preparation for allowing the device object to be correctly set up even
when we don't have the full service records but only the remote UUID's.
2008-10-09 15:13:28 +02:00
Johan Hedberg
be81c7873a Fix typo 2008-10-08 16:36:43 +02:00
Johan Hedberg
3161f96838 Create audio device objects on incoming connections if necessary
If we haven't done SDP yet the data structures will be uninitialized. This
patch makes sure that the structures are properly initialized if we get an
incoming connection before service discovery has been done.
2008-10-08 14:44:54 +02:00
Johan Hedberg
586fd91a6c Add separate function for creating new audio device objects
This is needed in preparation of supporting remotely initated audio device
pairing and connections (when we haven't done SDP to the remote device yet).
2008-10-08 14:09:25 +02:00
Johan Hedberg
79c4a0e6df Change SCO server socket into a generic one
Due to a kernel bug we can't initiate SCO connections if there's
a server socket bound to the same adapter. Therefore use a global
socket bound to BDADDR_ANY instead.
2008-10-04 13:00:38 +02:00
Johan Hedberg
7adc28d26f Remove unnecessary return statements from the end of void functions 2008-09-10 20:42:28 +03:00
Johan Hedberg
3e34eab99b Add SCO server socket (needed for HFP) 2008-09-10 15:35:45 +03:00
Johan Hedberg
e693267ede Minor coding style fix 2008-09-10 15:06:20 +03:00
Vinicius Costa Gomes
c0296a9dde Cancels the pending request from agent side when receiving a NoReply 2008-09-09 19:47:14 -03:00
Luiz Augusto von Dentz
957d01bac7 Fix a2dp and avrcp drivers to not rely on BDADDR_ANY. 2008-09-08 18:20:29 -03:00
Johan Hedberg
2cea206bb3 Remove incorrect (and premature) optimization 2008-09-08 22:56:29 +03:00
Alok Barsode
19ce4933f3 Redefining device_get_address to take bdaddr_t as parameter. 2008-09-08 17:55:14 +05:30
Alok Barsode
2a8fb41c4c Redefining adapter_get_address to take bdaddr_t as parameter. 2008-09-08 14:31:43 +05:30
Johan Hedberg
4449fea64a Disallow HFP connections when the telephony plugin isn't yet initialized 2008-09-04 17:36:51 +03:00