Commit Graph

1658 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
de498da768 android/avrcp-lib: Add avrcp_get_capabilities_rsp function
This function can be used to generate GetCapabilities response PDUs.
2014-03-18 10:54:31 +02:00
Luiz Augusto von Dentz
217ae925ef android/avrcp-lib: Add avrcp_get_current_player_value_rsp function
This function can be used to generate GetCurrentPlayerValue response
PDUs.
2014-03-18 10:54:31 +02:00
Luiz Augusto von Dentz
1a04046ee5 android/avrcp-lib: Add avrcp_get_player_values_text_rsp function
This function can be used to generate GetPlayerValuesText response PDUs.
2014-03-18 10:54:31 +02:00
Luiz Augusto von Dentz
4b05327e67 android/avrcp-lib: Add avrcp_list_player_values_rsp function
This function can be used to generate ListPlayerValues response PDUs.
2014-03-18 10:13:50 +02:00
Luiz Augusto von Dentz
f247cbf2cc android/avrcp-lib: Add avrcp_get_player_attribute_text_rsp function
This function can be used to generate GetPlayerAttributeText response
PDUs.
2014-03-18 10:13:49 +02:00
Luiz Augusto von Dentz
dadfaef53b android/avrcp-lib: Add avrcp_list_player_attributes_rsp function
This function can be used to generate ListPlayerAttributes response PDUs.
2014-03-18 10:13:49 +02:00
Luiz Augusto von Dentz
f79dc98f04 android/avrcp-lib: Add avrcp_set_addressed_player_rsp function
This function can be used to generate SetAddressedPlayer response PDUs.
2014-03-18 10:13:49 +02:00
Ravi kumar Veeramally
5579308c0d android/hal-health: Add HDP .destroy_channel method 2014-03-17 14:52:59 +01:00
Ravi kumar Veeramally
a852264f4a android/hal-health: Add HDP .connect_channel method 2014-03-17 14:52:59 +01:00
Ravi kumar Veeramally
a498235937 android/hal-health: Add HDP .unregister_application method 2014-03-17 14:52:59 +01:00
Luiz Augusto von Dentz
862d816dad android/avrcp-lib: Add support for parsing SetAddressedPlayer PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
88c02d70ff android/avrcp-lib: Add support for parsing RegisterNotification PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
f504d0787f android/avrcp-lib: Add support for parsing GetElementAttributes PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
9080d086f2 android/avrcp-lib: Add support for parsing GetPlayStatus PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
01febf4d8a android/avrcp-lib: Add support for parsing SetPlayerValue PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
ea85f70faf android/avrcp-lib: Add support for parsing GetCurrentPlayerValue PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
45a035f49d android/avrcp-lib: Add support for parsing GetPlayerValueText PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
6f9adedda3 android/avrcp-lib: Add support for parsing ListPlayerValues PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
d1e467f8a9 android/avrcp-lib: Add support for parsing GetPlayerAttributeText PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
70b683a8ac android/avrcp-lib: Add support for parsing ListPlayerAttributes PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
8faada31a6 android/avrcp-lib: Add support for parsing GetCapabilities PDU 2014-03-17 14:53:32 +02:00
Luiz Augusto von Dentz
b67d790e51 android/avrcp-lib: Change API to register callbacks instead of PDU handlers
This adds avrcp_register_player function to register callbacks for
requests and responses, the fundamental difference is that the
callbacks are called after the original PDU is parsed and the parameter
are converted to host byte order making us able to unit test the
parsing itself.
2014-03-17 14:53:32 +02:00
Lukasz Rymanowski
0ae17af642 android/gatt: Find primary services
With this patch it is possible to search all primary services.
2014-03-17 11:45:09 +01:00
Jakub Tyszkowski
3d8d9fef7e android/hal-ipc: Make opcode debug print more readable 2014-03-17 10:55:00 +01:00
Jakub Tyszkowski
ad802f2de3 android/hal-gatt: Fix wrong pointer usage 2014-03-17 10:55:00 +01:00
Lukasz Rymanowski
27f05c1c55 android/gatt: Add disconnect GATT device
Disconnect scenarios:

1. If there is more then one client for a given gatt_device then
client id is removed from dev->clients, success response is sent
together with success disconnect event.

2. If there is only one client for a given remote device then we
do what is decribed above plus clean of gattrib stuff

3. In case client_if or conn_id is incorrect, response failed is sent
2014-03-17 10:41:46 +01:00
Lukasz Rymanowski
0c62d593c4 android/gatt: Add GATT Connect
This patch introduce connect LE device functionality.

There is gatt_device representing remote le device. Each gatt device
has a list own list of clients as it is possible that more apps
would like to use same remote device.

Possible connect scenarios:

1.  There is no ACL connection to device:
Then new dev is put on conn_wait_queue and le scan is enabled.
Once device is found we do connect it.

Once device is connected then device is moved form conn_wait_queue to
conn_list and success event is sent to client(s) with conn_id

2. Device is already connected:
Then we update client list, reply with success and do send connect event.

3. For unregisterd clients or uknown conn_id, failed response is sent.
2014-03-17 10:41:46 +01:00
Jakub Tyszkowski
b0502eec1b android/gatt: Use Core profile for LE scan
This makes gatt capable of triggering LE scan using functionality
exposed by Core API. GATT registers its own callbacks for discovering
events.
2014-03-17 10:41:46 +01:00
Jakub Tyszkowski
43802b5ae1 android/bluetooth: Add GATT notifications on LE discovery
This patch introduce API which GATT can use to start/stop discovery
and register for required events.

This is because GATT needs to get from GAP notifications about
founded devices and also notification when discovery has been stopped.

GATT will need it explicity when GATT client calls scan, and also in
case of connect device, as before le connect is sent we do scan first
to make sure that device is available.

For now on adapter have two variables tracing discovery.
1. cur_discovery_type which show type of ongoing discovery type.
2. exp_discovery_type which shows type of next discovery session.

We need this because of scenarion when GATT is interesting in scan and
in the same time HAL wants to do scanning.
2014-03-17 10:41:46 +01:00
Szymon Janc
b77c5ffd3d android/handsfree: Fix connecting audio when call is active on connect 2014-03-17 10:25:29 +01:00
Szymon Janc
eeacd40d7a android/handsfree: Fix not initializing call state to idle 2014-03-16 23:51:31 +01:00
Szymon Janc
adb6f96787 android/pts: Update HFP results 2014-03-16 16:41:00 +01:00
Marcel Holtmann
3fef9cdaf3 android: Small cosmetic changes in the README 2014-03-15 17:16:06 -07:00
Szymon Janc
8a635cc308 android/README: Add information about not implemented AVRCP calls 2014-03-15 23:51:53 +01:00
Szymon Janc
8afc913a42 android/README: Update HALs implementation status 2014-03-15 23:17:03 +01:00
Marcin Kraglak
84066fccbc android/handsfree: Connect audio when Android framemework expects it
There are few cases when framework doesn't call connect_audio method
from HAL but we should do it internally. Call connect_audio if
we started dialing or we accepted incoming call. Also if headset
connects during active call, start SCO connection. We don't have to
disconnect SCO internally, because Android always call disconect_audio
when call has finished.
2014-03-15 23:07:32 +01:00
Szymon Janc
5d5444d657 android/handsfree: Add support for three-way calling
This adds code needed for translating phone_state_change command to
call, callsetup and callheld indicators. Android HAL specifcy common
type for all calls state but only subset of values are valid for
phone_state_change.
2014-03-15 22:21:28 +01:00
Marcel Holtmann
8b644c3537 android: Make sure that ipc-common.h is included 2014-03-14 10:37:28 -07:00
Szymon Janc
bc7e20a107 android/client: Enable printf format string verification 2014-03-14 16:02:33 +01:00
Lukasz Rymanowski
2013f75493 android/client: Minor fix in print status 2014-03-14 16:02:33 +01:00
Lukasz Rymanowski
fc6cbace2c android/client: Fix service search command
We should be able to send NULL in case we want all the primary seavices
2014-03-14 16:02:33 +01:00
Szymon Janc
5409c16e84 android/hal-bluetooth: Fix passing uninitialized mode on init
This fix following Valgrind report:
Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised byte(s)
   at 0x534823D: ??? (syscall-template.S:81)
   by 0x5F68689: hal_ipc_cmd (hal-ipc.c:357)
   by 0x5F6240B: init (hal-bluetooth.c:437)
   by 0x4128C0: setup_base (android-tester.c:2594)
   by 0x40DDE5: setup_callback (tester.c:380)
   by 0x50803B5: g_main_context_dispatch (in /lib/x86_64-linux-gnu/
     libglib-2.0.so.0.3800.1)
   by 0x5080707: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
   by 0x5080B09: g_main_loop_run (in /lib/x86_64-linux-gnu/
     libglib-2.0.so.0.3800.1)
   by 0x40EA0C: tester_run (tester.c:798)
   by 0x404475: main (android-tester.c:4864)
 Address 0x7ff0002b1 is on thread 1's stack
2014-03-14 14:42:12 +01:00
Jakub Tyszkowski
767df7695d android/tester: Don't verify test conditions if test is done
This avoids callbacks still being called when test result is already
decided and teardown procedure has already been triggered.
2014-03-14 14:42:12 +01:00
Sebastian Chlad
037a592b11 android/hsp: PTS tests results for HSP 2014-03-14 14:42:12 +01:00
Grzegorz Kolodziejczyk
f3a9cfe90a android/client: Fix segfault (invalid argv) for gatt scan
This patch fix segfault driven by lack of 4 element in avrg array.
If user put only two arguments, reading of lacking (auto set to start=1)
third argument, will trigger segfault.
2014-03-14 14:42:12 +01:00
Claudio Takahasi
7899d71215 Replace bt_put_le16() by put_le16() 2014-03-14 15:29:35 +02:00
Szymon Janc
5ab9740fbc android/handsfree: Fix not needed codec negotiation
If codec was already negotiated there is no need to do it again and AG
may try connecting SCO right away. This fix regression from f264a65170.
2014-03-14 13:44:29 +01:00
Ravi kumar Veeramally
72b36c7854 android/health: Add health.c|h file with basic calls
Add health.c|h with basic calls for register and unregister profile.
2014-03-14 13:34:16 +01:00
Ravi kumar Veeramally
2bb8f57c98 android/hal-health: Add HDP .cleanup method 2014-03-14 13:34:16 +01:00
Ravi kumar Veeramally
840dcd6868 android/hal-health: Add HDP .init method 2014-03-14 13:34:16 +01:00