Commit Graph

890 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
5903b4f510 android/AVDTP: Fix invalid free of struct discover
If callback releases the last reference it can cause the following:
Invalid free() / delete / delete[] / realloc()
   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 0x410356: finalize_discovery (avdtp.c:933)
   by 0x414462: session_cb (avdtp.c:2555)
   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 0x403A95: main (main.c:439)
 Address 0x4cf7af0 is 0 bytes inside a block of size 24 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 0x410356: finalize_discovery (avdtp.c:933)
   by 0x4110BC: avdtp_unref (avdtp.c:1026)
   by 0x416491: a2dp_device_free (a2dp.c:122)
   by 0x4165DF: bt_a2dp_notify_state (a2dp.c:166)
   by 0x417170: discover_cb (a2dp.c:333)
   by 0x41034E: finalize_discovery (avdtp.c:931)
   by 0x414462: session_cb (avdtp.c:2555)
   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)
2014-01-14 11:53:00 +01:00
Luiz Augusto von Dentz
d2ba4c96ac audio/A2DP: Add implemention of SEP abort confirmation 2014-01-14 11:53:00 +01:00
Luiz Augusto von Dentz
b0b5ef76f8 audio/A2DP: Add implemention of SEP close confirmation 2014-01-14 11:53:00 +01:00
Luiz Augusto von Dentz
f0552102b4 audio/A2DP: Add implemention of SEP suspend confirmation 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
85dfe54a9e audio/A2DP: Add implemention of SEP start confirmation 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
a7e6f93477 audio/A2DP: Add implemention of SEP open confirmation 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
54ed16806e audio/A2DP: Add implemention of SEP set_configuration confirmation 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
cce40aefe2 android/A2DP: Discover endpoints when initiator 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
38305eb3a9 audio/A2DP: Add implemention of SEP suspend indication 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
18f5cab60b audio/A2DP: Add implemention of SEP start indication 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
4ae4b66c99 audio/A2DP: Add implemention of SEP close indication 2014-01-14 11:52:59 +01:00
Luiz Augusto von Dentz
7f2f807a69 audio/A2DP: Add implemention of SEP open indication 2014-01-14 11:52:59 +01:00
Andrzej Kaczmarek
2ea6eff01a android/a2dp: Fix buffer size calculation for codec caps 2014-01-13 15:10:28 +02:00
Luiz Augusto von Dentz
4830daffa2 audio/A2DP: Add implemention of audio Suspend Stream command 2014-01-13 14:33:16 +02:00
Luiz Augusto von Dentz
712aae3add audio/A2DP: Add implemention of audio Resume Stream command 2014-01-13 14:33:16 +02:00
Luiz Augusto von Dentz
31993b0a0e audio/A2DP: Add implemention of audio Close Stream command 2014-01-13 14:33:16 +02:00
Luiz Augusto von Dentz
a385cf8295 audio/A2DP: Add implemention of audio Open Stream command 2014-01-13 14:33:16 +02:00
Luiz Augusto von Dentz
48449b6632 audio/A2DP: Add implemention of audio Close command 2014-01-13 14:33:16 +02:00
Luiz Augusto von Dentz
bb36b8aa44 audio/A2DP: Add implemention of audio Open command 2014-01-13 14:33:16 +02:00
Jakub Tyszkowski
28429dcd1e android/pics: Add PICS and PIXIT for A2DP
Add PICS/PIXIT for A2DP targeting Android 4.4.
2014-01-13 11:04:26 +01:00
Jakub Tyszkowski
4a88ffb177 android/pics: Add PICS and PIXIT for AVRCP
Add PICS/PIXIT for AVRCP targeting Android 4.4.
2014-01-13 11:04:26 +01:00
Szymon Janc
cd8e325779 android/pan: Generate file path in compile time
This reduce need of using snprintf function and removes need of manual
buffer size calculation.
2014-01-13 10:21:18 +01:00
Marcin Kraglak
9f4ce6e0a5 android-tester: Add possibility to debug mgmt
Print mgmt debug info if debug flag is set in android-tester.
2014-01-13 10:44:45 +02:00
Jakub Tyszkowski
dcb7f311db android/pts: Update PTS results for MAP
Update MAP PTS results for BlueZ stack on Nexus4 (Android 4.4.2).
2014-01-13 10:40:36 +02:00
Andrzej Kaczmarek
bee4fe3c78 android/ipc: Use proper handlers in ipc_handle_msg
ipc_handle_msg() should use handlers passed as function parameter
instead of static one as otherwise Audio IPC will use incorrect
handlers.
2014-01-13 08:57:49 +01:00
Andrzej Kaczmarek
84a8ca8d81 android/ipc: Fix arguments order in DBG 2014-01-13 08:57:49 +01:00
Szymon Janc
da6f8e532c android/bluetooth: Fix compare function when finding devices
Elements on list are struct device not bdaddr_t so make comparing
function use proper types. This was working so far only due to
bdaddr_t being first element in struct device.
2014-01-12 20:43:15 +01:00
Szymon Janc
9b174ddfe2 android/bluetooth: Use helper for finding device 2014-01-12 20:43:07 +01:00
Marcel Holtmann
ce2ecab244 android: Change BREDR into BR/EDR for test case descriptions 2014-01-11 20:19:04 -08:00
Szymon Janc
d45c6df386 android/tester: Update bluetooth tests with DONE status 2014-01-11 17:15:41 +01:00
Szymon Janc
c31615b82b android/bluetooth: Log error for any non-success code
Returning non-SUCCESS code in command reply is considered error and
that includes DONE status.
2014-01-11 17:15:41 +01:00
Szymon Janc
86905a8968 android/bluetooth: Rename labels from failed to reply
This name match better and avoid confusion when setting status to
SUCCESS and then jumping to failed label.
2014-01-11 17:15:41 +01:00
Szymon Janc
b4dac30570 android/bluetooth: Use HAL_STATUS_SUCCESS instead of _DONE in replies
JNI code in Android is mapping returned code to boolean value. Only
SUCCESS status is mapped to true and that value is returned to Java
code. This could result in faultyly triggering error path in Java
when returning DONE in command reply.
2014-01-11 17:15:41 +01:00
Luiz Augusto von Dentz
96375e8ad2 android/audio-msg: Simplify audio_rsp_open_stream
Reuse audio_preset in audio_rsp_open_stream since the data type is the
same.
2014-01-11 11:24:31 +02:00
Marcel Holtmann
883486009f android: Use LinkKeyPinLength instead of LinkKeyPINLength 2014-01-11 01:14:28 -08:00
Marcel Holtmann
93d858bcd2 android: Enable secure connections if supported 2014-01-11 01:13:46 -08:00
Luiz Augusto von Dentz
5e0582451a android: Fix not using AM_CFLAGS in the HAL modules
Both bluetooth.audio.so and audio.a2dp.default.so should use AM_CFLAGS
ortherwise some quite obvious errors that otherwise would break the
build may be pushed upstream.
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
518f1bdb15 android/audio: Add audio_ipc_cleanup function 2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
7560d1cd76 android/audio: Refactor create_audio_ipc
This patch adds creating listening audio ipc socket in AudioFlinger
context on audio_open() and moves accepting connection to ipc_th.
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
d0df2eddd0 android: Fix error check from pthread_create
pthread_create() returns 0 on success or errno code which is non negative
number
2014-01-10 17:45:17 +02:00
Lukasz Rymanowski
3ef04d3093 android/audio: Prefix error log with "audio" 2014-01-10 17:45:17 +02:00
Grzegorz Kolodziejczyk
af1744db66 android/tester: Multi property check for test case
This patch allows to check multiple properties for test case. Properties
can be prioritized to allow check if they'll come in right order. Now
properties aren't treated as a "single" callback. In future in one
callback multiple properties can come.
2014-01-10 16:20:05 +01:00
Ravi kumar Veeramally
78d1f1391e android/pan: Remove connected PAN devices on profile unregister call 2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
7f445ac7d5 android/pan: Implement PAN enable HAL api at daemon side 2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
423f637179 android/pan: Listen for incoming connections and accept in NAP role
Listen for incoming connections and accept it. Create bnep interface
add it to bridge and notify control and connection state information
through HAL. Remove the device on disconnect request. If android
settings UI does not have bluetooth tethering enabled it immediately
sends disconnect signal.
2014-01-10 16:09:55 +01:00
Ravi kumar Veeramally
a89e3dbdb9 android/pan: Register Network Access Point
Register NAP server and adds bnep bridge. Removes bridge
on destroy call. Bridge mechanism is needed when device acting
as a server and listen for incoming connections.
2014-01-10 16:09:55 +01:00
Luiz Augusto von Dentz
ea873d1a6a android/haltest: Add support for loading Audio HAL
This makes audio.a2dp.default.so to be loaded by haltest.
2014-01-10 15:37:46 +02:00
Luiz Augusto von Dentz
48a962ec6d android: Load bluetooth.default.so as a module
This makes haltest and android-tester to load bluetooth.default.so
instead of linking directly to it.
2014-01-10 15:07:23 +02:00
Luiz Augusto von Dentz
dd0d7e7559 android: Convert libhal-internal to a plugin
This convert the static library libhal-internal.la to
bluetooth.default.la when building with autotools.
2014-01-10 14:05:55 +02:00
Luiz Augusto von Dentz
4cd86000dd android: Convert libaudio-internal to a plugin
This convert the static library libaudio-internal.la to
audio.a2dp.default.so when building with autotools.
2014-01-10 14:05:55 +02:00