OSDN Git Service
Lukasz Rymanowski [Thu, 5 Dec 2013 13:59:54 +0000 (14:59 +0100)]
android/audio: Add audio-hal initial skeleton
This patch adds audio module for A2DP.
Also adds empty callbacks for stream_out, stream_in and hw_device
methods.
Lukasz Rymanowski [Thu, 5 Dec 2013 13:59:53 +0000 (14:59 +0100)]
android/audio: Add kitkat audio headers
This patch add audio headers required to implement A2DP audio module
Note that from all of these files #include <cutils/bitops.h> has been
removed. The only function used from this include is popcount() and it
is used in system/audio.h. Instead of this function we can use GCC
builtin function __builtin_popcount() which does what is needed.
Luiz Augusto von Dentz [Fri, 13 Dec 2013 12:26:11 +0000 (14:26 +0200)]
android: Add initial Android Bluetooth Audio protocol API doc
This IPC is used to communicate Android BlueZ daemon and AudioFlinger
plugin.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:42 +0000 (10:57 +0200)]
hciemu: Print error in case hci_vhci is not loaded
Error message should indicate that module is not loaded:
Opening /dev/vhci failed: No such file or directory
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:40 +0000 (10:57 +0200)]
hciemu: Make code consistent
It is enough to check for zero in __sync_sub_and_fetch(). This makes
code consistent like shown below:
./src/shared/mgmt.c: if (__sync_sub_and_fetch(&mgmt->ref_count, 1))
./src/shared/pcap.c: if (__sync_sub_and_fetch(&pcap->ref_count, 1))
./src/shared/btsnoop.c: if (__sync_sub_and_fetch(&btsnoop->ref_count, 1))
./src/shared/hciemu.c: if (__sync_sub_and_fetch(&hciemu->ref_count, 1))
Andrei Emeltchenko [Mon, 16 Dec 2013 08:57:38 +0000 (10:57 +0200)]
btmgmt: Remove unneeded code
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:57 +0000 (10:38 +0200)]
android/tester: Add Socket test invalid bdaddr
Test for zero bluetooth address in connect().
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:56 +0000 (10:38 +0200)]
android/tester: Add Socket test invalid chan and uuid
At least one of parameters: channel or uuid shouldn't be zero.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:38:55 +0000 (10:38 +0200)]
android/tester: Add Socket test read channel number after listen
After listen() call Bluedroid sends channel number as (int) through file
descriptor.
Andrei Emeltchenko [Mon, 16 Dec 2013 08:03:25 +0000 (10:03 +0200)]
android/tester: Fix syntax of test cases
Remove "Test" from every test message print and correct typo.
Szymon Janc [Sun, 15 Dec 2013 19:55:48 +0000 (20:55 +0100)]
emulator/bthost: Fix use after free in bthost_destroy
cmd was dereferenced after free. Use temp pointer for freeing.
Sebastian Chlad [Sun, 15 Dec 2013 11:47:49 +0000 (12:47 +0100)]
build: Add missing test scripts to Makefile.tools
Szymon Janc [Fri, 13 Dec 2013 14:20:41 +0000 (15:20 +0100)]
android/bluetooth: Add support for getting remote device UUIDs property
This allows to query for remote device UUIDs property.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:25 +0000 (13:44 +0100)]
android/tester: Add bdname get prop success test case
This adds bdname set property success test case. First bdname is set and
then is read.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:24 +0000 (13:44 +0100)]
android/tester: Add bdaddr get prop success test case
This adds bdaddr set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:23 +0000 (13:44 +0100)]
android/tester: Add discovery timeout set prop success test case
This adds discovery timeout set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:22 +0000 (13:44 +0100)]
android/tester: Add scan mode set prop success test case
This adds scan mode set property success test case.
Grzegorz Kolodziejczyk [Fri, 13 Dec 2013 12:44:21 +0000 (13:44 +0100)]
android/tester: Add property check and bdname set success test case
This adds handling of property check, bdname set property success.
Szymon Janc [Fri, 13 Dec 2013 12:38:11 +0000 (13:38 +0100)]
android/bluetooth: Fix missing property change notification
After setting new discoverable timeout property change notification
with new value should be send.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:54 +0000 (17:17 +0200)]
android/hal-sock: Fix returning incorrect error code
For socket type 0 we shall return BT_STATUS_PARM_INVALID.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:53 +0000 (17:17 +0200)]
android/tester: Add Socket test connect invalid sock_type L2CAP
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:52 +0000 (17:17 +0200)]
android/tester: Add Socket test connect() invalid sock_type
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:51 +0000 (17:17 +0200)]
android/socket: Do not close fd on unref
We close file descriptors in cleanup_rfsock() and leaving the default
value gives us glib warnings if we close fd already and got G_IO_NVAL in
server_cb from bt_io.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:50 +0000 (17:17 +0200)]
android/tester: Add Socket test success with valid fd
Check that Socket listen() returns valid file descriptor
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:49 +0000 (17:17 +0200)]
android/tester: trivial: Make test cases prints look nice
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:48 +0000 (17:17 +0200)]
android/tester: Check that fd is valid for Success case
For the successful test case check that file descriptor is valid through
fcntl which is cheap way.
Andrei Emeltchenko [Thu, 12 Dec 2013 15:17:47 +0000 (17:17 +0200)]
android/tester: Add Socket test invalid params: chan and uuid
For the socket listen() call parameters channel and uuid cannot be both
zeroes.
Johan Hedberg [Fri, 13 Dec 2013 10:28:18 +0000 (12:28 +0200)]
btiotest: Add missing source type to bt_io_connect calls
Johan Hedberg [Fri, 13 Dec 2013 10:19:25 +0000 (12:19 +0200)]
btio: Update to support sockopts for LE CoC sockets
Bastien Nocera [Thu, 12 Dec 2013 16:16:28 +0000 (17:16 +0100)]
sixaxis: Fix device detection
After searching past the end of the structure, the loop sometimes
found matches in the daemon's address space...
This fixes the loop to end after the elements have been exhausted.
Szymon Janc [Thu, 12 Dec 2013 15:38:57 +0000 (16:38 +0100)]
android/pts: Add PTS test results for PBAP
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 15:38:56 +0000 (16:38 +0100)]
android/pts: Add PTS test results for OPP
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 13:35:40 +0000 (14:35 +0100)]
android/pts: Add PTS test results for HID
This will allow for better tracking of current state of implementation.
Szymon Janc [Thu, 12 Dec 2013 13:35:39 +0000 (14:35 +0100)]
android/pts: Add PTS test results for GAP
This will allow for better tracking of current state of implementation.
Luiz Augusto von Dentz [Fri, 13 Dec 2013 08:38:34 +0000 (10:38 +0200)]
android/tester: Fix failing tests
Two new adapter properties were indroduced in the daemon which broke
some tests.
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:34 +0000 (14:48 +0200)]
android/tester: Add Socket listen() invalid L2CAP socket type
Check that we get BT_STATUS_UNSUPPORTED for socket type BTSOCK_L2CAP.
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:33 +0000 (14:48 +0200)]
android/hal-sock: Fix returning unsupported instead of invalid
For socket type 0 we shall return BT_STATUS_PARM_INVALID,
BT_STATUS_UNSUPPORTED shall be returned for unsupported socket types
like L2CAP.
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:32 +0000 (14:48 +0200)]
android/tester: Add Socket listen() invalid sock type
Test invalid socket type during listen()
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:31 +0000 (14:48 +0200)]
android/tester: Add Socket data to generic test data struct
Socket data will be used in generic Socket HAL tests
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:30 +0000 (14:48 +0200)]
android/tester: Add basic Socket Init test
Test get_socket_interface() and basic setup
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:29 +0000 (14:48 +0200)]
android/tester: Make generic_data structure const void pointer
This allows us to have different types of generic data, like socket
data, bluetooth data, etc.
Andrei Emeltchenko [Thu, 12 Dec 2013 12:48:28 +0000 (14:48 +0200)]
android/tester: Rename controller_setup to test_dummy
test_dummy is a better name for dummy function test.
Szymon Janc [Wed, 11 Dec 2013 15:27:18 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for PBAP
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:17 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for PAN
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:16 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for OPP
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:15 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for HID
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:14 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for GAP
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:13 +0000 (16:27 +0100)]
android/pts: Add PTS test results for DID
This will allow for better tracking of current state of implementation.
Szymon Janc [Wed, 11 Dec 2013 15:27:12 +0000 (16:27 +0100)]
android/pts: Add PTS PIXIT for DID
This complements PTS PICS configuration.
Szymon Janc [Wed, 11 Dec 2013 15:27:11 +0000 (16:27 +0100)]
android/pts: Remove PIXIT info from PICS files
Full PIXIT configuration will be provided in separate files.
Andrei Emeltchenko [Thu, 12 Dec 2013 07:48:28 +0000 (09:48 +0200)]
l2cap-tester: Close sk in error path
This fixes resource leak warnings.
Marcin Kraglak [Wed, 11 Dec 2013 11:45:59 +0000 (12:45 +0100)]
android/tester: Remove not needed line
Marcin Kraglak [Wed, 11 Dec 2013 11:45:58 +0000 (12:45 +0100)]
android/tester: Fix closing file descriptor
Don't close file descriptor if failed to create it.
Szymon Janc [Wed, 11 Dec 2013 10:31:27 +0000 (11:31 +0100)]
android/bluetooth: Code style and whitespace cleanup
This fix some random style or whitespace damages. Also moves statics
after last type definition.
Szymon Janc [Wed, 11 Dec 2013 10:31:26 +0000 (11:31 +0100)]
android/bluetooth: Add support for remote device type property
This makes daemon store remote device address type to be able to handle
remote device type property.
Szymon Janc [Wed, 11 Dec 2013 10:31:25 +0000 (11:31 +0100)]
android/bluetooth: Add support for get remote device properties command
This allows to get all properties of specified remote device.
Szymon Janc [Wed, 11 Dec 2013 10:31:24 +0000 (11:31 +0100)]
android/bluetooth: Add support for remote device RSSI
This allows to cache remote device RSSI and get it with get property
command.
Szymon Janc [Wed, 11 Dec 2013 10:31:23 +0000 (11:31 +0100)]
android/bluetooth: Add support for remote device class
This allows to cache remote device CoD and get it with get property
command.
Szymon Janc [Wed, 11 Dec 2013 10:31:22 +0000 (11:31 +0100)]
android/bluetooth: Free devices on service unregister
There is no need to keep devices list in memory if service was
unregistered.
Szymon Janc [Wed, 11 Dec 2013 10:31:21 +0000 (11:31 +0100)]
android/bluetooth: Add support for remote device friendly name
This allows to get and set remote device property with friendly name.
Storage support is still missing.
Szymon Janc [Wed, 11 Dec 2013 10:31:20 +0000 (11:31 +0100)]
android/bluetooth: Add support for adapter bonded devices property
This allows to get property with list of bonded devices.
Szymon Janc [Wed, 11 Dec 2013 10:31:19 +0000 (11:31 +0100)]
android/bluetooth: Add support for reporting adapter type property
This allows to get property with adapter type.
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:43 +0000 (12:13 +0200)]
android/pan: Fix minor white space
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:42 +0000 (12:13 +0200)]
android/pan: Fix missing cleanup calls
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:39 +0000 (12:13 +0200)]
profiles/network/server: Delete function which does nothing
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:38 +0000 (12:13 +0200)]
bnep: Move bnep related calls to bnep.h|c
Moving bnep related calls to bnep.h|c to reduce redundancy
while using same in android/*.
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:37 +0000 (12:13 +0200)]
bnep: Rename send ctrl_rsp and make it global
Renaming send_bnep_ctrl_rsp to bnep_send_ctrl_rsp and moving
to bnep.h. It is required in android/*.
Ravi kumar Veeramally [Wed, 11 Dec 2013 10:13:36 +0000 (12:13 +0200)]
bnep: Rename bnep_kill_connection to bnep_conndel
Renaming bnep_kill_connection to bnep_conndel to maintain
consistency with bnep_connadd function name.
Grzegorz Kolodziejczyk [Wed, 11 Dec 2013 10:46:37 +0000 (11:46 +0100)]
android/tester: Add status check and adapter enable, disable test cases
This adds handling of status check, enabled adapter setup method,
disable and enable fail test case.
Grzegorz Kolodziejczyk [Wed, 11 Dec 2013 10:46:36 +0000 (11:46 +0100)]
android/tester: Add basic enable test
Szymon Janc [Wed, 11 Dec 2013 10:46:35 +0000 (11:46 +0100)]
android/tester: Make HAL logging wrapper print to stderr instead of stdout
This is used for testing and for user it makes no difference. This
will allow to switch on/off verbose logging from automated android
tester.
Marcin Kraglak [Wed, 11 Dec 2013 10:46:34 +0000 (11:46 +0100)]
android/tester: Add stack initialization of stack in setup
This add stack initialization and cleanup in setup/teardown.
Marcin Kraglak [Wed, 11 Dec 2013 10:46:33 +0000 (11:46 +0100)]
android/tester: Start emulator in new process
This is needed because bluetooth->init call is blocking,
and we have to emulate normal behaviour of android environment.
That process will exit if it won't receive any message in 2 sec
or when bluetoothd will exit. Main tester thread will wait for
this process in teardown method.
Marcin Kraglak [Wed, 11 Dec 2013 10:46:32 +0000 (11:46 +0100)]
android/tester: Add pre-setup and post-teardown routines
This will add hciemu initialization and cleanup. These functions
will be called to create hci emulator and cleanup it.
Marcin Kraglak [Wed, 11 Dec 2013 10:46:31 +0000 (11:46 +0100)]
android/tester: Add android-tester
This commit add android-tester.c to tree and Makefile.am.
This will contain set of unit tests for testing android daemon.
Szymon Janc [Tue, 10 Dec 2013 15:06:22 +0000 (16:06 +0100)]
android/bluetooth: Add send_adapter_property helper function
Adapter property notification are send from multiple places so it make
sense to have helper for that. This is especially usefull for 'simple'
properties.
Szymon Janc [Tue, 10 Dec 2013 15:06:21 +0000 (16:06 +0100)]
android/bluetooth: Add send_device_property helper function
Remote device property notification will be send from multiple places
so it make sense to have helper for that. This will be especially
usefull for 'simple' properties.
Szymon Janc [Tue, 10 Dec 2013 15:06:20 +0000 (16:06 +0100)]
android/bluetooth: Add stubs for set device property command
This adds per property stubs.
Szymon Janc [Tue, 10 Dec 2013 15:06:19 +0000 (16:06 +0100)]
android/bluetooth: Add stubs for get device properties command
This adds per property stubs.
Szymon Janc [Tue, 10 Dec 2013 15:06:18 +0000 (16:06 +0100)]
android/bluetooth: Refactor send_remote_device_name_prop
Rename send_remote_device_name_prop to get_device_name and make it
accept struct device as parameter. Also return HAL status code.
This will allow to use this function also in get device property
command handler.
Szymon Janc [Tue, 10 Dec 2013 15:06:17 +0000 (16:06 +0100)]
android/bluetooth: Fix coding style issue in set_device_bond_state
Szymon Janc [Tue, 10 Dec 2013 15:06:16 +0000 (16:06 +0100)]
android/bluetooth: Use single list for device caching
This makes code much simpler and easier to follow. It is also
a preparation for supporting remote device properties getting, setting
and storing.
Szymon Janc [Tue, 10 Dec 2013 15:06:15 +0000 (16:06 +0100)]
android/bluetooth: Rename functions to match adapter properties names
This match adapter properties handling functions with properties names.
Will make code easier to understand and avoid clashes with remote
device properties functions.
Andrei Emeltchenko [Mon, 9 Dec 2013 14:17:28 +0000 (16:17 +0200)]
bnep: Remove unneeded assignment
Andrei Emeltchenko [Mon, 9 Dec 2013 14:11:21 +0000 (16:11 +0200)]
android/socket: Use getsockopt to set buffer
Use the RFCOMM socket buffer size to allocate the intermediate buffer used
for copying data between sockets to minimize context switches.
Marcel Holtmann [Tue, 10 Dec 2013 10:09:42 +0000 (02:09 -0800)]
Release 5.12
Marcel Holtmann [Tue, 10 Dec 2013 10:00:37 +0000 (02:00 -0800)]
lib: Add version information for Bluetooth 4.1
Marcel Holtmann [Tue, 10 Dec 2013 09:44:58 +0000 (01:44 -0800)]
build: Update library version
Marcel Holtmann [Tue, 10 Dec 2013 09:41:38 +0000 (01:41 -0800)]
lib: Update company identifiers
Luiz Augusto von Dentz [Tue, 10 Dec 2013 08:41:17 +0000 (10:41 +0200)]
core: Fix leaking disconnect message
If a disconnect message is pending return an error since currently the
code cannot process it in parallel.
Luiz Augusto von Dentz [Tue, 10 Dec 2013 08:41:16 +0000 (10:41 +0200)]
core: Fix not replying to DisconnectProfile
btd_service_disconnect may cause a service to disconnect before returning
which cause dev->disconnect to be set after device_profile_disconnected.
Bastien Nocera [Sat, 7 Dec 2013 14:53:41 +0000 (15:53 +0100)]
input: Fix crash when SDP record isn't available
On startup, if the SDP cache has been removed but the pairing
information is still present, we'd crash trying to access inside a NULL
record struct.
Andrei Emeltchenko [Tue, 10 Dec 2013 08:15:40 +0000 (10:15 +0200)]
core: Remove useless eir parsing function return value
Currently eir_parse always return 0 but it is checked throughout the code
(in android/bluetooth code as well in src/adapteri, etc) for return value
(err < 0) which never happens. Make function eir_parse return void. This
fixes warnings from static analyzer tools.
Szymon Janc [Mon, 9 Dec 2013 10:11:33 +0000 (11:11 +0100)]
core: Remove not needed struct adapter_keys
This is a leftover from using old storage format.
Szymon Janc [Mon, 9 Dec 2013 19:20:55 +0000 (20:20 +0100)]
core: Fix crash due to agent callback freeing the agent
Similar fix was provided for simple_agent_reply in
a2f5d438 but missed
pincode_reply case.
Fix following:
src/agent.c:agent_disconnect() Agent :1.48 disconnected
src/agent.c:set_default_agent() Default agent cleared
src/agent.c:agent_destroy() agent :1.48
src/agent.c:agent_unref() 0x4701c68: ref=1
Agent /org/bluez/agent replied with an error:
org.freedesktop.DBus.Error.NoReply, Message did not receive a reply
(timeout by message bus)
src/adapter.c:btd_adapter_pincode_reply() hci0 addr 6C:0E:0D:DB:D1:16
pinlen 0
src/agent.c:agent_unref() 0x4701c68: ref=0
src/adapter.c:btd_adapter_pincode_reply() hci0 addr 6C:0E:0D:DB:D1:16
pinlen 0
src/agent.c:agent_unref() 0x4701c68: ref=-1
src/adapter.c:btd_adapter_pincode_reply() hci0 addr 6C:0E:0D:DB:D1:16
pinlen 0
src/agent.c:agent_unref() 0x4701c68: ref=-2
...
Andrei Emeltchenko [Tue, 3 Dec 2013 16:04:54 +0000 (18:04 +0200)]
tools/obex-server-tool: Fix checking incorrect error code
chdir return -1 if error and 0 in success.
Szymon Janc [Tue, 3 Dec 2013 12:42:08 +0000 (13:42 +0100)]
android: Fix missing failure check in ipc_init
If connecting command socket failed daemon should be terminated.
Marcel Holtmann [Sun, 8 Dec 2013 16:49:36 +0000 (08:49 -0800)]
monitor: Add support for slave broadcast commands and events
Jakub Tyszkowski [Thu, 5 Dec 2013 10:37:17 +0000 (11:37 +0100)]
android/pan: Move logic from HAL to daemon
HAL should contain as little logic as possible, but we should be doing
these checks on daemon side anyway.
Jakub Tyszkowski [Thu, 5 Dec 2013 10:37:16 +0000 (11:37 +0100)]
android/pan: Move logic from HAL layer to daemon
HAL should contain as little logic as possible, but we should be doing
these checks on daemon side anyway.