Commit Graph

17485 Commits

Author SHA1 Message Date
Marcel Holtmann
6d30d42da2 monitor: Use shared btsnoop for reading and writing trace files 2014-02-11 11:53:00 -08:00
Marcel Holtmann
b1e20ea79a shared: Add reading/writing support for btsnoop HCI packets 2014-02-11 11:52:14 -08:00
Marcel Holtmann
f5bf07f499 monitor: Use shared btsnoop code wherever possible 2014-02-11 11:13:59 -08:00
Marcel Holtmann
657958bdc4 shared: Add data structure for new index monitor event 2014-02-11 11:12:44 -08:00
Marcel Holtmann
56fb98f3b6 shared: Update copyright information 2014-02-11 11:04:11 -08:00
Marcel Holtmann
e691f2573a monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
Marcel Holtmann
cde69653e0 android: Update copyright and license details 2014-02-11 10:42:56 -08:00
Luiz Augusto von Dentz
6260f507a5 avrcp: Fix sending invalid attributes in GetCurrentPlayerValue
If the response to ListPlayerAttributes contains invalid attributes they
should not be send in GetCurrentPlayerValue.
2014-02-11 20:25:21 +02:00
Andrei Emeltchenko
bc13c6b63d avrcp: Fix using incorrect buffer for SetVolume
The command requires one parameter.
2014-02-11 19:21:09 +02:00
Andrei Emeltchenko
1ee30fa6ef unit/avctp: Cleanup code, remove fragmentation support 2014-02-11 19:21:09 +02:00
Andrei Emeltchenko
d3fd69d980 unit/avctp: Use pre-defined values instead of magic numbers 2014-02-11 19:21:09 +02:00
Andrzej Kaczmarek
0a38f7f3e5 android/README: Add Valgrind description 2014-02-11 17:31:42 +01:00
Andrzej Kaczmarek
1b7c044dc4 android: Add support for Valgrind in debug variants
This patch allows bluetoothd to be run with Valgrind easily in debug
variants.

For userdebug and eng variants bluetoothd is renamed to bluetoothd-main
and bluetoothd acts a wrapper to launch it either with or without
Valgrind (this is decided by value of persist.sys.bluetooth.valgrind
property).
2014-02-11 17:31:39 +01:00
Szymon Janc
ba4702b208 android/handsfree: Use uint16_t for buffer length in IPC messages
This will match other IPC messages format.
2014-02-10 16:08:50 +01:00
Szymon Janc
5827e1f047 android: Fix Handsfree volume command notification description 2014-02-10 13:38:36 +01:00
Szymon Janc
b79d1f2d39 android/hal-msg: Match handsfree structures to IPC document 2014-02-10 13:38:36 +01:00
Luiz Augusto von Dentz
ea609c0b01 android/avdtp: Fix coding style
Respect 80 columns limit.
2014-02-10 14:08:45 +02:00
Andrei Emeltchenko
6f166ec0c9 bnep: Calculate ifindex after NULL check 2014-02-10 14:08:45 +02:00
Andrei Emeltchenko
00c35d3f1d android/avdtp: Fix passing NULL pointer to memcpy
The patch fixes following clang warning:
...
profiles/audio/avdtp.c:3293:2: warning: Null pointer passed as an
argument to a 'nonnull' parameter
        memcpy(cap->data, data, length);
        ^                 ~~~~
2014-02-10 14:08:45 +02:00
Andrei Emeltchenko
47f6853fa2 android/avdtp: Fix passing NULL pointer to memcpy
send_request can be called as
send_request(session, FALSE, NULL, AVDTP_DISCOVER, NULL, 0) with NULL
pointer which is passed to memcpy().
2014-02-10 14:08:45 +02:00
Andrei Emeltchenko
600ad0f6cd android/haltest: Remove unneeded assignment 2014-02-10 14:08:45 +02:00
Szymon Janc
d2e481c322 android/build: Some whitespace fixes 2014-02-10 13:05:45 +01:00
Szymon Janc
6a43401fb7 android/build: Match compiler options used in autotools and Android.mk 2014-02-10 13:05:45 +01:00
Andrzej Kaczmarek
4190ac1223 android/a2dp: Fix audio deregistration
Unregistering a SEP can trigger abort_cfm callback if some device is
connected thus we should free setups list after all endpoints are
unregistered to avoid error in abort_cfm due to non-existing setup.
2014-02-10 13:22:57 +02:00
Andrzej Kaczmarek
496dd38b11 android/a2dp: Disconnect headset on IPC failure
In case audio IPC is suddenly disconnected (most likely due to crash of
mediaserver process) we should disconnect headset since it is no longer
associated with valid setup and cannot be used properly.
2014-02-10 13:22:57 +02:00
Andrzej Kaczmarek
17b55a1f90 android/hal-audio: Write SBC parameters to logcat 2014-02-10 13:22:57 +02:00
Andrzej Kaczmarek
3290badf07 android/hal-audio: Ignore write call when closing
We should not try to neither auto-resume nor write when state is set to
NONE as this is case when we're being closed and it's ok do ignore
write request.
2014-02-10 13:22:57 +02:00
Andrzej Kaczmarek
217b2102f1 android/a2dp: Notify audio state on SEP close 2014-02-10 13:22:57 +02:00
Andrzej Kaczmarek
4e50a5f7ff android/a2dp: Shutdown AVDTP gracefully
When shutting down AVDTP connection we first abort and wait for stream
to go to idle state before disconnecting signalling channel.
2014-02-10 13:22:56 +02:00
Andrei Emeltchenko
a7032c97ef android/haltest: Close file in case of error 2014-02-07 11:03:08 +01:00
Szymon Janc
7bb2a16843 android/pan: Bring bridge interface down before removing it
Otherwise bridge will be 'in use' and won't be removed.
2014-02-07 11:21:22 +02:00
Szymon Janc
5ab76c6042 android/pan: Pass error in nap_remove_bridge
Don't return EOPNOTSUPP but just pass error from errno.
2014-02-07 11:21:22 +02:00
Szymon Janc
b4fbbb033e android/pan: Use ioctl instead of sysfs for setting forward delay
Using sysfs is causing problems due to filesystem permissions
(bluetoothd is running as bluetooth user) and bluetoothd already has
required capabilities for setting forward delay through ioctl.
2014-02-07 11:21:22 +02:00
Ravi kumar Veeramally
ce8bf58e5f android/pan: Fix bnep interface name
Android uses bt-pan static interface in PAN profile. In server role
it uses it as bridge name. But current implementaion passes interface
names like bnep0, bnep1... Android Framework is unaware of this name
and unable to allocate IP address after profile connection setup.
2014-02-07 11:21:22 +02:00
Szymon Janc
375bed1c4d android/pan: Fix unregistering NAP bridge
This fix not removing NAP bridge in case of error or last device
disconnect.
2014-02-07 11:21:22 +02:00
Szymon Janc
29bf1a3aab android/pan: Move functions up to avoid forward declarations 2014-02-07 11:21:22 +02:00
Szymon Janc
800c6b6678 profiles/network: Allow to pass interface name to bnep_new 2014-02-07 11:21:22 +02:00
Szymon Janc
92cdd7a646 profiles/network: Use interface name passed to bnep_connadd 2014-02-07 11:21:22 +02:00
Szymon Janc
7498648468 android/client-audio: Fix not stopping play thread on write error 2014-02-06 15:08:57 +01:00
Luiz Augusto von Dentz
7af429c001 android/pan: Use g_slist_free_full to free devices list
Calling g_slist_remove within the callback of g_slist_foreach is very
inefficient as it has to iterate in the list twice to figure which
element to remove.
2014-02-06 15:23:50 +02:00
Luiz Augusto von Dentz
1d1fc983e4 android/hidhost: Use g_slist_free_full to free devices list
Calling g_slist_remove within the callback of g_slist_foreach is very
inefficient as it has to iterate twice in the list to figure which
element to remove.
2014-02-06 15:23:00 +02:00
Luiz Augusto von Dentz
939d25f0b0 android/AVRCP: Fix possible invalid read
Like in A2DP case it is not safe to call g_slist_remove within
g_slist_free_full callback.
2014-02-06 14:32:18 +02:00
Luiz Augusto von Dentz
8da3f38086 android/A2DP: Fix invalid read
Invalid read of size 8
   at 0x30EE465A78: g_slice_free_chain_with_offset (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x418209: bt_a2dp_unregister (a2dp.c:1576)
   by 0x4039E6: main (main.c:347)
 Address 0x4f2d248 is 8 bytes inside a block of size 16 free'd
   at 0x4A07577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x30EE44EF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x30EE4655CA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x30EE465F0C: g_slist_remove (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x41645F: a2dp_device_free (a2dp.c:174)
   by 0x30EE466477: g_slist_foreach (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x30EE46649A: g_slist_free_full (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x418209: bt_a2dp_unregister (a2dp.c:1576)
   by 0x4039E6: main (main.c:347)
2014-02-06 14:00:56 +02:00
Luiz Augusto von Dentz
cbce18be22 audio/AVCTP: Lookup key name from key_map table
The key_map table already contain the key name.
2014-02-05 16:23:42 +02:00
Luiz Augusto von Dentz
b47d64f7a5 audio/AVCTP: Add keys that can be mapped to uinput
This adds the remaining AV/C keys that can be mapped to uinput.
2014-02-05 16:22:22 +02:00
Jakub Tyszkowski
83c7a21fe4 android/client-audio: Add sine generator as fallback
When no audio file path is provided use sine generator.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
5002b8a9b9 android/client-audio: Add init_check
Add calling init check for audio device.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
11bdba6ee4 android/client-audio: Add setting sample rate
Add setting sample rate for output stream.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
0a72877566 android/client-audio: Add set_parameters
Add seting output stream parameters using key=value pairs string
(key1=value1;key2=value2).
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
0fa227bd77 android/client-audio: Add get_parameters for output
Get current parameters for the audio stream.
2014-02-05 15:08:24 +01:00