Commit Graph

39 Commits

Author SHA1 Message Date
Daniel Orstadius
f791c862d8 audio/device.h: use lower case in profile UUIDs
BlueZ seems to use lower case when emitting signals containing
UUIDs retrived from a remote device.

The definitions affected by this patch look to be used for example
if the remote connects an audio profile which BlueZ has not
discovered (perhaps it had not yet browsed the service records of
the remote).

In that case the format of the stored and emitted UUID should be
consistent with the UUIDs received during service discovery.
2010-10-20 12:01:22 +03:00
Johan Hedberg
5592142cb9 Update Nokia copyrights 2010-01-07 01:11:05 -08:00
Marcel Holtmann
9184e2eeb7 Update copyright information 2010-01-01 17:08:17 -08:00
Johan Hedberg
0439477145 Fix audio device authorized setting for AVRCP-only connections
AVRCP state isn't hooked up to the generic audio interface and its state
changes so it needs to clear the authorized variable when getting
disconnected if no other profile is active.
2009-09-06 02:56:37 +03:00
Johan Hedberg
61d29a1847 Make dev->authorized private to audio/device.c
There's no need to expose the authorized setting outside of device.c.
2009-09-05 22:09:34 +03:00
Johan Hedberg
763c7011e1 Fix race condition in authorizing audio connections
The current check for implicit authorization is if any other audio profile
is already connected. However, a the second profile might try to connect
right after we've gotten a positive authorization reply for the first one
but before the first profile has reached "connected" state. So just by
checking the connected state of other profiles we might get a false
negative for the decision of doing implicit authorization.

This patch adds a variable to the audio_device struct for keeping track of
if we've gotten a positive authorization reply that can be used in
addition to the "any other profiles" connected check. This variable gets
cleared when the (global audio) device state goes back to disconnected.
2009-09-04 19:44:28 +03:00
Johan Hedberg
88d7897d4c Fix audio connection authorization handling with timeouts
When manager.c (HFP/HSP), avdtp.c (A2DP) or control.c wants to cancel an
authorization request it shouldnd't affect the requests of the other
modules. So btd_cancel_authorization cannot be used. This patch adds a new
cancellation function to device.c which will remove the specific callback
from the list and only if the list is empty call btd_cancel_authorization.
2009-09-04 18:50:56 +03:00
Johan Hedberg
9c3f955375 Rename audio_device_is_connected more appropriately 2009-09-03 19:55:23 +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
5063d28f17 Make audio plugin to use disconnect watches. 2009-04-22 15:41:53 -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
Johan Hedberg
97e8180cfd Add skeleton for org.bluez.Audio interface 2009-03-27 17:52:10 +02:00
Johan Hedberg
313a1935e3 Add AVCTP state callback support to control.c
This prepares the way for having more fine-grained multi-profile connection
control within device.c.
2009-03-27 16:45:55 +02:00
Johan Hedberg
243103b980 Make use of the AVDTP session state callback for automatic AVRCP control 2009-03-25 01:59:37 +02:00
Johan Hedberg
8569aed557 Delay AVRCP connection when remote device connects A2DP
The audio profile coexistence whitepaper recommends that the initiator
of the A2DP connection also initiates the AVRCP connection. This patch
adds a two second delay before we attempt connecting AVRCP after the
remote device has connected A2DP to us.
2009-02-04 09:39:57 -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
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
779b2cbee3 Rename Source and Sink to AudioSource and AudioSink 2008-09-08 11:40:32 +03:00
Johan Hedberg
26dc8445ff Fix audio and input interfaces match the API documentation 2008-09-06 02:09:05 +03:00
Luiz Augusto von Dentz
12d81a98fe Cleanup audio manager. 2008-07-28 17:15:27 -03:00
Marcel Holtmann
caf9fdd6d0 Replace struct device with struct audio_device 2008-05-29 08:05:16 +00:00
Luiz Augusto von Dentz
0094809955 Make bt_io_callback_t to take both source and destination. 2008-05-14 22:16:16 +00:00
Marcel Holtmann
e823c15e43 Update copyright information 2008-02-02 03:37:05 +00:00
Johan Hedberg
589d60855e Add uinput support for AVRCP 2007-10-25 10:38:47 +00:00
Marcel Holtmann
de72271829 Update copyright information 2007-10-23 17:17:47 +00:00
Luiz Augusto von Dentz
af44f3cafb Fix device removal when it is not the current adapter. 2007-10-09 13:31:57 +00:00
Marcel Holtmann
92f94938b9 Add support for ALSA parameters 2007-08-23 23:37:15 +00:00
Johan Hedberg
cdd9e2e17a Rework interfacing with the avdtp state machine 2007-08-16 15:42:10 +00:00
Luiz Augusto von Dentz
8f0de90a8f Fix RemoveDevice bug that prevent its removal from storage. 2007-08-13 17:16:12 +00:00
Johan Hedberg
c2833e263d Remove ifndef protections and includes from .h files 2007-08-13 08:14:22 +00:00
Johan Hedberg
d013a1eaa7 Clean up mess with header files 2007-08-12 23:58:15 +00:00
Johan Hedberg
9494c146ce Remove redundant stream fd from config response 2007-08-11 15:52:27 +00:00
Johan Hedberg
6763ebb3c2 Integrate A2DP work from Johan's and Luiz's GIT trees 2007-08-11 11:05:24 +00:00
Johan Hedberg
6eb1dc5328 Add first files for to start A2DP implementation 2007-07-23 15:43:32 +00:00
Marcel Holtmann
1a03aad914 Add storage support and fixup messed up coding style 2007-06-22 23:50:24 +00:00
Luiz Augusto von Dentz
a53371133f Add device files that implements org.bluez.audio.Device interface. 2007-06-22 20:30:35 +00:00
Marcel Holtmann
d42edde611 Remove wrongly committed files 2007-06-22 20:09:09 +00:00
Luiz Augusto von Dentz
1ad4df62d7 Merge changes from git://git.infradead.org/users/vudentz/bluez-utils.git. 2007-06-22 19:47:53 +00:00