Anderson Lizardo
e6c0fa067b
android/client: Fix set_info command
...
Although this command is not implemented by BlueZ, make sure it is
callable from haltest so at least the IPC can be tested.
Also memset() the hid_info parameter to not pass uninitialized data
around.
2014-02-12 11:26:56 +02:00
Andrei Emeltchenko
600ad0f6cd
android/haltest: Remove unneeded assignment
2014-02-10 14:08:45 +02:00
Andrei Emeltchenko
a7032c97ef
android/haltest: Close file in case of error
2014-02-07 11:03:08 +01:00
Szymon Janc
7498648468
android/client-audio: Fix not stopping play thread on write error
2014-02-06 15:08:57 +01: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
Jakub Tyszkowski
9613c04075
android/client-audio: Add getting sample rate
...
Get current sample rate for output stream.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
5c4241f514
android/client-audio: Add getting audio format
...
Get current audio format for output stream.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
3fd697c505
android/client-audio: Add get_channels
...
Get audio channels configuration.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
6f94ee9b6d
android/client-audio: Add get_buffer_size for output
...
Get buffer size for output stream.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
e19841f0d3
android/client-audio: Add get_latency for output
...
Get output stream latency.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
d40b147c2b
android/client-audio: Add playback suspend/resume
...
Add audio stream suspending and resuming.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
66e32e61d5
android/client-audio: Add audio file playback
...
This patch adds audio file playback capability. Proper 16-bit signed
float stereo PCM file is needed.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
4d36a19391
android/client-audio: Add open/close output stream
...
Add opening and closing output stream.
2014-02-05 15:08:24 +01:00
Jakub Tyszkowski
1e831f0551
android/client-av: Fix checking for a2dp interface
2014-02-05 15:08:24 +01:00
Luiz Augusto von Dentz
7568d14b66
android/haltest: Add init and cleanup calls to rc methods
2014-01-26 16:19:24 -08:00
Szymon Janc
8622810347
android: Remove support for old Android versions
...
This removes compatibility with Android 4.3 and older. Android 4.4 is
current target. Due to bug in Audio HAL in 4.2 build was failing on
that version anyway.
2014-01-14 12:57:18 +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
Anderson Lizardo
37f1b609ae
android/client: Fix uninitialized "sock_fd" variable
...
If EXEC() macro is called with the first pointer argument NULL, sock_fd
will not be initialized. Given that the NULL check is not fatal, it is a
good idea to initialize the variable to -1 so the code has defined
behavior on this situation.
Detected by clang:
android/client/if-sock.c:251:7: error: variable 'sock_fd' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
2014-01-06 21:22:28 +02:00
Anderson Lizardo
7ce750c3e4
android/client: Use memcpy() for getting CMSG_DATA()
...
This is how it is done in all other places in BlueZ. Also drop
unnecessary "descs" local variable.
Fixes clang error:
android/client/if-sock.c:164:11: error: cast from 'unsigned char *' to
'int *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
2014-01-06 21:22:15 +02:00
Anderson Lizardo
e957c5059e
android/client: Remove duplicate "const" specifier
...
Fixes clang errors like:
android/client/if-hh.c:181:39: error: duplicate 'const' declaration
specifier [-Werror,-Wduplicate-decl-specifier]
2014-01-06 21:22:02 +02:00
Anderson Lizardo
eec27c1cfc
android/client: Fix incorrect usage of bt_state_t2str()
...
Fixes clang error:
android/client/if-bt.c:313:54: error: implicit conversion from
enumeration type 'bt_status_t' to different enumeration type
'bt_state_t' [-Werror,-Wenum-conversion]
2014-01-06 21:21:50 +02:00
Szymon Janc
5ea252c446
android/haltest: Implement missing functions from bluetooth HAL
...
Implement functions added in Android 4.3+ to Bluetooth HAL.
2014-01-01 18:29:03 +02:00
Szymon Janc
475e1c3639
android/haltest: Improve EXEC macro robustness
...
Print info about method being NULL instead of crashing.
2014-01-01 18:28:56 +02:00
Andrei Emeltchenko
3cc6ed2d30
android/haltest: Add uuid autocompletions
2013-11-26 17:42:36 +02:00
Andrei Emeltchenko
7eac27334f
android/haltest: trivial: Fix typo channle -> channel
2013-11-26 17:42:25 +02:00
Andrei Emeltchenko
71e455c8b9
android/haltest: Zero initialize cmsg buffer
2013-11-21 16:43:40 +02:00
Andrei Emeltchenko
d39e947a1f
android/debug: Move debug functions to hal-utils.c
...
Debug functions will be used by HALs and haltest.
2013-11-14 10:27:15 +02:00
Andrei Emeltchenko
bec0539ba9
androi/haltest: Make debug functions return const string
2013-11-08 16:21:14 +02:00
Andrei Emeltchenko
d18c36e232
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.
2013-11-08 15:57:25 +02:00
Andrei Emeltchenko
5af8d164ac
android: Create debug hal-utils helpers
...
Create hal-utils helpers which helps to decode packets Android
sends through HAL interface.
2013-11-08 15:40:25 +02:00
Jerzy Kasenberg
fcd2812197
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
2013-11-08 15:13:06 +02:00
Jerzy Kasenberg
72c31efadf
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.
2013-11-08 15:13:04 +02:00
Jerzy Kasenberg
037632dc24
android/client: Add prompting for answer
...
This patch allows to switch to prompt mode where user will be asked
to supply some information.
2013-11-08 15:13:03 +02:00
Jerzy Kasenberg
b07cff3c6b
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.
2013-11-08 15:13:01 +02:00
Jerzy Kasenberg
316ddc8b96
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
2013-11-08 15:13:00 +02:00
Jerzy Kasenberg
df3b6c7dc0
android/client: Initialize all interfaces at start
...
Patch adds function that initializes all HAL interfaces.
2013-11-08 15:12:58 +02:00
Jerzy Kasenberg
464d9b64af
android/client: Add NELEM macro for count elements
...
NELEM macro will be used in several places.
2013-11-08 15:12:57 +02:00
Jerzy Kasenberg
507c457d3c
android/client: Export get_interface_method
...
This method will be used outside tab completion.c.
2013-11-08 15:12:55 +02:00
Jerzy Kasenberg
ef0609cc15
android/client: Fix build for android 4.3
...
Chagnes in HAL interface from 4.3 to 4.4 result in build failure:
target thumb C: haltest <=
external/bluetooth/bluez/android/client/if-gatt.c
external/bluetooth/bluez/android/client/if-gatt.c:225:1:
error: unknown type name 'btgatt_gatt_id_t'
This patch allows to build GATT for Android 4.3 (api level 18).
2013-11-05 14:55:37 +02:00
Jerzy Kasenberg
126aad3a5d
android/client: Change adapter to bluetooth
...
This fixes all places where adapter should be changed to
bluetooth.
2013-11-05 12:31:27 +02:00
Jerzy Kasenberg
c73ddc609b
android/client: Fix style and typos
...
Fixes spelling errors and white space style errors.
2013-11-05 12:31:25 +02:00
Andrei Emeltchenko
8baa84b767
android/client: Fix printing not NULL terminated strings
...
Android passes not NULL terminated strings.
2013-11-04 21:17:50 +02:00
Jerzy Kasenberg
fe552a1a5d
android/client: Fix annoying delay in command line
...
Move fflush(stdout) to after prints and user input.
This removes delay of showing prompt.
2013-11-04 21:14:35 +02:00
Jerzy Kasenberg
180bc6dbd8
android/client: Change interface name to bluetooth
...
This changes 'adapter' to 'bluetooth' as name of HAL interface.
This name matches name fond in bluetooth.h where all interfaces
are defined.
2013-11-04 21:13:52 +02:00
Jerzy Kasenberg
6807460f1b
android/client: Fix uninitialized variable
...
Pin accept variable was intended to be set to 1
only when pin was typed by user. If no pin was given
accept should be set to 0. This patch fixes this.
2013-11-04 12:14:18 +02:00