OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agoandroid/a2dp: Add implementation of SDP record
Luiz Augusto von Dentz [Thu, 14 Nov 2013 15:01:28 +0000 (17:01 +0200)]
android/a2dp: Add implementation of SDP record

This adds the following record:

Service Name: Audio Source
Service RecHandle: 0x10001
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x103
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0103

11 years agoandroid/build: Remove unnecessary mentions of source files in EXTRA_DIST
Johan Hedberg [Thu, 14 Nov 2013 13:57:27 +0000 (15:57 +0200)]
android/build: Remove unnecessary mentions of source files in EXTRA_DIST

11 years agoandroid/build: Add missing header files to android_haltest_SOURCES
Johan Hedberg [Thu, 14 Nov 2013 13:56:51 +0000 (15:56 +0200)]
android/build: Add missing header files to android_haltest_SOURCES

11 years agoandroid: Rename bluetooth service functions to match service name
Szymon Janc [Tue, 12 Nov 2013 23:48:20 +0000 (23:48 +0000)]
android: Rename bluetooth service functions to match service name

Make public functions match service name.

11 years agoandroid: Rename adapter.c to bluetooth.c
Szymon Janc [Thu, 14 Nov 2013 12:56:50 +0000 (13:56 +0100)]
android: Rename adapter.c to bluetooth.c

Match service name that is implemened in that file. This will also
keep convention of foo.c and hal-foo.c implementing remote parts of
same service.

11 years agoandroid: Remove not needed bt_adapter_get_address function
Szymon Janc [Tue, 12 Nov 2013 23:48:18 +0000 (23:48 +0000)]
android: Remove not needed bt_adapter_get_address function

All services receive adapter address on init so there is no need for
this function. Removing it will also help keeping services not depend
on adapter service.

11 years agoandroid: Report adapter address in adapter_ready callback
Szymon Janc [Tue, 12 Nov 2013 23:48:17 +0000 (23:48 +0000)]
android: Report adapter address in adapter_ready callback

Adapter is not going to change while daemon is running so its address
can be stored after init is complete.

11 years agoandroid/hidhost: Use adapter address provided on register
Szymon Janc [Tue, 12 Nov 2013 23:48:16 +0000 (23:48 +0000)]
android/hidhost: Use adapter address provided on register

There is no need to use bt_adapter_get_address every time local address
is needed.

11 years agoandroid: Don't use static pointer for storing adapter_ready callback
Szymon Janc [Tue, 12 Nov 2013 23:48:15 +0000 (23:48 +0000)]
android: Don't use static pointer for storing adapter_ready callback

There is no need to keep ready callback for daemon lifetime as it is
not used after reporting adapter being ready. Use mgmt library feature
for passing user data so that static pointer is not needed.

11 years agoandroid: Move adapter initialization to adapter.c
Szymon Janc [Tue, 12 Nov 2013 23:48:14 +0000 (23:48 +0000)]
android: Move adapter initialization to adapter.c

There is no need to handle that in main.c. Also this removes mgmt
interface dependency from adapter API as all mgmt commands are handled
from adapter code.

Startup and shutdown timeouts handling is left in main.c.

11 years agoandroid: Make adapter static
Szymon Janc [Tue, 12 Nov 2013 23:48:13 +0000 (23:48 +0000)]
android: Make adapter static

Only one controller is used so there is no need to keep it as allocable
structure. This will also make memory management simpler and more
correct eg. adapter was never free.

Elements not directly related to adapter are kept outside of adapter
structure.

11 years agocore: Do not change service state in btd_service_connect if it fails
Luiz Augusto von Dentz [Thu, 14 Nov 2013 12:27:51 +0000 (14:27 +0200)]
core: Do not change service state in btd_service_connect if it fails

If .connect fails and the service state changes it may re-enter
connect_next, inverting the order and messing up the error of each
connect request.

11 years agoandroid/a2dp: Add initial implementation of HAL_OP_A2DP_DISCONNECT
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:21 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of HAL_OP_A2DP_DISCONNECT

11 years agoandroid/a2dp: Add initial implementation of HAL_OP_A2DP_CONNECT
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:20 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of HAL_OP_A2DP_CONNECT

11 years agoandroid/a2dp: Add initial implementation of socket handling
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:19 +0000 (12:18 +0200)]
android/a2dp: Add initial implementation of socket handling

This adds initial code to handle incoming connection and notifying
connection states.

11 years agoandroid/hal-a2dp: Add defines for possible connection states
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:18 +0000 (12:18 +0200)]
android/hal-a2dp: Add defines for possible connection states

11 years agoandroid/hal-a2dp: Add implemention of .cleanup
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:17 +0000 (12:18 +0200)]
android/hal-a2dp: Add implemention of .cleanup

11 years agoandroid/hal-a2dp: Add implemention of .init
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:16 +0000 (12:18 +0200)]
android/hal-a2dp: Add implemention of .init

11 years agoandroid/hal-a2dp: Use conn_state instead of connection_state
Luiz Augusto von Dentz [Thu, 14 Nov 2013 10:18:15 +0000 (12:18 +0200)]
android/hal-a2dp: Use conn_state instead of connection_state

This is shorter and more consistent with other HAL such as HID.

11 years agoandroid/debug: Move debug functions to hal-utils.c
Andrei Emeltchenko [Thu, 14 Nov 2013 07:14:36 +0000 (09:14 +0200)]
android/debug: Move debug functions to hal-utils.c

Debug functions will be used by HALs and haltest.

11 years agoandroid: Core service should be always registered
Szymon Janc [Wed, 13 Nov 2013 14:47:13 +0000 (15:47 +0100)]
android: Core service should be always registered

Core service is used to register other services and shall be always
consider registered.

11 years agoandroid: Shutdown if IPC command for unregistered service is received
Szymon Janc [Wed, 13 Nov 2013 14:47:12 +0000 (15:47 +0100)]
android: Shutdown if IPC command for unregistered service is received

Sending commands to not registered services is violation of IPC spec
and should result in daemon shutdown.

11 years agoaudio/A2DP: Return -ENOPROTOOPT if record doesn't exist
Luiz Augusto von Dentz [Wed, 13 Nov 2013 13:26:36 +0000 (15:26 +0200)]
audio/A2DP: Return -ENOPROTOOPT if record doesn't exist

In case record is not registered it means no endpoint is available so
return -ENOPROTOOPT to indicate that it is currently not available.

11 years agoandroid/hidhost: Use correct error structure
Andrei Emeltchenko [Wed, 13 Nov 2013 14:29:34 +0000 (16:29 +0200)]
android/hidhost: Use correct error structure

11 years agoandroid/hidhost: Fix memory leak
Andrei Emeltchenko [Wed, 13 Nov 2013 14:29:33 +0000 (16:29 +0200)]
android/hidhost: Fix memory leak

11 years agoandroid/pan: Handle connection and control state notifications
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:27 +0000 (11:25 +0200)]
android/pan: Handle connection and control state notifications

11 years agoandroid/pan: Add notify method to PAN notifications
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:26 +0000 (11:25 +0200)]
android/pan: Add notify method to PAN notifications

11 years agoandroid: Fix opcode parameter type from uint16_t to uint8_t
Ravi kumar Veeramally [Wed, 13 Nov 2013 09:25:25 +0000 (11:25 +0200)]
android: Fix opcode parameter type from uint16_t to uint8_t

11 years agoandroid/hidhost: Set info request from HAL is not supported
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:15 +0000 (17:07 +0200)]
android/hidhost: Set info request from HAL is not supported

Data from hal_cmd_hidhost_set_info is usefull only when we create
UHID device. Once device is created all the transactions will be
done through the fd. There is no way to use this information
once device is created with HID internals.

11 years agoandroid/hidhost: Remove deprecated idle opcode from ipc document
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:14 +0000 (17:07 +0200)]
android/hidhost: Remove deprecated idle opcode from ipc document

Idle time is deprecated in HID_SPEC1_1. So get and set idle time api's
are removed and not implemented. But callback is left out in Android
bt_hh.h. Generally this callback needs to be called when HAL requests
get and set idle time calls with status. So the method calls itself
removed, no point to implement this callback.
Also update GET_REPORT and VIRTUAL_UNPLUG opcode values.

11 years agoandroid/hidhost: Handle uhid output and feature events
Ravi kumar Veeramally [Tue, 12 Nov 2013 15:07:13 +0000 (17:07 +0200)]
android/hidhost: Handle uhid output and feature events

Data read on uhid events output and feature has to be send through
SET_REPORT request to HID device.

11 years agoandroid/pan: Add PAN cleanup interface implementation
Ravi kumar Veeramally [Tue, 12 Nov 2013 14:20:40 +0000 (16:20 +0200)]
android/pan: Add PAN cleanup interface implementation

11 years agoandroid/pan: Add PAN related defines and event struct to hsl-msg header
Ravi kumar Veeramally [Tue, 12 Nov 2013 14:20:39 +0000 (16:20 +0200)]
android/pan: Add PAN related defines and event struct to hsl-msg header

11 years agoandroid: Register DeviceID record when adapter is initialized
Szymon Janc [Tue, 12 Nov 2013 15:36:26 +0000 (16:36 +0100)]
android: Register DeviceID record when adapter is initialized

Register DeviceID SDP record and update local UUIDs after DeviceID
information is passed to kernel.

11 years agoandroid: Add support for getting UUIDs property
Marcin Kraglak [Tue, 12 Nov 2013 15:36:25 +0000 (16:36 +0100)]
android: Add support for getting UUIDs property

This method will call adapter_properties_cb with uuids of
adapter. Method is called also when uuid is added or removed.

11 years agoandroid: Clear adapter uuids during initialization
Marcin Kraglak [Tue, 12 Nov 2013 15:36:24 +0000 (16:36 +0100)]
android: Clear adapter uuids during initialization

Clear adapter uuids during init. We have to do it before
other profiles will be able to register sdp records and add
their uuids.

11 years agoandroid: Remove not needed include
Szymon Janc [Tue, 12 Nov 2013 15:36:23 +0000 (16:36 +0100)]
android: Remove not needed include

bt_uuid_t is not used so lib/uuid.h doesn't need to be included.

11 years agoandroid: Add and remove sdp records and uuids
Marcin Kraglak [Tue, 12 Nov 2013 15:36:22 +0000 (16:36 +0100)]
android: Add and remove sdp records and uuids

This is api for adding and removing sdp records and uuids
via mgmt interface. Local profiles have to store handle to
own records to remove them in cleanup. Additionally list of
uuids is created in bt_adapter struct.

11 years agocore: Do not attempt to connect if adapter is not powered
Luiz Augusto von Dentz [Tue, 12 Nov 2013 14:32:29 +0000 (16:32 +0200)]
core: Do not attempt to connect if adapter is not powered

If the adapter is not yet powered do not attempt to connect, also
abort any connection attempt in case of error -EHOSTUNREACH is returned
by the kernel which also means the adapter is not up or in case of
-ECONNABORTED which means the adapter was powered down during the
connection attempt.

11 years agoandroid/hidhost: Fix error handling issue incase of G_IO_HUP
Ravi kumar Veeramally [Tue, 12 Nov 2013 13:05:15 +0000 (15:05 +0200)]
android/hidhost: Fix error handling issue incase of G_IO_HUP

Incase of G_IO_HUP on GIOCondtion when hid device disconnected,
GIOCondition is combination of G_IO_IN and G_IO_HUP. Current code
tries to read as soon as it finds G_IO_IN in condition.
Apparently there is no data to read and loop continues.

11 years agoandroid/hidhost: Fix uhid create failure case
Ravi kumar Veeramally [Tue, 12 Nov 2013 09:47:19 +0000 (11:47 +0200)]
android/hidhost: Fix uhid create failure case

If uhid open or create fails then notify state and free the device.
Otherwise it replies bogus success return value on connect request.

11 years agoandroid: Update HAL with device info on incoming connection
Lukasz Rymanowski [Tue, 12 Nov 2013 12:51:39 +0000 (13:51 +0100)]
android: Update HAL with device info on incoming connection

Make sure Android have information about connecting remote device. This
is needed for example to show device name on incoming bonding request.

11 years agocore: Rename attio_error_cb to avoid conflicts with error()
Johan Hedberg [Tue, 12 Nov 2013 08:56:41 +0000 (10:56 +0200)]
core: Rename attio_error_cb to avoid conflicts with error()

In case error() gets converted to a macro having a function pointer
variable with the same name is going to cause trouble.

11 years agoobex: Use user's cache dir as a default root
Bastien Nocera [Sun, 10 Nov 2013 14:24:20 +0000 (15:24 +0100)]
obex: Use user's cache dir as a default root

It's per-user, so we won't try to overwrite somebody else's
files in /tmp when that happens. It's also (unless we have a
particularly bizarre setup) on the same partition as the destination
folder which means we can atomically move the file to the destination
with a unique filename.

11 years agoaudio/AVDTP: Remove avdtp_init and avdtp_exit
Luiz Augusto von Dentz [Mon, 11 Nov 2013 16:17:55 +0000 (18:17 +0200)]
audio/AVDTP: Remove avdtp_init and avdtp_exit

This is now done on demand by avdtp_register_sep and avdtp_unregister_sep
so the server socket is only registered when there is an endpoint
available and the record is properly registered.

11 years agogdbus: Fix trying to remove already removed sources
Bastien Nocera [Sat, 9 Nov 2013 17:02:57 +0000 (18:02 +0100)]
gdbus: Fix trying to remove already removed sources

When we return FALSE from idle handlers, the source is removed.
This will be causing warnings in glib 2.40.

See https://bugzilla.gnome.org/show_bug.cgi?id=710724

11 years agoandroid/hid: Handle virtual unplug event from hid device
Ravi kumar Veeramally [Fri, 8 Nov 2013 14:14:54 +0000 (16:14 +0200)]
android/hid: Handle virtual unplug event from hid device

If hid host receives the virtual unplug event from hid device
recipient shall destroy or invalidate all bluetooth bonding and
virtual cable information

11 years agoandroid/hal-utils: Make hal-utils functions return const string
Andrei Emeltchenko [Fri, 8 Nov 2013 14:08:50 +0000 (16:08 +0200)]
android/hal-utils: Make hal-utils functions return const string

11 years agoandroi/haltest: Make debug functions return const string
Andrei Emeltchenko [Fri, 8 Nov 2013 14:08:49 +0000 (16:08 +0200)]
androi/haltest: Make debug functions return const string

11 years agoandroid: Fix error handling in adapter_ready
Szymon Janc [Fri, 8 Nov 2013 14:00:59 +0000 (15:00 +0100)]
android: Fix error handling in adapter_ready

On error negative value is passed to adapter_ready callback. This fix
passing negative error code to strerror.

11 years agoandroid/hal-sock: Add UUID debug print in socket HAL
Andrei Emeltchenko [Fri, 8 Nov 2013 13:16:01 +0000 (15:16 +0200)]
android/hal-sock: Add UUID debug print in socket HAL

Socket HAL uses uint8_t * strings which are of size bt_uuid_t.

11 years agoandroid/debug: Convert uuid helper to use uint8_t buffer
Andrei Emeltchenko [Fri, 8 Nov 2013 13:53:29 +0000 (15:53 +0200)]
android/debug: Convert uuid helper to use uint8_t buffer

At this moment Android uses uint8_t * and bt_uuid_t for representing
UUID for different HALs. Convert debug helper to use uint8_t * string.

11 years agoandroid/hidhost: Fix up error logs to contain exact error
Johan Hedberg [Fri, 8 Nov 2013 13:46:31 +0000 (15:46 +0200)]
android/hidhost: Fix up error logs to contain exact error

11 years agoandroid: Create debug hal-utils helpers
Andrei Emeltchenko [Fri, 8 Nov 2013 13:15:59 +0000 (15:15 +0200)]
android: Create debug hal-utils helpers

Create hal-utils helpers which helps to decode packets Android
sends through HAL interface.

11 years agoandroid/hid: Add virtual unplug implemention in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:51 +0000 (14:08 +0200)]
android/hid: Add virtual unplug implemention in daemon

Send virtual unplug command to hid device and disconnect and remove
hid device details.

11 years agoandroid/hid: Add send data implemention in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:50 +0000 (14:08 +0200)]
android/hid: Add send data implemention in daemon

Send data on interrupt channel on request from hid host.

11 years agoandroid/hid: Fill send data command struct in hal-hidhost
Ravi kumar Veeramally [Fri, 8 Nov 2013 13:23:04 +0000 (15:23 +0200)]
android/hid: Fill send data command struct in hal-hidhost

11 years agoandroid/hid: Fix set report data format in daemon
Ravi kumar Veeramally [Fri, 8 Nov 2013 12:08:48 +0000 (14:08 +0200)]
android/hid: Fix set report data format in daemon

Report data coming to HAL is in ascii format, HAL sends
data in hex to daemon, so convert to binary.

11 years agoandroid/hid: Fill send data command struct in hal-hidhost
Ravi kumar Veeramally [Fri, 8 Nov 2013 13:23:03 +0000 (15:23 +0200)]
android/hid: Fill send data command struct in hal-hidhost

11 years agoandroid/client: Add ssp key confirmation helper
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:30 +0000 (13:48 +0100)]
android/client: Add ssp key confirmation helper

This patch adds handling of ssp_request_cb that prints prompt
asking user if pass key matches. User does not need to type:
bluetooth ssp_reply address BT_SSP_VARIANT_PASSKEY_CONFIRMATION 1 key

11 years agoandroid/client: Add pin handling for bind
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:29 +0000 (13:48 +0100)]
android/client: Add pin handling for bind

This patch ask user for ping in pin_request_cb, which does
what otherwise would be required to manually type
bluetooth pin_reply address pin.

11 years agoandroid/client: Add prompting for answer
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:28 +0000 (13:48 +0100)]
android/client: Add prompting for answer

This patch allows to switch to prompt mode where user will be asked
to supply some information.

11 years agoandroid/client: Split terminal_process_char
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:27 +0000 (13:48 +0100)]
android/client: Split terminal_process_char

This patch changes the way input characters are handled in function
terminal_process_char from big switch statement to smaller functions.
No functionality is changed in this patch.
Splitting to smaller functions will make easier to change behaviour
of terminal for prompt handling when user will be asked for something
and history substitution or auto completion will not be used.

11 years agoandroid/client: Add command line arguments
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:26 +0000 (13:48 +0100)]
android/client: Add command line arguments

This patch adds command line argument parsing.
Options added:
 -h, --help
 -n, --no-init - disable initialization of interfaces
     --version

11 years agoandroid/client: Initialize all interfaces at start
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:25 +0000 (13:48 +0100)]
android/client: Initialize all interfaces at start

Patch adds function that initializes all HAL interfaces.

11 years agoandroid/client: Add NELEM macro for count elements
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:24 +0000 (13:48 +0100)]
android/client: Add NELEM macro for count elements

NELEM macro will be used in several places.

11 years agoandroid/client: Export get_interface_method
Jerzy Kasenberg [Fri, 8 Nov 2013 12:48:23 +0000 (13:48 +0100)]
android/client: Export get_interface_method

This method will be used outside tab completion.c.

11 years agoandroid: Fix PAN service registration
Marcin Kraglak [Fri, 8 Nov 2013 09:51:48 +0000 (10:51 +0100)]
android: Fix PAN service registration

A2DP service was registered instead of PAN.

11 years agoandroid/hid: Rename virtual unplug define and struct
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:16 +0000 (00:10 +0200)]
android/hid: Rename virtual unplug define and struct

Renaming virtual unplug define and strcut name from VP to more
meaning full.

11 years agoandroid/ipc: Fix crash when sending file descriptor
Andrei Emeltchenko [Thu, 7 Nov 2013 15:25:35 +0000 (17:25 +0200)]
android/ipc: Fix crash when sending file descriptor

Since CMSG_FIRSTHDR is defined as shown below:

  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)

it return NULL if msg_controllen is not defined. Accessing
that pointer result in daemon crash.

11 years agogitignore: Add tools/smp-tester to .gitignore
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:25:41 +0000 (00:25 +0200)]
gitignore: Add tools/smp-tester to .gitignore

11 years agoandroid/hid: Handle virtual unplug notification in HID HAL
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:18 +0000 (00:10 +0200)]
android/hid: Handle virtual unplug notification in HID HAL

11 years agoandroid/hid: Add hid event virtual unplug structure to HAL msg headers
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:17 +0000 (00:10 +0200)]
android/hid: Add hid event virtual unplug structure to HAL msg headers

11 years agoandroid/hid: Add missing parameters in send data struct in HAL headers
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:14 +0000 (00:10 +0200)]
android/hid: Add missing parameters in send data struct in HAL headers

11 years agoandroid/hid: Add missing hid send data parameters in ipc document
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:13 +0000 (00:10 +0200)]
android/hid: Add missing hid send data parameters in ipc document

11 years agoandroid/hid: Remove fixed number of hid set report data length in ipc doc
Ravi kumar Veeramally [Thu, 7 Nov 2013 22:10:10 +0000 (00:10 +0200)]
android/hid: Remove fixed number of hid set report data length in ipc doc

HAL receives data in ascii format but it should be in hex format. So remove
fixed size of report data length and depend on report length parameter.

11 years agoandroid: Remove unnecessary allocations of fixed-size buffers
Johan Hedberg [Thu, 7 Nov 2013 20:39:26 +0000 (22:39 +0200)]
android: Remove unnecessary allocations of fixed-size buffers

11 years agoandroid: Fix sending remote device name property
Jakub Tyszkowski [Thu, 7 Nov 2013 09:31:50 +0000 (10:31 +0100)]
android: Fix sending remote device name property

Android use the full string returned even if terminated with '\0'.

11 years agoandroid: Remove redundant command complete callback
Jakub Tyszkowski [Thu, 7 Nov 2013 09:31:49 +0000 (10:31 +0100)]
android: Remove redundant command complete callback

This patch removes command complete callback used only for verbose error
reporting.

11 years agoandroid/hal: Use hidhost instead of hh in hidhost HAL
Szymon Janc [Thu, 7 Nov 2013 16:17:04 +0000 (17:17 +0100)]
android/hal: Use hidhost instead of hh in hidhost HAL

Match functions names to HAL name. Where not needed hh prefix is
removed.

11 years agoandroid: Rename hid.c to hidhost.c
Szymon Janc [Thu, 7 Nov 2013 16:17:03 +0000 (17:17 +0100)]
android: Rename hid.c to hidhost.c

Name of daemon implementation will match Android HAL name. This will
make code navigation easier as daemon part and HAL library implementation
will be in foo.c and hal-foo.c respectively.

11 years agoandroid: Rename hidhost HAL related IPC API to match service name
Szymon Janc [Thu, 7 Nov 2013 16:17:02 +0000 (17:17 +0100)]
android: Rename hidhost HAL related IPC API to match service name

Use 'Android HAL name' string from IPC doc as base for names.

11 years agoandroid: Add set/get for discovery timeout
Lukasz Rymanowski [Thu, 7 Nov 2013 15:57:44 +0000 (16:57 +0100)]
android: Add set/get for discovery timeout

Android handles discoverable timeout in Settings app, however still
expects BT stack to maintain this value so we should do it as well.
Otherwise we will get some unexpected behaviour. For now we keep
discovery_timeout only during runtime, but we need to move it to some
local storage once we will have it.

Note: That since Android Settings up handles timer there is no reason to
use discovery timer we have in kernel.

11 years agoandroid/hal: Use a2dp instead of av in a2dp HAL
Szymon Janc [Thu, 7 Nov 2013 15:32:07 +0000 (16:32 +0100)]
android/hal: Use a2dp instead of av in a2dp HAL

Match functions names to HAL name. Where not needed av prefix is
removed.

11 years agoandroid/hal: Rename hal-av.c to hal-a2dp.c
Szymon Janc [Thu, 7 Nov 2013 15:32:06 +0000 (16:32 +0100)]
android/hal: Rename hal-av.c to hal-a2dp.c

Name of HAL implementation will match Android HAL name. This will make
code navigation easier as daemon part and HAL library implementation
will be in foo.c and hal-foo.c respectively.

11 years agoandroid: Rename a2dp HAL related IPC API to match service name
Szymon Janc [Thu, 7 Nov 2013 15:32:05 +0000 (16:32 +0100)]
android: Rename a2dp HAL related IPC API to match service name

Use 'Android HAL name' string from IPC doc as base for names.

11 years agoandroid/ipc: Fix receiving file descriptors
Andrei Emeltchenko [Thu, 7 Nov 2013 14:51:38 +0000 (16:51 +0200)]
android/ipc: Fix receiving file descriptors

It does make sense iterate over !NULL controll headers. This fixes
the bug that file descriptors cannot be send over IPC.

11 years agoandroid: Use BASELEN define for property changed
Lukasz Rymanowski [Thu, 7 Nov 2013 09:19:50 +0000 (10:19 +0100)]
android: Use BASELEN define for property changed

11 years agoandroid: Use payload member to access message data
Szymon Janc [Thu, 7 Nov 2013 09:10:37 +0000 (10:10 +0100)]
android: Use payload member to access message data

This make it similar to other places in code.

11 years agoandroid: Remove includes from adapter.h
Szymon Janc [Thu, 7 Nov 2013 09:10:36 +0000 (10:10 +0100)]
android: Remove includes from adapter.h

This is internal header and dependencies should be included in
respective .c files.

11 years agoandroid: Pass notification socket fd to service handlers
Szymon Janc [Thu, 7 Nov 2013 09:10:35 +0000 (10:10 +0100)]
android: Pass notification socket fd to service handlers

IPC helpers were converted to accept socket, not GIOChannel so there
is no need of passing former to handlers.

11 years agoandroid: Make IPC helpers accept file descriptor
Szymon Janc [Thu, 7 Nov 2013 09:10:34 +0000 (10:10 +0100)]
android: Make IPC helpers accept file descriptor

There is no need to pass GIOChannel as writes are done immediately.

11 years agoandroid/hal: Rename hal_op_sock_listen to hal_cmd_sock_listen
Andrei Emeltchenko [Wed, 6 Nov 2013 14:03:33 +0000 (16:03 +0200)]
android/hal: Rename hal_op_sock_listen to hal_cmd_sock_listen

This makes structures consistent with the rest of the code.

11 years agoandroid/hal-sock: Check socket type in connect
Andrei Emeltchenko [Wed, 6 Nov 2013 14:03:31 +0000 (16:03 +0200)]
android/hal-sock: Check socket type in connect

Only RFCOMM sockets are supported in Android.

11 years agoandroid: Change name for get_disc_timeout
Lukasz Rymanowski [Wed, 6 Nov 2013 15:08:49 +0000 (16:08 +0100)]
android: Change name for get_disc_timeout

Change name to get_discoverable_timeout. Previous name could be
confusing with disconnection timeout.

11 years agoandroid: Remove useless device.{c,h} files
Johan Hedberg [Wed, 6 Nov 2013 14:38:51 +0000 (16:38 +0200)]
android: Remove useless device.{c,h} files

11 years agomonitor: Add extra packet length check for Apple vendor data
Marcel Holtmann [Wed, 6 Nov 2013 13:16:09 +0000 (05:16 -0800)]
monitor: Add extra packet length check for Apple vendor data

11 years agomonitor: Fix missing break in switch statement
Johan Hedberg [Wed, 6 Nov 2013 12:35:47 +0000 (14:35 +0200)]
monitor: Fix missing break in switch statement

11 years agotools/smp-tester: Clarify bthost callback naming
Johan Hedberg [Wed, 6 Nov 2013 11:48:03 +0000 (13:48 +0200)]
tools/smp-tester: Clarify bthost callback naming

11 years agotools/smp-tester: Add initial SMP client test code
Johan Hedberg [Wed, 6 Nov 2013 11:27:02 +0000 (13:27 +0200)]
tools/smp-tester: Add initial SMP client test code