OSDN Git Service
Sebastian Chlad [Fri, 31 Jan 2014 16:46:46 +0000 (18:46 +0200)]
android/pts: Correct typo
Sebastian Chlad [Fri, 31 Jan 2014 16:43:22 +0000 (18:43 +0200)]
android/pts: Add Android version to PTS tests
This trivial patch adds Android version to the PTS test results.
It helps tracking tests status.
Sebastian Chlad [Fri, 31 Jan 2014 09:31:12 +0000 (11:31 +0200)]
android: Add avtest to debug builds
Luiz Augusto von Dentz [Thu, 30 Jan 2014 16:57:44 +0000 (08:57 -0800)]
audio/AVRCP: Fix crash when player target is not initialized
Remote device may not have both roles always which can lead to crash if
it does support trigger commands that would access the player.
Sebastian Chlad [Tue, 28 Jan 2014 17:25:31 +0000 (19:25 +0200)]
android/pts: PTS test results for PBAP
Sebastian Chlad [Tue, 28 Jan 2014 17:59:47 +0000 (19:59 +0200)]
android/pts: PTS test results for OPP
Sebastian Chlad [Wed, 29 Jan 2014 13:27:04 +0000 (15:27 +0200)]
android/pts: PTS test results for AVCTP
Sebastian Chlad [Wed, 29 Jan 2014 10:33:26 +0000 (12:33 +0200)]
android/pts: PTS test results for L2CAP
Johan Hedberg [Wed, 29 Jan 2014 22:49:16 +0000 (14:49 -0800)]
monitor: Add SMP key distribution decoding
Luiz Augusto von Dentz [Wed, 29 Jan 2014 18:28:01 +0000 (10:28 -0800)]
audio/AVRCP: Fix not freeing pending_pdu if session is detroyed
This fixes possibly leaking pending_pdu if the session is destroyed.
Andrei Emeltchenko [Wed, 29 Jan 2014 12:41:14 +0000 (14:41 +0200)]
unit/avctp: Add TP/NFR/BI-01-C test
To verify that the IUT (TG) reports to the test system (CT) the
reception of a control message intended for an invalid PID (PID not
registered for reception of messages).
Andrei Emeltchenko [Wed, 29 Jan 2014 12:41:13 +0000 (14:41 +0200)]
unit/avctp: Add TP/NFR/BV-02-C test
To verify that the IUT (TG) formats correctly the following fields of
the AVCTP response message: “transaction label”, "message type(R)", PID,
“packet type”, IPID and “message information”. Check that AVCTP send
response packet along with other information. Payload is out of scope of
this test (AVC_CTYPE_REJECTED is OK).
Andrei Emeltchenko [Wed, 29 Jan 2014 12:41:12 +0000 (14:41 +0200)]
unit/avctp: Add AVCTP unit test skeleton and first test
Adds test TP/NFR/BV-01-C. To verify that the IUT (CT) formats correctly
the following fields of the AVCTP command message: “transaction label”,
"message type(C)", PID, “packet type”, IPID and “message information”.
Szymon Janc [Wed, 29 Jan 2014 15:45:02 +0000 (16:45 +0100)]
android/a2dp: Fix crash on remote disconnection
Remove setups when a2dp device is removed. This fix following:
Invalid read of size 4
at 0x115E32: bt_stream_close (a2dp.c:1352)
by 0x111DFB: ipc_handle_msg (ipc.c:95)
by 0x11234B: audio_watch_cb (audio-ipc.c:67)
by 0x48BD9C7: ??? (in /system/lib/libglib.so)
Address 0x4a590f4 is 12 bytes inside a block of size 20 free'd
at 0x4897E6C: free (in
/system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
by 0x48C5E2B: g_free (in /system/lib/libglib.so)
Invalid read of size 4
at 0x113638: avdtp_close (avdtp.c:3201)
by 0x115E39: bt_stream_close (a2dp.c:1352)
by 0x111DFB: ipc_handle_msg (ipc.c:95)
by 0x11234B: audio_watch_cb (audio-ipc.c:67)
by 0x48BD9C7: ??? (in /system/lib/libglib.so)
Address 0x4a594a4 is 28 bytes inside a block of size 1,100 free'd
at 0x4897E6C: free (in
/system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
by 0x48C5E2B: g_free (in /system/lib/libglib.so)
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:06 +0000 (14:36 +0200)]
android/avctp: Move AVC_HEADER_LENGTH from avctp header
There is currently inconsistence in the avctp code with
AVC_HEADER_LENGTH defined in avctp.h but AVCTP_HEADER_LENGTH defined in
avctp.c. Move definition to place it is actually used in consistent way.
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:05 +0000 (14:36 +0200)]
avctp: Fix wrong error message
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:04 +0000 (14:36 +0200)]
avctp: Use predefined HEADER_LENGTH instead of sizeof
Make code consistent with using HEADER_LENGTH already defined and used
instead of sizeof(). Remove also ugly type conversion.
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:03 +0000 (14:36 +0200)]
avctp: trivial: Do not break short line
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:02 +0000 (14:36 +0200)]
avctp: Use already calculated avc header
This removes long (81 characters) line as a side effect.
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:01 +0000 (14:36 +0200)]
android/avctp: Fix wrong error message
Andrei Emeltchenko [Wed, 29 Jan 2014 12:36:00 +0000 (14:36 +0200)]
android/avctp: Use predefined HEADER_LENGTH instead of sizeof
Make code consistent with using HEADER_LENGTH defined. Remove also type
conversion.
Luiz Augusto von Dentz [Tue, 28 Jan 2014 19:46:29 +0000 (11:46 -0800)]
audio/AVRCP: Fix sending invalid response to GetCapabilities
The attribute count has to be initialized with 0 since we reuse the same
buffer for both command and responses it may be already be set causing
invalid response to be generated.
Szymon Janc [Wed, 29 Jan 2014 16:08:05 +0000 (17:08 +0100)]
android/bluetooth: Fix unbonding device on auth failure
This was causing removal of device info from storage and resulting in
loosing bond after bluetoothd restart.
Szymon Janc [Sun, 26 Jan 2014 16:03:17 +0000 (17:03 +0100)]
android/README: Update with kernel requirements
Szymon Janc [Sun, 26 Jan 2014 15:40:32 +0000 (16:40 +0100)]
android/README: Add information about SBC requirement
Szymon Janc [Sun, 26 Jan 2014 15:40:05 +0000 (16:40 +0100)]
android/README: Fix typo
Marcel Holtmann [Wed, 29 Jan 2014 02:30:53 +0000 (18:30 -0800)]
doc: Add the mgmt interface versions and how the map to kernel releases
Johan Hedberg [Tue, 28 Jan 2014 23:58:24 +0000 (01:58 +0200)]
tools/l2cap-tester: Add getpeername test case when not connected
Luiz Augusto von Dentz [Tue, 28 Jan 2014 23:40:30 +0000 (15:40 -0800)]
build: Fix make check
Fix not checking for ENOTSOCK while setting priority.
Luiz Augusto von Dentz [Tue, 28 Jan 2014 17:14:46 +0000 (09:14 -0800)]
android/hal-audio: Set stream fd to blocking
This makes the stream to block on io operation so it does not return
EAGAIN on syscall such as write.
Luiz Augusto von Dentz [Tue, 28 Jan 2014 17:14:45 +0000 (09:14 -0800)]
android/hal-audio: Fix not handling EINTR errors
If the kernel interrupts us while writting just try again.
Luiz Augusto von Dentz [Tue, 28 Jan 2014 17:14:44 +0000 (09:14 -0800)]
android/AVDTP: Make stream channel priority 5
This makes channel priority 5 so it has higher priority than regular
traffic but less than signalling channel.
Luiz Augusto von Dentz [Tue, 28 Jan 2014 17:14:43 +0000 (09:14 -0800)]
android/AVDTP: Make signalling channel priority 6
This makes signalling priority 6 so it can push commands before the
stream channel, without this the stream channel may be schedule
first and cause the signalling commands to timeout while waiting a slot.
Johan Hedberg [Tue, 28 Jan 2014 18:15:36 +0000 (20:15 +0200)]
core: Fix rejecting ATT packets greater than the negotiated MTU
Sebastian Chlad [Tue, 28 Jan 2014 12:56:45 +0000 (14:56 +0200)]
android/pts: PTS test results for GAP
Sebastian Chlad [Tue, 28 Jan 2014 13:40:38 +0000 (15:40 +0200)]
android/pts: PTS test results for DID
Sebastian Chlad [Tue, 28 Jan 2014 12:11:23 +0000 (14:11 +0200)]
android/pts: PTS test results for A2DP
Sebastian Chlad [Tue, 28 Jan 2014 12:25:56 +0000 (14:25 +0200)]
android/pts: Add PTS test results for AVRCP
Ravi kumar Veeramally [Thu, 23 Jan 2014 13:39:26 +0000 (15:39 +0200)]
android/pan: Handle error case properly in NAP registration
Ravi kumar Veeramally [Thu, 23 Jan 2014 13:39:25 +0000 (15:39 +0200)]
android/pan: Fix control state change callback parameters order
Callback declared in bt_pan.h is
'typedef void (*btpan_control_state_callback)
(btpan_control_state_t state, bt_status_t error, int local_role,
const char* ifname);
But PanService.Java defined it wrong way.
private void onControlStateChanged(int local_role, int state,
int error, String ifname).
First and third parameters are misplaced, so sending data according
to PanService.Java, discard this fix if issue fixed in PanService.Java.
Anderson Lizardo [Sun, 26 Jan 2014 01:44:01 +0000 (21:44 -0400)]
android: Trivial replacement of tabs where spaces are expected
Anderson Lizardo [Sun, 26 Jan 2014 01:44:00 +0000 (21:44 -0400)]
android: Remove useless extra parenthesis
Anderson Lizardo [Sun, 26 Jan 2014 01:43:59 +0000 (21:43 -0400)]
android/tester: Fix crash on failure inside setup()
The various setup_* functions were still continuing even though setup()
failed and did not initialize data->if_bluetooth properly.
Also do a little refactoring by moving tester_setup_failed() calls to
the setup() callers, so they stay close to the other failure points and
not hidden deep into a helper function.
Crash detected by Valgrind:
==4959== Invalid read of size 4
==4959== at 0x805967A: setup_base (android-tester.c:2029)
==4959== by 0x8055541: setup_callback (tester.c:373)
==4959== by 0x408348F: g_idle_dispatch (gmain.c:5250)
==4959== by 0x4086A75: g_main_context_dispatch (gmain.c:3065)
==4959== by 0x4086E14: g_main_context_iterate.isra.23 (gmain.c:3712)
==4959== by 0x40872FA: g_main_loop_run (gmain.c:3906)
==4959== by 0x41744D2: (below main) (libc-start.c:226)
==4959== Address 0x4 is not stack'd, malloc'd or (recently) free'd
Petri Gynther [Sat, 25 Jan 2014 00:55:06 +0000 (16:55 -0800)]
core: Rename adapter_remove_device to btd_adapter_remove_device
Allow this symbol to be exported and usable from external plugins.
Andrei Emeltchenko [Mon, 27 Jan 2014 16:01:44 +0000 (18:01 +0200)]
android/avctp: Trivial cleanup code
Avoid extra header calculation and fix wrong line indentation.
Andrei Emeltchenko [Mon, 27 Jan 2014 16:01:43 +0000 (18:01 +0200)]
unit/avdtp: trivial: Remove empty line
Andrei Emeltchenko [Mon, 27 Jan 2014 08:36:09 +0000 (10:36 +0200)]
unit/ringbuf: Fix memory leak
free allocated memory before exit
Anderson Lizardo [Sun, 26 Jan 2014 01:44:02 +0000 (21:44 -0400)]
emulator: Fix crash if socket(AF_ALG) is not supported by the kernel
In this situation, smp_stop() was being called with NULL pointer.
Crash detected by valgrind:
==7925== Invalid read of size 4
==7925== at 0x8052F18: smp_stop (smp.c:480)
==7925== by 0x8052542: bthost_stop (bthost.c:2073)
==7925== by 0x805521D: hciemu_unref (hciemu.c:372)
==7925== by 0x8058C65: test_post_teardown (android-tester.c:464)
==7925== by 0x8055DE7: tester_teardown_complete (tester.c:533)
==7925== by 0x8055501: teardown_callback (tester.c:312)
==7925== by 0x408348F: g_idle_dispatch (gmain.c:5250)
==7925== by 0x4086A75: g_main_context_dispatch (gmain.c:3065)
==7925== by 0x4086E14: g_main_context_iterate.isra.23 (gmain.c:3712)
==7925== by 0x40872FA: g_main_loop_run (gmain.c:3906)
==7925== by 0x41744D2: (below main) (libc-start.c:226)
==7925== Address 0x8 is not stack'd, malloc'd or (recently) free'd
Anderson Lizardo [Sun, 26 Jan 2014 01:34:21 +0000 (21:34 -0400)]
shared: Fix undefined behavior when calculating next power of two
According to GCC documentation, __builtin_clz() is undefined if argument
is zero. The following problem was detected when compiling with -O0:
ERROR:unit/test-ringbuf.c:70:test_power2: assertion failed: (size1 ==
size2)
Also refactor align_power2() so the internal "find last set bit"
operation is in its own fls() function (similar to how kernel does).
fls() checks if argument is zero before calling __builtin_clz().
Anderson Lizardo [Sun, 26 Jan 2014 01:34:20 +0000 (21:34 -0400)]
unit/test-ringbuf: Fix indentation
Marcel Holtmann [Mon, 27 Jan 2014 04:04:29 +0000 (20:04 -0800)]
android: Fix typo in configure.ac path
Marcel Holtmann [Mon, 27 Jan 2014 03:40:51 +0000 (19:40 -0800)]
android: Second attempt to extrac version number for OSX builds
Luiz Augusto von Dentz [Thu, 23 Jan 2014 15:58:05 +0000 (17:58 +0200)]
android/AVRCP: Add initial socket handling
This adds the initial socket listening and handling incoming connections.
Luiz Augusto von Dentz [Thu, 23 Jan 2014 15:55:20 +0000 (17:55 +0200)]
android/AVCTP: Add avctp_set_destroy_cb
This adds avctp_set_destroy_cb that can be use to set a callback when
the AVCTP has been disconnected.
Luiz Augusto von Dentz [Thu, 23 Jan 2014 13:31:45 +0000 (15:31 +0200)]
android/AVRCP: Add implementation of SDP record
This adds the following record:
Service Name: AVRCP TG
Service RecHandle: 0x10002
Service Class ID List:
"AV Remote Target" (0x110c)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 23
"AVCTP" (0x0017)
uint16: 0x103
Profile Descriptor List:
"AV Remote" (0x110e)
Version: 0x0100
Luiz Augusto von Dentz [Thu, 23 Jan 2014 14:37:07 +0000 (16:37 +0200)]
android/haltest: Add init and cleanup calls to rc methods
Luiz Augusto von Dentz [Thu, 23 Jan 2014 14:30:21 +0000 (16:30 +0200)]
android: Add initial skeleton for AVRCP in the HAL
Luiz Augusto von Dentz [Thu, 23 Jan 2014 13:04:12 +0000 (15:04 +0200)]
android: Add initial skeleton for AVRCP in the daemon
Luiz Augusto von Dentz [Wed, 22 Jan 2014 11:35:33 +0000 (13:35 +0200)]
android/AVCTP: Strip dependencies
This strips AVCTP code of any dependency of core and btio to make it
transport agnostic.
Luiz Augusto von Dentz [Wed, 22 Jan 2014 09:21:36 +0000 (11:21 +0200)]
android: Add copy of current AVCTP implemention
These files are not added to any makefile on purpose because they still
have external dependencies.
Marcel Holtmann [Sun, 26 Jan 2014 23:12:22 +0000 (15:12 -0800)]
android: Use sed instead of cpp to extract version number
Marcel Holtmann [Sun, 26 Jan 2014 08:27:02 +0000 (00:27 -0800)]
android: Fix leftover src/log.h include
Marcel Holtmann [Sun, 26 Jan 2014 08:23:15 +0000 (00:23 -0800)]
android: Use src/log.h include instead of just log.h
Marcel Holtmann [Sun, 26 Jan 2014 04:42:49 +0000 (20:42 -0800)]
android: Remove unneeded include path for src directory
Marcel Holtmann [Sun, 26 Jan 2014 04:33:04 +0000 (20:33 -0800)]
obexd: Make btio/btio.h include local
Marcel Holtmann [Sun, 26 Jan 2014 04:32:57 +0000 (20:32 -0800)]
attrib: Make btio/btio.h include local
Marcel Holtmann [Sun, 26 Jan 2014 04:32:45 +0000 (20:32 -0800)]
profiles: Make btio/btio.h include local
Marcel Holtmann [Sun, 26 Jan 2014 04:32:27 +0000 (20:32 -0800)]
build: Make btio/btio.h include local
Marcel Holtmann [Sun, 26 Jan 2014 04:31:48 +0000 (20:31 -0800)]
tools: Make btio/btio.h include local
Marcel Holtmann [Sun, 26 Jan 2014 04:11:46 +0000 (20:11 -0800)]
build: Remove unneeded include directories
Marcel Holtmann [Sun, 26 Jan 2014 04:11:19 +0000 (20:11 -0800)]
android: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 04:10:58 +0000 (20:10 -0800)]
tools: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 04:10:24 +0000 (20:10 -0800)]
core: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 04:10:00 +0000 (20:10 -0800)]
attrib: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 04:09:45 +0000 (20:09 -0800)]
plugins: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 04:08:59 +0000 (20:08 -0800)]
profiles: Use full include path for header files
Marcel Holtmann [Sun, 26 Jan 2014 01:08:28 +0000 (17:08 -0800)]
android: Avoid using src include path for btmgmt tool
Marcel Holtmann [Sun, 26 Jan 2014 00:58:24 +0000 (16:58 -0800)]
tools: Use direct include from shared files in src directory
Marcel Holtmann [Sun, 26 Jan 2014 00:47:53 +0000 (16:47 -0800)]
android: No need to use special include for src/shared headers
Marcel Holtmann [Sun, 26 Jan 2014 00:46:11 +0000 (16:46 -0800)]
shared: Use full include path for shared headers
Marcel Holtmann [Sun, 26 Jan 2014 00:41:40 +0000 (16:41 -0800)]
android: Remove the unneeded include path for libsbc
Marcel Holtmann [Sun, 26 Jan 2014 00:28:44 +0000 (16:28 -0800)]
android: Enable SBC_HIGH_PRECISION build for libsbc
Marcel Holtmann [Sat, 25 Jan 2014 22:33:13 +0000 (14:33 -0800)]
shared: Define MIN() macro if not present
Marcel Holtmann [Sat, 25 Jan 2014 22:18:08 +0000 (14:18 -0800)]
android: Compile with ring buffer and HFP framework
Johan Hedberg [Sat, 25 Jan 2014 18:55:17 +0000 (20:55 +0200)]
tools/l2cap-tester: Add MTU checks after successful connections
Johan Hedberg [Sat, 25 Jan 2014 17:53:02 +0000 (19:53 +0200)]
tools/l2cap-tester: Fix error message for setsockopt failure
Anderson Lizardo [Sat, 25 Jan 2014 01:54:01 +0000 (21:54 -0400)]
tools/l2cap-tester: Test setsockopt(BT_SECURITY) on LE client
Although setting a security level using setsockopt(BT_SECURITY) is
optional for LE sockets (it will default to doing
unencrypted/unauthenticated connection), it is a common operation and it
is done by BlueZ daemon and some tools.
Marcel Holtmann [Sat, 25 Jan 2014 20:17:09 +0000 (12:17 -0800)]
emulator: Add simple HFP emulator for testing
Marcel Holtmann [Sat, 25 Jan 2014 20:14:38 +0000 (12:14 -0800)]
shared: Add simple framework for HFP command processing
Marcel Holtmann [Sat, 25 Jan 2014 19:30:52 +0000 (11:30 -0800)]
unit: Add basic unit test for queue handling
Marcel Holtmann [Sat, 25 Jan 2014 19:27:47 +0000 (11:27 -0800)]
shared: Include stdint.h for uintptr_t handling
Marcel Holtmann [Sat, 25 Jan 2014 19:17:45 +0000 (11:17 -0800)]
doc: Add test case numbers from ring buffer unit tests
Marcel Holtmann [Sat, 25 Jan 2014 19:08:25 +0000 (11:08 -0800)]
unit: Add basic tests for simple ring buffer support
Marcel Holtmann [Sat, 25 Jan 2014 19:06:59 +0000 (11:06 -0800)]
shared: Add simple generic ring buffer support
Marcel Holtmann [Sat, 25 Jan 2014 18:43:49 +0000 (10:43 -0800)]
monitor: Avoid using bdaddr_t and ba2str in packet handling
Marcel Holtmann [Sat, 25 Jan 2014 09:19:18 +0000 (01:19 -0800)]
shared: Add macros for unaligned access
Marcel Holtmann [Sat, 25 Jan 2014 05:35:35 +0000 (21:35 -0800)]
unit: Check ntoh64 and htob64 against shared conversion functions
Marcel Holtmann [Sat, 25 Jan 2014 05:35:08 +0000 (21:35 -0800)]
shared: Add conversion function for big endian data types
Marcel Holtmann [Sat, 25 Jan 2014 05:28:42 +0000 (21:28 -0800)]
shared: Avoid using GLib allocation functions for tester
Marcel Holtmann [Sat, 25 Jan 2014 05:19:48 +0000 (21:19 -0800)]
doc: Update unit test coverage numbers