5fe6f0cf6b223e3ed6be4912d55b3ed5b41ce0cd |
|
06-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Removed checks for NULL returns after osi_calloc() / osi_malloc() Removed explicit checks for NULL pointer returns after calls to osi_calloc() and osi_malloc(), because those are not needed. If the memory allocation fails, osi_calloc() and osi_malloc() will trigger an assert. Bug: 27048759 Change-Id: I2791eb2f69c08f991f8fcdef10e101a41568cd95
/system/bt/bta/ag/bta_ag_sco.c
|
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 |
|
05-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free() Removed the alternative buffer allocation osi_getbuf() / osi_freebuf() and use instead osi_malloc() / osi_free(). Correspondingly, replaced usage of osi_freebuf_and_reset() with osi_free_and_reset(). Bug: 24914560 Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/bta/ag/bta_ag_sco.c
|
78bcff79e1b1f0efce436b33bdd6da88745bfc8a |
|
05-Dec-2015 |
Pavlin Radoslavov <pavlin@google.com> |
Refactor the Bluetooth timers * Updated the alarm API: - Existing API alarm_new() is modified to take an alarm name as an argument. - New API alarm_new_periodic() is used to create a periodic alarm. - Added new API alarm_is_scheduled() to test whether an alarm is scheduled. - Existing API alarm_set_periodic() is removed: a periodic alarm is created by alarm_new_periodic(). - Added new API alarm_set_on_queue() to set an alarm whose callback is executed on a specific queue. - Added new API alarm_register_processing_queue() and alarm_unregister_processing_queue() to register/unregister a queue and the corresponding thread for alarm processing. - Added corresponding unit tests. * Updated the alarm internals: - Added alarm_info_t for collecting alarm-related information and statistics. - Collect and store alarm-related statistics into alarm_info_t per alarm. - Include the alarm-related statistics and info into the native dumpsys output for Bluetooth. - Once an alarm expires, the alarm execution is scheduled for processing on another internal alarm-specific thread, not on the thread that is maintaining the alarms. - Implemented callback execution ordering guarantee among timers on the same thread with exactly same timeout values. * Refactor some of the usage of alarm_set() and simplify the code by using alarm_set_on_queue() instead. * Removed the non_repeating timers wrapper, and use directly the alarm mechanism / API. * Refactored all timer_entry_t timers and replaced them with alarm_t timers: - Replaced the btu_start_timer() / btu_stop_timer() / btu_start_quick_timer() / btu_stop_quick_timer() / btu_oneshot_alarm() mechanism with alarm_set_on_queue() and alarm_cancel() - Removed the whole mechanism around the BTU_TTYPE_* timers. * Fixed a bug when processing the GATT indication confirmation timer expiration (timer tGATT_TCB.conf_timer: b/26610829). * Renamed and/or split misc. timeout functions, fields, and timers * Renamed time-related constants and changed the values from seconds to milliseconds * Replaced timer tAVDT_CCB.timer_entry with three mutually exclusive timers: idle_ccb_timer, ret_ccb_timer, rsp_ccb_timer The reason we are using three timers, is because in the original code function avdt_ccb_chk_timer() used the timer type in its logic: it would stop the timer only if the type is "idle". * Removed btm_ble_timeout() and replaced it with multiple timeout callback functions (per timer) * Fix the actual value of the global constant BT_1SEC_TIMEOUT and rename it to BT_1SEC_TIMEOUT_MS * Removed btu_cb and associated timers and events, because they are never used. * Removed unused timers, functions, struct and declarations that are not used / needed. Bug: 26611369 Bug: 26610829 Change-Id: I812c8c31710a5daefc58b01fcf35c353768f390f
/system/bt/bta/ag/bta_ag_sco.c
|
258c2538e3b62a8cdb403f2730c45d721e5292b4 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - moved GKI buffer allocation wrappers to OSI * Moved the following GKI buffer allocation functions to OSI: - GKI_getbuf() -> osi_getbuf() - GKI_freebuf() -> osi_freebuf() - GKI_get_buf_size() -> osi_get_buf_size() For now we need the osi_getbuf() / osi_freebuf() allocation wrapper, because we need to be able to call osi_get_buf_size() on the allocated buffer. In the future those should be replaced with osi_malloc() / osi_free(). Currently, the osi_malloc() buffer size internal allocation tracker does not always track the size, hence we need the osi_getbuf() wrapper. * Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE * Added new file include/bt_common.h that can be usee to include few files that should be included alost everywhere (e.g. bt_target.h" NOTE: This file might be removed in the future and we should include everywhere the right set of header files. * Removed some of the GKI-related references * Removed file include/gki_target.h Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/bta/ag/bta_ag_sco.c
|
9f1c9ad85759c7663e3bbc494f8e75b2f107da67 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Moved struct TIMER_LIST_ENT to OSI * Moved struct TIMER_LIST_ENT to file osi/include/non_repeating_timer.h and renamed it to timer_entry_t NOTE: This is a short-term solution. timer_entry_t should be removed, and its usage everywhere should be replaced by struct non_repeating_timer_t . * Renamed TIMER_CBACK to timer_callback_t * Renamed TIMER_PARAM_TYPE to timer_param_t Change-Id: I9ca830718bf900195f9c0a513a97f6995322693b
/system/bt/bta/ag/bta_ag_sco.c
|
bb95452741bfd65723ea417c25dbd326c7568ab7 |
|
03-Jun-2015 |
Arman Uguray <armansito@google.com> |
build: Fix ptr <-> integer cast warnings This CL removes the -Wno-pointer-to-integer-cast and -Wno-integer-to-pointer-cast flags from GN build files. The resulting errors were fixed using the following: 1. All ptr <-> integer casts are now done by using the new PTR_TO_INT/INT_TO_PTR macros defined in osi.h 2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and include/bt_target.h have been redefined as void* rather than UINT32. This is better, since "void*" can act as a simple container without any precision loss that would be caused by a type such as UINT32 on 64-bit systems. void* inherently is a safer container for all pointer types but UINT32 isn't. BUG=21570302 Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
/system/bt/bta/ag/bta_ag_sco.c
|
c1c02ce58f8513ab1c6ab3010be4867c22b3b5c6 |
|
04-Jun-2015 |
Andre Eisenbach <eisenbach@google.com> |
Fix compile error in bta_ag_sco.c Change-Id: I8839ba732560a31a5e8a2351ea4bfb16999cf5ea
/system/bt/bta/ag/bta_ag_sco.c
|
8f4fb27a66a83cc65eb7923b6912d0aaba279a8b |
|
21-May-2015 |
Mallikarjuna GB <gbmalli@codeaurora.org> |
Create listen SCO for HS1 if HS2 disconnects during SCO xfer During SCO transfer process from HS1 to HS2, firstly active SCO for HS1 is disconnected. However, if suddenly HS2 disconnects even before SCO transfer is complete, listen SCO for HS1 is not created. This causes further incoming SCO connections from HS1 to be rejected. The change creates listen SCO for HS1 and moves SCO state properly to LISTEN. Change-Id: I0993c1ba1c24b3b7e9c243d179a913d7a0c40446
/system/bt/bta/ag/bta_ag_sco.c
|
933926c92e1378cc76bc9c149107e670c4872d4e |
|
03-Apr-2015 |
Scott James Remnant <keybuk@google.com> |
Fix missing #includes needed for glibc Some standard library functions are used while relying on bionic headers including the headers the functions were actually declared on. Add those missing #includes so that bluetooth.default.so will compile on glibc. Change-Id: Ied9f89ce5a05911fca63f6bfe1b8cc8196ab3b1c
/system/bt/bta/ag/bta_ag_sco.c
|
6afb248849399cfba59fb1e683a06e31d88e5d1d |
|
25-Mar-2015 |
Mudumba Ananth <ananthm@broadcom.com> |
Resolved hardware error observed during SCO Connection setup Hardware error was caused due to a faulty HCI command formed in the process of vendor specific pre-SCO setup in the stack(set_audio_state) Fixed the above problem and also added back the vendor (interface) mapping for the set_audio_state functionality to facilitate the sending of the pre-SCO vendor specific commands. Made common vendor library audio setting by moving to hci subsystem. General cleanup around this functionality. Bug: 19923226 Change-Id: I4a743f6725459f360bd2a90e0a46f08fcca2292d
/system/bt/bta/ag/bta_ag_sco.c
|
66432dcffe211e317d35978283a04a96d5620bdf |
|
27-Apr-2014 |
Matthew Xie <mattx@google.com> |
Add WBS support on Bluedroid (2/6) Bug 13764086 Change-Id: I12bf302f7dd19efb497ad49d4d1d638a7a926049
/system/bt/bta/ag/bta_ag_sco.c
|
e8c3d75b75493911ebf0f99c83676359657178f7 |
|
04-May-2014 |
Sharvil Nanavati <sharvil@google.com> |
Logging cleanup: BTIF and APPL. Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
/system/bt/bta/ag/bta_ag_sco.c
|
5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb |
|
01-Feb-2014 |
Mike J. Chen <mjchen@google.com> |
Major warnings cleanup Mostly fixing unused parameter warnings. A few other warnings also fixed like possible use of unitialized variables (no real issue found, just compiler couldn't follow the path), signed vs unsigned warning. Also fixed some typos, indent issues, removal of dead code, etc. Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01 Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/bta/ag/bta_ag_sco.c
|
5738f83aeb59361a0a2eda2460113f6dc9194271 |
|
13-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/bta/ag/bta_ag_sco.c
|