OSDN Git Service
Andrzej Kaczmarek [Mon, 3 Feb 2014 16:55:48 +0000 (17:55 +0100)]
android/hal-audio: Fix RTP sequence numbers
Andrzej Kaczmarek [Mon, 3 Feb 2014 16:55:47 +0000 (17:55 +0100)]
android/hal-audio: Fix audio with large omtu value
This patch fixes media packet construction with devices which use large
omtu value. In such cases it's possible that we will try to fit more
than 15 SBC frames in single media packet (which is maximum possible
value as it's encoded using 4 bits) which will cause frame counter to
wrap around and provide incorrect data to SBC encoder.
This behaviour was seen on UPF with one of carkit devices which set
omtu=2688.
Andrzej Kaczmarek [Mon, 3 Feb 2014 16:55:46 +0000 (17:55 +0100)]
android/hal-audio: Print calculated SBC parameters
Andrzej Kaczmarek [Mon, 3 Feb 2014 16:55:45 +0000 (17:55 +0100)]
android/hal-audio: Be more verbose on SBC errors
Andrzej Kaczmarek [Mon, 3 Feb 2014 16:55:44 +0000 (17:55 +0100)]
android/hal-audio: Remove unsupported mono channel mode
AudioFlinger can only provide PCM 16bit Stereo data for A2DP track so
we should not advertise mono channel mode in capabilities since we
can't downmix this internally.
Szymon Janc [Mon, 3 Feb 2014 13:22:52 +0000 (14:22 +0100)]
doc: Minor whitespace fix in test-coverage.txt
Szymon Janc [Mon, 3 Feb 2014 13:22:18 +0000 (14:22 +0100)]
doc: Add test case numbers from Android IPC unit tests
Szymon Janc [Mon, 3 Feb 2014 12:56:42 +0000 (13:56 +0100)]
android/unit: Rename tests names to be more descriptive
Marcin Kraglak [Thu, 16 Jan 2014 10:05:02 +0000 (11:05 +0100)]
android/unit: Add /android_ipc/send_cmd_3 test case
This case will register service, next unregister it and send
command. Expected status is raise SIGTERM.
Marcin Kraglak [Thu, 16 Jan 2014 10:05:01 +0000 (11:05 +0100)]
android/unit: Add /android_ipc/send_cmd_2 test case
This will test sending command to previously registered service.
Marcin Kraglak [Thu, 16 Jan 2014 10:05:00 +0000 (11:05 +0100)]
android/unit: Add /android_ipc/send_cmd_1 test case
This test case will check if ipc lib will raise SIGTERM
after sending command to not registered service.
Marcin Kraglak [Thu, 16 Jan 2014 10:04:59 +0000 (11:04 +0100)]
android/ipc: Remove watches on cleanup
Remove watches on cleanup. It will avoid receiving
events after cleanup.
Marcin Kraglak [Thu, 16 Jan 2014 10:04:58 +0000 (11:04 +0100)]
android/unit: Add android IPC unit tests
It will test ipc library. First test case will check
ipc_init() call.
Johan Hedberg [Mon, 3 Feb 2014 05:49:42 +0000 (07:49 +0200)]
emulator: Fix correct link key type generation
Johan Hedberg [Mon, 3 Feb 2014 05:49:25 +0000 (07:49 +0200)]
emulator: Add HCI_Write_SSP_Debug_Mode support
Johan Hedberg [Mon, 3 Feb 2014 05:40:43 +0000 (07:40 +0200)]
tools/smp-tester: Fix expected key distribution to match latest bluetooth-next
Andrei Emeltchenko [Thu, 30 Jan 2014 14:34:51 +0000 (16:34 +0200)]
gitignore: Add unit/avctp to .gitignore
Andrei Emeltchenko [Thu, 30 Jan 2014 13:23:43 +0000 (15:23 +0200)]
android/avrcp: Close AVRCP channel on error
This fixes resource leak.
Andrei Emeltchenko [Fri, 31 Jan 2014 12:36:17 +0000 (14:36 +0200)]
avrcp: Fix printing order for browsing avrcp header
Andrei Emeltchenko [Fri, 31 Jan 2014 12:36:16 +0000 (14:36 +0200)]
avrcp: Fix printing incorrect order for avrcp control header
Andrei Emeltchenko [Fri, 31 Jan 2014 14:18:49 +0000 (16:18 +0200)]
android/hal-audio: Fix style issues
Andrei Emeltchenko [Fri, 31 Jan 2014 14:18:48 +0000 (16:18 +0200)]
android/hal-audio: Fix memory leak
Free preset if set_blocking() fails.
Andrei Emeltchenko [Fri, 31 Jan 2014 14:18:47 +0000 (16:18 +0200)]
android/hal-audio: Do not allocate memory if fd < 0
Fixes memory leak when returning bad fd we still allocate memory which
is not freed in the caller function audio_open_output_stream().
Andrei Emeltchenko [Fri, 31 Jan 2014 14:18:46 +0000 (16:18 +0200)]
android/hal-audio: Check calloc return value
calloc() might return NULL and is usually checked for NULL in BlueZ.
Luiz Augusto von Dentz [Thu, 30 Jan 2014 22:30:40 +0000 (14:30 -0800)]
audio/AVRCP: Fix not setting playable flag for folder
When listing items some folders may be set as playable but the code was
ignoring it making it impossible to play any folder.
Luiz Augusto von Dentz [Thu, 30 Jan 2014 22:47:14 +0000 (14:47 -0800)]
audio/AVRCP: Fix using the wrong octet for folder type
Folder type is the 9 octet not the 10.
Luiz Augusto von Dentz [Thu, 30 Jan 2014 22:14:49 +0000 (14:14 -0800)]
audio/player: Fix using invalid end index
When the End index is not set in ListItems the code automatically pick
the number of items as end index but the start index start with 0 so
the correct is to use number of items - 1.
Marcel Holtmann [Sun, 2 Feb 2014 08:02:34 +0000 (00:02 -0800)]
tools: Add command to btmgmt to enable/disable debug keys setting
Marcel Holtmann [Sun, 2 Feb 2014 07:54:32 +0000 (23:54 -0800)]
monitor: Decode debug-keys mgmt setting information
Marcel Holtmann [Sun, 2 Feb 2014 07:53:42 +0000 (23:53 -0800)]
tools: Decode debug keys feature within btmgmt info command
Marcel Holtmann [Sun, 2 Feb 2014 07:53:19 +0000 (23:53 -0800)]
lib: Add constants for handling debug keys setting
Marcel Holtmann [Sun, 2 Feb 2014 07:08:59 +0000 (23:08 -0800)]
tools: Remove test for invalid key_type for long term keys
Marcel Holtmann [Sun, 2 Feb 2014 07:06:19 +0000 (23:06 -0800)]
tools: Adjust mgmt-tester to new default supported features
Marcel Holtmann [Sat, 1 Feb 2014 02:46:23 +0000 (18:46 -0800)]
core: Rename authentication to key_type in mgmt_ltk_info
Marcel Holtmann [Fri, 31 Jan 2014 20:19:28 +0000 (12:19 -0800)]
doc: Describe the new debug keys command and setting
Marcel Holtmann [Sat, 1 Feb 2014 02:31:23 +0000 (18:31 -0800)]
tools: Correct a few typos in mgmt-tester
Marcel Holtmann [Sat, 1 Feb 2014 01:43:49 +0000 (17:43 -0800)]
doc: Change the authentication parameter into key_type parameter
Marcel Holtmann [Sat, 1 Feb 2014 01:41:07 +0000 (17:41 -0800)]
doc: List the possible key types for link keys
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