Michal Labedzki
256fde4f35
AVRCP: Convert spaces to tabs
...
Fix coding style issue.
2012-06-28 13:14:10 +03:00
Frédéric Dalleau
2f92669697
audio: Permit concurrent use of AG and HF roles
...
If a device supports both HF and AG roles, then if a SCO connection
related to AG profile happens, the connection is rejected because HF is
not connected. One consequence is pulseaudio failing to load bluetooth
module.
2012-06-28 13:06:57 +03:00
Lucas De Marchi
a66a557038
Fix GDBus flags after conversion to macros
...
Commit "aa3b9016bf444b60e1b7e1804dfc323a23a93c5a Convert GDBus methods
to use macro helpers" converted the previous tables to use the new
macros but some flags were lost.
2012-06-27 10:33:53 +03:00
Luiz Augusto von Dentz
9d2f3c94d6
AVDTP: Fix rejecting AVDTP Start if starting flag is set
...
This is now handled by checking if the command collided.
2012-06-18 11:40:37 +03:00
Luiz Augusto von Dentz
83630251be
audio: Fix aborting A2DP setup while AVDTP Start is in progress
...
Change return of avdtp_start to -EINPROGRESS so the caller can check if
the operation is in progress and don't abort because of that.
2012-06-15 17:50:58 +03:00
Luiz Augusto von Dentz
a59e82103a
AVDTP: Fix responding to ABORT with reject
...
ABORT command cannot be rejected
2012-06-15 17:50:23 +03:00
Luiz Augusto von Dentz
2b3bf7b241
AVDTP: Do not respond ABORT command with invalid id
...
AVDTP spec, 8.15.2 Abort Response:
"If an AVDTP_ABORT_CMD contains an invalid SEID, no response shall be
sent."
2012-06-15 17:50:14 +03:00
Luiz Augusto von Dentz
34d9bd7dd2
audio: Wait remote side to send AVDTP_START when acting as acceptor
...
Some devices like Sony Ericsson MW600 reject AVDTP_START if it was the
initiator of the connection, apparently it follows recommendation 12 of
simultaneous use of HFP, A2DP and AVRCP profiles white paper which says:
"If the RD has configured and opened a stream it is also responsible to
start the streaming via GAVDP_START."
If the client is fast enough and try to acquire the transport this cause
an error, so instead of sending AVDTP_START the code now checks if it is
the acceptor of the stream and wait the remote side to send the command.
2012-06-15 17:50:01 +03:00
Luiz Augusto von Dentz
4503dba4ba
audio: Fix handling of A2DP abort indication
...
When an abort is received all setup callbacks should return an error.
2012-06-15 17:49:42 +03:00
Luiz Augusto von Dentz
c1b8914642
audio: Fix handling of A2DP start indication
...
Only process callbacks if avdtp_start was sent, otherwise it may cancel
setup callbacks that were registere via g_idle_add.
2012-06-15 17:49:33 +03:00
Luiz Augusto von Dentz
ef539d8461
audio: Fix handling of A2DP open indication
...
When accepting the open indication all config callbacks should be
notified that open completed.
2012-06-15 17:49:25 +03:00
Luiz Augusto von Dentz
c5bf6d662b
audio: Fix handling of A2DP suspend indication
...
When accepting the suspend indication all callbacks should be notified
that suspend completed.
In addition to this fix not using avdtp_start return in indication
callback as well as in the confirmation.
2012-06-15 17:48:52 +03:00
Luiz Augusto von Dentz
ee89674c0b
audio: Add handling of AVDTP command collision
...
Check collision for AVDTP Open, Close, Start, Suspend and Abort commands
and if they collided remove the pending request if SEP has accepted the
indication.
2012-06-15 17:47:53 +03:00
Luiz Augusto von Dentz
07b6738fb4
audio: Separate profile specific fields from media_transport
2012-06-12 16:38:45 +03:00
Daniel Wagner
b968b12927
audio: Move UUID string definition to lib
2012-06-02 09:06:32 +08:00
Anderson Lizardo
48d317102e
Remove compatibility check for DBUS_TYPE_UNIX_FD
...
Since commit c89b589a58
, D-Bus >= 1.4.0 is
required. This version already contains Unix FD passing support,
therefore code that checks for DBUS_TYPE_UNIX_FD definition is
unnecessary.
2012-05-31 11:29:58 +03:00
Luiz Augusto von Dentz
e1942bc1be
AVRCP: Fix not registering to VolumeChanged event again when notified
...
The spec says:
"A registered notification gets changed on receiving CHANGED event
notification. For a new notification additional NOTIFY command is
expected to be sent."
2012-05-28 14:36:26 +03:00
Luiz Augusto von Dentz
da8b6211d8
audio: Add Volume property to A2DP transport GetProperties
...
Now that volume is being handled by SetProperty it should also be
available in GetProperties.
2012-05-27 22:44:43 +03:00
Luiz Augusto von Dentz
3b3e3c3df6
AVRCP: Add support for sending SetAbsoluteVolume
...
Once the transport volume is changed update the remote volume by sending
SetAbsoluteVolume:
< AVCTP: Command : pt 0x00 transaction 9 pid 0x110e
AV/C: Changed: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: SetAbsoluteVolume: pt Single len 0x0001
Volume: 100.00% (127/127)
> AVCTP: Response : pt 0x00 transaction 9 pid 0x110e
AV/C: Accepted: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: SetAbsoluteVolume: pt Single len 0x0001
Volume: 100.00% (127/127)
2012-05-27 22:44:20 +03:00
Luiz Augusto von Dentz
32b2b057fd
audio: Fix signature type for transport Volume
...
Signature is now uint16 instead of byte
2012-05-27 22:44:07 +03:00
Luiz Augusto von Dentz
dbe02b8c00
audio: Fix updating volume property for non-A2DP transports
...
Volume property is A2DP only
2012-05-27 22:43:37 +03:00
Luiz Augusto von Dentz
bd7644ed29
AVRCP: Fix initializing volume before checking PDU type
...
Response may be rejected or not implemented so the operand used to
initialize the variable may not even exist.
2012-05-27 22:42:39 +03:00
Lucas De Marchi
f04e4a740e
AVRCP: Remove unneeded check for set_volume callback
2012-05-25 10:43:19 +03:00
Luiz Augusto von Dentz
ea5e0da40e
AVRCP: Fix not setting audio device connected to player
...
While connecting device should be set to match the AVCTP session and when
disconnected reset it back to NULL.
2012-05-25 10:41:42 +03:00
Luiz Augusto von Dentz
fda5d9f638
AVCTP: Fix setting wrong transaction id expected for responses
...
The id were incremented after being set to the request so it is always
+1 of the actual transaction.
2012-05-25 10:41:26 +03:00
Syam Sidhardhan
732b5eb55f
audio: Remove unwanted code from manager
...
Here the variable adp never be NULL, so no need to check it
against NULL.
2012-05-24 11:08:51 +03:00
Syam Sidhardhan
44e59c8d9f
avctp: Fix NULL check after dereference
...
Check for session != NULL has to be done before accessing session.
2012-05-24 11:07:15 +03:00
Syam Sidhardhan
e03ca07559
media: Remove redundant D-Bus error initilization
2012-05-24 11:04:29 +03:00
Marcel Holtmann
df347cbbac
audio: Change the file mode back to 644
2012-05-22 20:29:27 +02:00
Luiz Augusto von Dentz
bb846fcc33
audio: Fix media transport creation for gateway endpoints
...
The device maybe connected to another adapter other than the endpoint's
so the adapters must be first check.
2012-05-22 16:37:23 +03:00
Frédéric Danis
0d81fc7cf1
audio: Fix media transport creation
...
Prevents set_configuration() to be called on another adapter
than connecting one
2012-05-22 16:37:23 +03:00
Anderson Lizardo
173cde1eb4
avdtp: Fix incorrect gchar buffer allocation
...
The code was allocating an array of gchar pointers, where an array of
gchar is expected.
2012-05-22 12:59:14 +03:00
Joohi Rastogi
839012faf3
AVRCP: Add missing Player Setting feature in TG record
2012-05-22 12:57:44 +03:00
Joohi Rastogi
a25de3dcd6
AVRCP: Refactor the code using constants
2012-05-22 12:57:44 +03:00
Luiz Augusto von Dentz
32b4ad5af8
AVRCP: Bump TG record to 1.4
...
The only mandatory feature for 1.4 is absolute volume control which is
now supported.
2012-05-18 20:48:53 +03:00
Luiz Augusto von Dentz
a282fff97d
AVRCP: Subscribe for VolumeChanged Notification
...
If the remote device support version 1.4 or latter send register command
for VolumeChanged event:
< AVCTP: Command : pt 0x00 transaction 0 pid 0x110e
AV/C: Notify: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: RegisterNotification: pt Single len 0x0005
EventID: 0x0d (EVENT_VOLUME_CHANGED)
Interval: 0x00000000 (0 seconds)
> AVCTP: Response : pt 0x00 transaction 0 pid 0x110e
AV/C: Interim: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: RegisterNotification: pt Single len 0x0002
EventID: 0x0d (EVENT_VOLUME_CHANGED)
Volume: 100.00% (127/127)
2012-05-18 20:48:12 +03:00
Luiz Augusto von Dentz
54c412c370
AVRCP: Add define for VolumeChanged event
2012-05-18 20:36:44 +03:00
Lucas De Marchi
7eebe7fb41
Do not set signature and reply in GDBus tables
...
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-17 20:32:21 -07:00
Lucas De Marchi
aa3b9016bf
Convert GDBus methods to use macro helpers
...
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-17 20:32:20 -07:00
Lucas De Marchi
25a42e675a
Constify GDBus signal tables
...
Constify signal tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-17 20:32:20 -07:00
Lucas De Marchi
665014ce89
Constify GDBus method tables
...
Constify method tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-17 20:32:20 -07:00
Anderson Lizardo
8460875579
audio: Fix tab misuse
2012-05-10 16:43:56 -07:00
Mikel Astiz
9d21c7aada
media: Enable parallel requests to endpoint
...
If endpoint is handling several devices, it should be able to handle
multiple requests, one per each.
2012-05-07 07:05:40 -07:00
Mikel Astiz
9ffc69cbfd
media: Create multiple transports if needed
...
During endpoint registration one than one device might be connected.
Thus all matching devices should have one transport each.
2012-05-07 07:05:40 -07:00
Mikel Astiz
ee31522151
media: Split media_endpoint_create
...
This function is starting to be too long and needs to be split.
After this patch, the resulting code should be exactly equivalent as the
previous implementation.
2012-05-07 07:05:39 -07:00
Mikel Astiz
06da2b0228
media: Support multiple transports per endpoint
...
Several transports may exist for each endpoint, for example if several
HFGW are connected. This should be exposed to the endpoint as one
transport each.
2012-05-07 07:05:39 -07:00
Mikel Astiz
ee14d62aba
audio: Add multiple device search to manager
...
This method is useful to search for more than one device fulfulling
certain criteria.
2012-05-07 07:05:39 -07:00
Mikel Astiz
4523901db2
audio: Fix gateway state check
...
Gateway should be considered active also if connecting or playing.
This could for example lead to manager_find_device() not returning a
device that is connecting, and thus the corresponding endpoint would
never be created in the Media API.
2012-05-07 07:05:39 -07:00
Jaganath Kanakkassery
2aa45c5fc5
audio: Reset hfp and hs handle before connection
...
When bluez initiates headset connection hfp and hs handle is saved
each time when initiating connection. So at some point if hf service
is removed in remote headset then bluez connects to hs service. But
because of previously stored hfp handle bluez thinks that connection
made to hs service is hfp connection and waits for at commands.
Eventually bluez connection state will be incorrectly set.
2012-05-02 14:40:32 +03:00
Johan Hedberg
e61df1600a
audio: Fix AVDTP Reconfigure Reject message
...
The specification describes a proper reject response to
AVDTP_Reconfigure, so the previously used unknown command response is
not correct.
2012-04-18 14:17:51 +03:00