Commit Graph

860 Commits

Author SHA1 Message Date
Szymon Janc
c31615b82b android/bluetooth: Log error for any non-success code
Returning non-SUCCESS code in command reply is considered error and
that includes DONE status.
2014-01-11 17:15:41 +01:00
Szymon Janc
86905a8968 android/bluetooth: Rename labels from failed to reply
This name match better and avoid confusion when setting status to
SUCCESS and then jumping to failed label.
2014-01-11 17:15:41 +01:00
Szymon Janc
b4dac30570 android/bluetooth: Use HAL_STATUS_SUCCESS instead of _DONE in replies
JNI code in Android is mapping returned code to boolean value. Only
SUCCESS status is mapped to true and that value is returned to Java
code. This could result in faultyly triggering error path in Java
when returning DONE in command reply.
2014-01-11 17:15:41 +01:00
Luiz Augusto von Dentz
96375e8ad2 android/audio-msg: Simplify audio_rsp_open_stream
Reuse audio_preset in audio_rsp_open_stream since the data type is the
same.
2014-01-11 11:24:31 +02:00
Marcel Holtmann
883486009f android: Use LinkKeyPinLength instead of LinkKeyPINLength 2014-01-11 01:14:28 -08:00
Marcel Holtmann
93d858bcd2 android: Enable secure connections if supported 2014-01-11 01:13:46 -08:00
Luiz Augusto von Dentz
5e0582451a android: Fix not using AM_CFLAGS in the HAL modules
Both bluetooth.audio.so and audio.a2dp.default.so should use AM_CFLAGS
ortherwise some quite obvious errors that otherwise would break the
build may be pushed upstream.
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
518f1bdb15 android/audio: Add audio_ipc_cleanup function 2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
7560d1cd76 android/audio: Refactor create_audio_ipc
This patch adds creating listening audio ipc socket in AudioFlinger
context on audio_open() and moves accepting connection to ipc_th.
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
d0df2eddd0 android: Fix error check from pthread_create
pthread_create() returns 0 on success or errno code which is non negative
number
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
3ef04d3093 android/audio: Prefix error log with "audio" 2014-01-10 17:45:17 +02:00
Grzegorz Kolodziejczyk
af1744db66 android/tester: Multi property check for test case
This patch allows to check multiple properties for test case. Properties
can be prioritized to allow check if they'll come in right order. Now
properties aren't treated as a "single" callback. In future in one
callback multiple properties can come.
2014-01-10 16:20:05 +01:00
Ravi kumar Veeramally
78d1f1391e android/pan: Remove connected PAN devices on profile unregister call 2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
7f445ac7d5 android/pan: Implement PAN enable HAL api at daemon side 2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
423f637179 android/pan: Listen for incoming connections and accept in NAP role
Listen for incoming connections and accept it. Create bnep interface
add it to bridge and notify control and connection state information
through HAL. Remove the device on disconnect request. If android
settings UI does not have bluetooth tethering enabled it immediately
sends disconnect signal.
2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
a89e3dbdb9 android/pan: Register Network Access Point
Register NAP server and adds bnep bridge. Removes bridge
on destroy call. Bridge mechanism is needed when device acting
as a server and listen for incoming connections.
2014-01-10 16:09:55 +01:00
Luiz Augusto von Dentz
ea873d1a6a android/haltest: Add support for loading Audio HAL
This makes audio.a2dp.default.so to be loaded by haltest.
2014-01-10 15:37:46 +02:00
Luiz Augusto von Dentz
48a962ec6d android: Load bluetooth.default.so as a module
This makes haltest and android-tester to load bluetooth.default.so
instead of linking directly to it.
2014-01-10 15:07:23 +02:00
Luiz Augusto von Dentz
dd0d7e7559 android: Convert libhal-internal to a plugin
This convert the static library libhal-internal.la to
bluetooth.default.la when building with autotools.
2014-01-10 14:05:55 +02:00
Luiz Augusto von Dentz
4cd86000dd android: Convert libaudio-internal to a plugin
This convert the static library libaudio-internal.la to
audio.a2dp.default.so when building with autotools.
2014-01-10 14:05:55 +02:00
Sebastian Chlad
3c0dfcbe4a android/pts: Add PTS test results for L2CAP 2014-01-10 13:01:10 +01:00
Szymon Janc
d51dce6e81 android/tester: Adjust get adapter class test value
Currently CoD is hardcoded so just adjust test value for now.
2014-01-09 20:08:45 +01:00
Grzegorz Kolodziejczyk
69cf70af52 android/tester: Add test case state handling
This patch make test state handling more stable by avoiding errors like
i.e. double free of memory in teardown phase. Double state set is
undesirable for test case and may cause errors. Now after every
condition change, test state is checked if it can set test state to pass.
In some places of test fail, returns are added to avoid furhter code
execution.
2014-01-09 18:39:23 +01:00
Grzegorz Kolodziejczyk
2bc8ca02a0 android/tester: Use common property check function for all test props
This patch makes discovery device found test case to use generic
property check method.
2014-01-09 18:39:16 +01:00
Grzegorz Kolodziejczyk
31b830edb3 android/tester: Remove redundant whitespace 2014-01-09 18:39:11 +01:00
Andrei Emeltchenko
0ffbc7d2c0 android/haltest: Silence static analyzers
This makes code more readable and silence static analyzers which think
that pipe and fd are close two times.
2014-01-09 18:00:50 +01:00
Luiz Augusto von Dentz
da79a4534b android/audio: Fix having declaration before code 2014-01-09 15:25:16 +02:00
Szymon Janc
b6df31f1c8 android/bluetooth: Set major and minor class od device
Currently this is hardcoded to Phone/Smartphone.
2014-01-09 10:30:45 +01:00
Szymon Janc
4c0e55c4df android/bluetooth: Set default adapter name on first start
On first start always set name to default name. Adapter name is
updated on start only if current name is different.
2014-01-09 10:30:45 +01:00
Marcel Holtmann
fbba0f7d5f android: Fix typo in audio plugin file list 2014-01-08 21:33:41 -08:00
Marcel Holtmann
d18e1ad69c shared: Add skeleton for generic IO framework 2014-01-08 19:39:09 -08:00
Marcel Holtmann
eb4d95c560 shared: Use internal queue handling for mgmt interface 2014-01-08 15:01:04 -08:00
Andrzej Kaczmarek
7f5f038626 android: Fix bluetoothd installation path
This patch removes explicit LOCAL_MODULE_PATH definition for bluetoothd
and bluetoothd-snoop modules which caused both binaries to be installed
in /system/xbin instead of /system/bin folder.
2014-01-08 17:55:56 +01:00
Lukasz Rymanowski
a176ce6ce7 android/audio: Add listener thread on the Audio HAL socket
This patch add thread which is reponsible for listen on audio HAL
socket, open a2dp endpoint(s) and maintain socket.
When bluetooth daemon goes down, HAL audio plugin starts to listen on
Audio HAL socket again.
2014-01-08 17:41:14 +02:00
Ravi kumar Veeramally
7f33939401 android-tester: Add HIDHost initial interface setup test 2014-01-08 15:53:34 +01:00
Sebastian Chlad
dc9d935b23 android/pixit: Add PTS version to respective pixit 2014-01-08 15:50:23 +01:00
Lukasz Rymanowski
db1acadfd9 android/audio: Add wrapper struct for struct audio_hw_dev
This patch add wrapping struct for audio_hw_dev too keep additional info
related to a2dp stream.
2014-01-08 16:35:32 +02:00
Sebastian Chlad
2a6fcbc357 android/pics: Update PICS to PTS 5.0
Update PICS settings for HID, L2CAP, OPP, PAN and PBAP
2014-01-08 14:17:09 +01:00
Sebastian Chlad
5361af7d66 android/pics: Update PICS to PTS 5.0 for GAP
Add new PICS settings for the GAP profile in accordance with PTS 5.0
2014-01-08 14:17:09 +01:00
Sebastian Chlad
07660ada4f android/pics: Update PICS to PTS 5.0 for DID
Remove PICS settings which are not applicable in PTS
2014-01-08 14:17:09 +01:00
Lukasz Rymanowski
7bfd06208a android: Send remote devices properties on enable
If there is any bonded device stored then on bluetooth enable we
should send notification with its properties.
2014-01-08 13:13:49 +01:00
Lukasz Rymanowski
3dee7edf88 android: Move get_remote_device_props up in the file
This patch moves up function get_remote_device_props() and all
functions required by this function.
2014-01-08 13:13:49 +01:00
Lukasz Rymanowski
c8aabab889 android: Add wrapper function for get remote dev properties 2014-01-08 13:13:49 +01:00
Szymon Janc
098a8ad4ed android: Cleanup Android.mk
Remove not needed headers file in source list (Android build handles
this), explicitly mark packages as optional and fix bluetooth.default
dependencies (it should not depend on haltest as it is optional debug
package and should not be installed in user build).
2014-01-08 11:15:40 +01:00
Luiz Augusto von Dentz
2149ffefdc android/audio-ipc-api: Fix service id documentation
This follow Bluetooth HAL documentation that doesn't use any string
identifier just the integer value.
2014-01-08 11:37:45 +02:00
Luiz Augusto von Dentz
0d6a62ff24 android/audio-ipc: Fix Open command pdu
The uuid field is 16 bytes long not 16 bits, also make the first preset to
be the codec capability to avoid having 2 fields with variable length.
2014-01-08 11:37:44 +02:00
Luiz Augusto von Dentz
841e96bc65 android/A2DP: Add stream suspend command/response struct
This adds the definitions to stream suspend command and response.
2014-01-07 13:37:53 +02:00
Luiz Augusto von Dentz
ba880cc4c4 android/A2DP: Add stream resume command/response struct
This adds the definitions to stream resume command and response.
2014-01-07 13:37:53 +02:00
Luiz Augusto von Dentz
2d805557f2 android/A2DP: Add stream close command/response struct
This adds the definitions to stream close command and response.
2014-01-07 13:37:53 +02:00
Luiz Augusto von Dentz
62cfe1bc62 android/A2DP: Add stream open command/response struct
This adds the definitions to stream open command and response.
2014-01-07 13:37:53 +02:00