Commit Graph

101 Commits

Author SHA1 Message Date
Gustavo F. Padovan
90ae9ec320 Remove error_common_reply()
Remove old dbus error report function. This patch doesn't make things
really really better, but is a start.
2010-12-16 11:27:43 +02:00
Gustavo F. Padovan
2af3d4bbf9 audio: use btd_error_failed() 2010-12-14 10:31:22 +02:00
Gustavo F. Padovan
0d39f2db3c Add btd_error_already_connected() 2010-12-08 22:54:58 +02:00
Gustavo F. Padovan
27fffa4aad Add btd_error_busy() 2010-12-07 23:11:10 +02:00
Gustavo F. Padovan
64dc6dbbf3 Add btd_error_not_connected() 2010-12-07 23:08:14 +02:00
Luiz Augusto von Dentz
8a139ecb87 Fix not dropping avdtp session reference when cancelling stream setup
This will indicate to the session that there is no need to proceed with
stream configuration and that it should disconnect.
2010-11-19 18:19:27 +02:00
Luiz Augusto von Dentz
742ab0b9e3 Add debug logs for state changes on sink 2010-11-19 18:19:27 +02:00
Luiz Augusto von Dentz
87b3cb4de0 Fix not aborting sink stream configuration on disconnect
If stream configuration is not complete it should be aborted so we can
proceed with disconnection process.
2010-11-11 12:35:13 +02:00
Johan Hedberg
c72ce0f12a Don't use AVDTP timer when the device is being disconnected
When the user has requested a disconnection it doesn't make sense to
have the AVDTP state machine waiting before closing the signalling
channel. This is particularly important for Device.Disconnect since only
two seconds are available for a clean disconnect before a forced
HCI_Disconnect command is sent.
2010-10-29 11:09:31 -04:00
Luiz Augusto von Dentz
01d29e5903 Make use of avdtp category when setting errors
In order to forward and create avdtp error properly for setconf command
we need to have the category, to fix this avdtp_error_t now carries the
category as define in avdtp and a new category is used for errno
(AVDTP_ERRNO).
2010-10-11 12:27:01 +03:00
Radoslaw Jablonski
1dacc118c8 Fix headset disconnecting via device disconnect
Headsets for proper disconnecting need to disconnect profiles in specified
order(by ex. disconnect a2dp, then sink and hfp at the end). Instead of
adding separate callbacks for disconnecting each profile, now adding only
one callback in audio/device.c for calling audio disconnect functions in
correct order. New disconnect callback works similarly to dev_disconnect
from audio/device.c
2010-09-28 10:41:02 +03:00
Luiz Augusto von Dentz
f87e1bed13 Add initial implementation of org.bluez.Media spec 2010-09-15 15:21:53 +03:00
Gustavo F. Padovan
8e58667ef0 Move debug() to DBG()
Use the new dynamic debug feature
2010-05-21 18:21:48 +02:00
Gustavo F. Padovan
e891f7df62 Move logging.{c,h} to log.{c,h}
Try to make log stuff more similar to ConnMan and oFono.
2010-05-21 14:40:36 +02:00
Luiz Augusto Von Dentz
ab816e6549 Add immediate parameter to avdtp_close
When TRUE if there is an outstanding command in the sending queue it will
cause abort which cancel any pending command.
2010-03-24 23:32:24 +02: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
5f8a274881 Add support for AVDTP 1.3 Delay Reporting
This patch adds support for the new Delay Report command in AVDTP 1.3.
2009-10-06 19:18:53 +02:00
João Paulo Rechi Vita
1340fb6eb3 Adapt A2DP functions to support the Sink role.
Modify a2dp_source_* functions to more generic a2dp_record(), a2dp_get(),
a2dp_config(), a2dp_resume(), a2dp_suspend(), and a2dp_cancel() which can
handle both the Sink and Source roles.
2009-07-13 22:16:34 +03:00
Johan Hedberg
957f476952 Fix sink disconnect callback removal 2009-05-06 19:30:57 +03:00
Luiz Augusto von Dentz
c4f3b52e2f Fix bug which cause disconnect watches to run on freed data.
Watches were not being removed when the pointer passed as user_data is freed.
2009-05-04 10:16:46 -03:00
Luiz Augusto von Dentz
a381d5342d Make disconnect watch callback to take removal flag.
This should make watches aware of a force disconnection for permanent device
removal making possible to remove any persistent data associate with the
device.
2009-04-27 10:43:29 -03:00
Johan Hedberg
a395a8f0b6 Fix removing sink retry timer in sink_free 2009-04-27 11:10:24 +03:00
Luiz Augusto von Dentz
5063d28f17 Make audio plugin to use disconnect watches. 2009-04-22 15:41:53 -03:00
Johan Hedberg
d2fe0f577f Fix a2dp_source_get error checking 2009-04-15 23:11:26 +03:00
Johan Hedberg
9fe662df2a Fix sink.c crash if removing device while connecting 2009-04-15 13:33:29 +03:00
Johan Hedberg
1200c9362b Fix disconnection timers for org.bluez.Audio
The original org.bluez.Audio patch forgot to make sure that the disconnection
timers for Headset and AudioSink get disabled when org.bluez.Audio.Connect is
used. This patch fixes it.
2009-04-02 17:30:31 +03:00
Johan Hedberg
e240882cdc Add support for sink state callbacks 2009-03-28 01:15:23 +02:00
Johan Hedberg
b7c0c6f79a Implement Audio.Connect and Audio.Disconnect 2009-03-27 21:20:07 +02: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
784c8238e0 Fix Disconnected being emitted while reconfiguring. 2009-03-27 00:41:46 +02:00
Luiz Augusto von Dentz
bd30e5535a Introduce BT_OPEN command to audio ipc.
BT_OPEN make it possible to lock a given seid which is automacally
release if the client disconnects from the unix socket.
2009-03-25 18:56:20 -03:00
Johan Hedberg
9ab9895a92 Add State property also to AudioSink.GetProperties() 2009-03-25 02:28:28 +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
3cb26e9bcf Handle sink->session == NULL && session == NULL correctly in sink_setup_stream 2009-03-25 00:16:32 +02:00
Johan Hedberg
e6f892a966 Ignore non-sink devices in sink.c avdtp_state_callback 2009-03-24 23:14:24 +02:00
Johan Hedberg
5427c56e49 Add State property to the AudioSink interface
This patch adds a new string State property to the AudioSink interface. It
makes use of the recently added AVDTP connection state tracking support to
create a "connecting" state.
2009-03-24 21:41:43 +02:00
Johan Hedberg
763e9253e0 Add possibility to track AVDTP connection state changes
This patch adds a public API to avdtp.c that can be used to track the AVDTP
connection status to devices.
2009-03-24 21:41:06 +02:00
Johan Hedberg
8e706e2d4f Convert some not-so-important info logs to debug logs 2009-03-24 12:31:10 +02:00
Johan Hedberg
38ca09be34 Set up a stream for incoming connections if the sink doesn't do it
Some headsets when acting as initiators of an AVDTP connection create
the AVDTP signaling channel but don't do anything else over it (i.e.
they expect us to set up a stream when needed). This patch makes
bluetoothd do the same as AudioSink.Connect() if no AVDTP commands have
been received from the sink within one second after it has created the
AVDTP signaling channel to us.

Setting up a stream is also important because the AudioSink Connected
property is bound to the existence of a configured stream (which makes
sense since an AVDTP connection as such tells us nothing about what
sinks and sources there are or even if audio or video will be used).
2009-02-02 19:32:14 -08:00
Johan Hedberg
836c502d8a Don't auto-disconnect explicitly created A2DP connections
This patch makes sure that explicitly created connections (remotely
initiated or using AudioSink.Connect()) stay up until explictly
disconnected. The control for this needs to be in the stream timer and
not the disconnect timer since our AVDTP state machine always tries to
keep one stream in configured state (i.e. it should be ok to always
disconnect if we stay too long in IDLE state).
2009-01-27 22:06:00 +02:00
Marcel Holtmann
fb333f1c88 Update copyright information 2009-01-01 19:33:20 +01:00
Luiz Augusto von Dentz
7ec871d37d Make use of g_timeout_add_seconds whenever possible. 2008-11-17 14:15:10 -03:00
Johan Hedberg
a5883ecb1a Use g_dbus_send_message instead of dbus_connection_send 2008-10-24 15:49:52 +03:00
Johan Hedberg
cd87fad76b Fix indentation levels 2008-10-16 22:36:30 +03:00
Johan Hedberg
c0736ea762 Rename dbus_connection_emit_property_changed to emit_property_changed 2008-10-16 22:03:25 +03:00
Johan Hedberg
102df1da56 Fix remaining places to use dict_append_entry too 2008-10-16 21:23:43 +03:00
Marcel Holtmann
d68a57d8be Fix uninitialized reply of multiple GetProperties methods 2008-10-03 08:29:51 +02:00
Luiz Augusto von Dentz
acf2a8a0b3 Mark old plugins API as deprecated. 2008-10-02 19:16:39 -03:00
Luiz Augusto von Dentz
29c9f31631 Add code to emit PropertyChanged on sink interface. 2008-10-02 16:42:54 -03:00