OSDN Git Service
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
Marcel Holtmann [Sat, 25 Jan 2014 05:18:17 +0000 (21:18 -0800)]
tools: Use be32toh, htobe32, be64toh and htobe64 functions
Marcel Holtmann [Sat, 25 Jan 2014 05:16:27 +0000 (21:16 -0800)]
hcidump: Use be32toh, htobe32, be64toh and htobe64 functions
Marcel Holtmann [Sat, 25 Jan 2014 05:14:40 +0000 (21:14 -0800)]
shared: Use be32toh, htobe32 and htobe64 functions
Marcel Holtmann [Sat, 25 Jan 2014 05:12:38 +0000 (21:12 -0800)]
monitor: Use be32toh, htob32, be64toh and htobe64 functions
Marcel Holtmann [Sat, 25 Jan 2014 04:58:21 +0000 (20:58 -0800)]
health: Remove useless define for hton64
Marcel Holtmann [Sat, 25 Jan 2014 04:46:39 +0000 (20:46 -0800)]
unit: Add simple test case for ntoh64 hton64 functions
Andrzej Kaczmarek [Fri, 24 Jan 2014 14:50:29 +0000 (15:50 +0100)]
android: Update Audio IPC documentation
Open Stream commands now also returns outoging MTU for returned socket.
Sebastian Chlad [Fri, 24 Jan 2014 19:56:16 +0000 (14:56 -0500)]
android/pts: Add PTS test results for PBAP
Sebastian Chlad [Fri, 24 Jan 2014 20:24:49 +0000 (15:24 -0500)]
android/pts: Add PTS test results for A2DP
Andrzej Kaczmarek [Thu, 23 Jan 2014 16:59:52 +0000 (17:59 +0100)]
android/a2dp: Fix audio resume on started stream
In case stream is started from remote we'll receive Resume Stream IPC
when audio is already considered as started (i.e. on first write from
AudioFlinger). In such case we should not try to send AVDTP_START since
this will fail but just reply success over IPC instead.
Andrzej Kaczmarek [Fri, 24 Jan 2014 16:06:44 +0000 (17:06 +0100)]
android/hal-audio: Remove DBG from SBC functions
These are redundant since callers will always print some information
which can be used to see what was actually called so no need to flood
output.
Andrzej Kaczmarek [Fri, 24 Jan 2014 16:06:43 +0000 (17:06 +0100)]
android/hal-audio: Refactor error messages
Anderson Lizardo [Fri, 24 Jan 2014 19:57:49 +0000 (15:57 -0400)]
attrib: Fix crash if g_attrib_new() fails
If g_attrib_new() fails for some reason (e.g. bt_io_get() fails), it
will return NULL.
Crash reported by Valgrind:
==2845== Invalid read of size 4
==2845== at 0x40C6CC4: g_io_channel_unix_get_fd (giounix.c:655)
==2845== Address 0x3c is not stack'd, malloc'd or (recently) free'd
Szymon Janc [Fri, 24 Jan 2014 18:53:42 +0000 (19:53 +0100)]
android/bluetooth: Handle device unpaired mgmt event
Szymon Janc [Fri, 24 Jan 2014 18:46:33 +0000 (19:46 +0100)]
android/bluetooth: Check event length in mgmt_auth_failed_event
Szymon Janc [Fri, 24 Jan 2014 18:35:36 +0000 (19:35 +0100)]
android/bluetooth: Fix removing bonded device if connection failed
Szymon Janc [Fri, 24 Jan 2014 11:27:38 +0000 (12:27 +0100)]
android/bluetooth: Check not paired status in unpair_device_complete
This is needed to make sure framework is updated with proper bond state
of device.
Szymon Janc [Thu, 23 Jan 2014 22:18:10 +0000 (23:18 +0100)]
android/bluetooth: Rename devices list to cached_devices
This makes it clear what is the purpose of this list.
Szymon Janc [Thu, 23 Jan 2014 22:18:09 +0000 (23:18 +0100)]
android/bluetooth: Add support for loading caches devices from storage
Info is now stored for all devices and bond state depends on file.
Based on that devices loaded from storage are put either to cache
or to bonded_devices list.
Szymon Janc [Thu, 23 Jan 2014 22:18:08 +0000 (23:18 +0100)]
android/bluetooth: Add support for caching remote device info
Cache is limited to DEVICES_CACHE_MAX. Devices are sorted with
timestamp so if cache is full olderst device is removed.
Szymon Janc [Thu, 23 Jan 2014 22:18:07 +0000 (23:18 +0100)]
android/bluetooth: Use defines for settings and devices files paths
Szymon Janc [Thu, 23 Jan 2014 22:18:06 +0000 (23:18 +0100)]
android/bluetooth: Split devices list to devices and bonded_devices
Bonded devices are permament until unbondedn. Non-bonded devices will
be held in (size limited) cache based on timestamp property so split
list to ease separation.
Andrei Emeltchenko [Fri, 24 Jan 2014 11:42:23 +0000 (13:42 +0200)]
avrcp: Use NULL for zero pointers
Andrzej Kaczmarek [Thu, 23 Jan 2014 15:25:12 +0000 (16:25 +0100)]
android/hal-audio: Workaround AudioFlinger issues
Audio HAL code calculates accurate input stream buffer size which
allows to fill media packets with as much data as possible. However,
in most cases calculated buffer size does not work well with Android
audio code which causes glitches when playing simultaneously to
different audio output (like notification) or crashes mediaserver
when disconnecting with headset.
This patch changes input buffer size to fixed magic value 20*512 which
is used in Bluedroid Audio HAL. Such change requires that we need to
drop assumption that each input buffer can be used to fill exactly one
media packet and need to use it to fill multiple media packets. To
avoid buffering in Audio HAL, we allow that last media packet can be
filled in non-optimal way, i.e. has less data that can fit.
Szymon Janc [Thu, 23 Jan 2014 23:22:02 +0000 (00:22 +0100)]
doc: Update Android ipc-tester coverage statistics
Szymon Janc [Thu, 23 Jan 2014 23:05:37 +0000 (00:05 +0100)]
android/hidhost: Verify set info command correctness
Although it is not implemented verify command correctness for IPC
completeness.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:24 +0000 (09:25 +0100)]
android/ipc-tester: Add case for BT Set remote prop
This patch adds test for verifying data length inside
hal_cmd_set_remote_device_prop struct.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:23 +0000 (09:25 +0100)]
android/ipc-tester: Add case for BT Set adapter prop
This patch adds test for verifying data length inside
hal_cmd_set_adapter_prop struct.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:22 +0000 (09:25 +0100)]
android/ipc-tester: Add cases for A2DP msg size
Add cases testing message size veification for A2DP opcodes.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:21 +0000 (09:25 +0100)]
android/ipc-tester: Add cases for PAN msg size
Add cases testing message size verification for PAN opcodes.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:20 +0000 (09:25 +0100)]
android/ipc-tester: Add case for HIDHOST Send Data
This adds test for verifying data length inside
hal_cmd_hidhost_send_data struct.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:19 +0000 (09:25 +0100)]
android/ipc-tester: Add case for HIDHOST Set Report
This patch adds test for verifying data length inside
hal_cmd_hidhost_set_report struct.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:18 +0000 (09:25 +0100)]
android/ipc-tester: Add case for HIDHOST Set Info
This patch adds test for verifying data length inside
hal_cmd_hidhost_set_info struct.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:17 +0000 (09:25 +0100)]
android/ipc-tester: Add cases for HIDHOST msg size
Add cases testing message size verification for HIDHOST opcodes.
Jakub Tyszkowski [Wed, 22 Jan 2014 08:25:16 +0000 (09:25 +0100)]
android/ipc-tester: Add cases for SOCK msg size
Add cases testing message size verification for SOCK opcodes.
Luiz Augusto von Dentz [Thu, 23 Jan 2014 17:59:58 +0000 (19:59 +0200)]
android/A2DP: Fix invalid read after unregistering an endpoint
The endpoint is unregistered but it was still accessible via endpoints
list causing the following trace when audio HAL is closed:
Invalid read of size 8
at 0x414A49: unregister_endpoint (a2dp.c:114)
by 0x3862466477: g_slist_foreach (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x386246649A: g_slist_free_full (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x414985: audio_disconnected (a2dp.c:1446)
by 0x40FD5C: audio_watch_cb (audio-ipc.c:79)
by 0x38624492A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x3862449627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x3862449A39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4034D5: main (main.c:449)
Address 0x4cd5e68 is 8 bytes inside a block of size 32 free'd
at 0x4A07577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x386244EF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4159FD: bt_audio_close (a2dp.c:1296)
by 0x40F629: ipc_handle_msg (ipc.c:95)
by 0x40FD9F: audio_watch_cb (audio-ipc.c:67)
by 0x38624492A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x3862449627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x3862449A39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4034D5: main (main.c:449)
Szymon Janc [Thu, 23 Jan 2014 15:22:28 +0000 (16:22 +0100)]
android/hal-audio: Don't try to unregister endpoints on handler exit
audio_sk is already closed at this point so just cleanup any leftovers
in enpoints states.
Szymon Janc [Thu, 23 Jan 2014 15:22:27 +0000 (16:22 +0100)]
android/hal-audio: Simplify and fix locking
This fix various issues with locking like missing unlock on
audio_ipc_cmd() return or accesing audio_sk without holding lock.
close_thread is removed to simplify code and shutdown on listen_sk is
used to indicate that that handler thread should stop.
Lukasz Rymanowski [Thu, 23 Jan 2014 16:16:31 +0000 (17:16 +0100)]
android/audio: Fix for loading audio lib
clock_gettime requires linking with -rt for glibc versions before 2.17
Marcel Holtmann [Thu, 23 Jan 2014 17:40:00 +0000 (09:40 -0800)]
build: Don't enable Android build for make distcheck
Johan Hedberg [Thu, 23 Jan 2014 13:29:42 +0000 (15:29 +0200)]
doc: Update l2cap-tester test count
Andrei Emeltchenko [Thu, 23 Jan 2014 09:07:28 +0000 (11:07 +0200)]
btproxy: Fix resource leak
Close file descriptors before leaving.
Johan Hedberg [Thu, 23 Jan 2014 13:19:58 +0000 (15:19 +0200)]
tools/l2cap-tester: Add basic ATT Server test case
Johan Hedberg [Thu, 23 Jan 2014 13:15:17 +0000 (15:15 +0200)]
tools/l2cap-tester: Add basic ATT Client test case
Johan Hedberg [Thu, 23 Jan 2014 13:15:00 +0000 (15:15 +0200)]
tools/l2cap-tester: Fix checking for NULL test data
Luiz Augusto von Dentz [Wed, 22 Jan 2014 16:03:50 +0000 (18:03 +0200)]
android: Move audio.a2dp.default.la build definitions
This way they are not spread in different parts of Makefile.am
Luiz Augusto von Dentz [Wed, 22 Jan 2014 15:27:38 +0000 (17:27 +0200)]
android/hal-audio: Fix code style
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:53 +0000 (11:34 +0100)]
android/hal-audio: Return proper latency for stream
This patch implements get_latency() for output stream properly by
returning some meaningful value, i.e. calculated duration of single
media packet increased by fixed A2DP playback latency. This is the
same as PulseAudio does.
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:52 +0000 (11:34 +0100)]
android/hal-audio: Add proper SBC encoding
Input and output stream is configured in a way that each input buffer
can be encoded to exactly one output buffer.
Reading from AudioFlinger is synchronized based on amounts of frames
which were expected to be sent since stream was resumed, i.e. as long
as we sent enough data we can wait for period of single media packet
before we need another buffer from input. Without synchronization
we'd receive next input buffer as soon as we process current one.
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:51 +0000 (11:34 +0100)]
android/hal-audio: Read fd from Output Stream response
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:50 +0000 (11:34 +0100)]
android/hal-audio: Return proper buffer size to AudioFlinger
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:49 +0000 (11:34 +0100)]
android/hal-audio: Add resume to codec callbacks
Once stream is resumed it may be required to reset some state of codec,
i.e. in case of SBC we need to reset monotonic clock and frames count
which are used for synchronization.
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:48 +0000 (11:34 +0100)]
android/hal-audio: Calculate SBC stream parameters
This patch adds necessary calculations for SBC stream parameters.
Both input and output buffers are expected to have exact amount of
data to fill single media packet (based on transport channel MTU).
Frame duration will be used to synchronize input and output streams.
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:47 +0000 (11:34 +0100)]
android/hal-audio: Initialize SBC encoder
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:46 +0000 (11:34 +0100)]
android/hal-audio: Rename sbc_init to avoid collision with libsbc
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:45 +0000 (11:34 +0100)]
android: Build Audio HAL with SBC
Build for Android requires libsbc sources to be available in
external/bluetooth/sbc. Build for host requires libsbc package to be
installed.
Andrzej Kaczmarek [Wed, 22 Jan 2014 10:34:44 +0000 (11:34 +0100)]
android: Add MTU data to Open Stream Audio IPC
MTU value for transport channel is sent in Open Stream response, which
is required to calculate number of frames which can be packed into
single media packet.
This is to avoid including GPLv2 licensed headers in Audio HAL
implementation.
Szymon Janc [Wed, 22 Jan 2014 22:46:00 +0000 (23:46 +0100)]
android/tester: Update hidhost tests with DeviceID SDP search
Andrzej Kaczmarek [Wed, 22 Jan 2014 17:46:37 +0000 (18:46 +0100)]
android/hidhost: Fix vid and pid information
For HID device vendor, product and version numbers should be retrieved
using Device ID profile which is mandatory for devices implementing
HIDP.
Szymon Janc [Wed, 22 Jan 2014 16:35:52 +0000 (17:35 +0100)]
android/pan: Remove not needed intialization to NULL
Andrei Emeltchenko [Wed, 22 Jan 2014 16:03:58 +0000 (18:03 +0200)]
android/pan: Fix possible NULL dereference
It is better to return here since dev is not allocated and assigned NULL
value.