ad1e23d50e431fb82ff1b8d3ce02f64ca0c5a940 |
|
10-Dec-2016 |
Jack He <siyuanh@google.com> |
Remove extern "C" from header files Since change 290046, most files in system/bt is compiled as C++ source. Therefore, there is no longer a need for the extern "C" wrapper around includes that export symbols from those sources. The following python script is applied to each file in the directory: front = '#ifdef\s+__cplusplus\s+extern\s+"C"\s+{\s+#endif\s+' back = '#ifdef\s+__cplusplus\s+}\s+#endif' with open(sys.argv[1], "r") as f: data = f.read() data = re.sub(front, "", data) data = re.sub(back, "", data) print data through a shell script: for file in $(find . -name "*.h"); do python remove_cpp_extern_c.py $file > tmp cat tmp > $file rm tmp done with following files not edited: * stack/include/a2dp_* * include/bt_trace.h * embdrv/sbc/* Bug: 33492510 Test: Code compilation, BtFunhausMetricsTest, BtStressTest Change-Id: Iac21cdfb1924b50478dd0b82326e092602cbc9d4
/system/bt/btif/include/btif_a2dp_sink.h
|
4ebaa86a3ab1ea390d238e1f6dee62cd837c60ed |
|
22-Nov-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Add a mechanism for Audio Feeding Parameters negotiation Previously, the Audio Feeding Parameters between the Media Framework and A2DP were hard-coded: 44.1 KHz sample rate, 16-bits per sample, Stereo. Now the Media Framework queries A2DP, and uses the returned values. Bug: b/30958229 Test: Manual testing: A2DP streaming to headphones. TestTracker/68727 Change-Id: I70b90d2961ceb9efcd7021d2e12c240fe531ee1c
/system/bt/btif/include/btif_a2dp_sink.h
|
397e5a5d6a6e14779af8431734ff605ccc49b2a7 |
|
15-Oct-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Format A2DP-related code with clang-format clang-format -style=file -i stack/a2dp/a2dp_* stack/include/a2dp_* \ btif/include/btif_a2dp* btif/src/btif_a2dp* Test: top-level compilation and running A2DP Change-Id: I66f0a047192b783ac0147def480754daf617dd8d
/system/bt/btif/include/btif_a2dp_sink.h
|
1394c197027c0907932a814a786cc033870eb1c9 |
|
03-Oct-2016 |
Pavlin Radoslavov <pavlin@google.com> |
BTIF A2DP Source and Sink refactor and cleanup * Moved bta/av/bta_av_sbc.c to stack/a2dp/a2d_sbc_up_sample.c and renamed the corresponding bta_av_sbc_up_sample_* functions to a2d_sbc_up_sample_* Also, renamed bta_av_sbc_init_up_sample() to a2d_sbc_init_up_sample() * Moved A2DP SBC Encoder-related tasks, state and constants from btif_a2dp_source.cc to a2d_sbc_encoder.c * Introduced A2DP encoder callbacks interface tA2D_ENCODER_INTERFACE, and added A2D_GetEncoderInterface() to acccess the interface for a codec. * Updated a2d_sbc_encoder_init() to specify callbacks: - a2d_source_read_callback_t - a callback to read audio data for encoding - a2d_source_enqueue_callback_t - a callback to enqueue A2DP source packets for transmission * Removed BTIF_MEDIA_TRSCD_* - the encoding is always PCM * Removed conditionally defined constants and replaced them by local definitions: - BTIF_MEDIA_BITRATE_STEP -> A2D_SBC_BITRATE_STEP - BTIF_A2DP_DEFAULT_BITRATE -> A2D_SBC_DEFAULT_BITRATE - BTIF_A2DP_NON_EDR_MAX_RATE -> A2D_SBC_NON_EDR_MAX_RATE * Hard-coded the read data timeout period A2DP_DATA_READ_POLL_MS to 10ms * Merged the UNDERRUN read errors into the UNDERFLOW errors. * Removed the following statistics, because they are not very useful: - media_read_total_limited_frames - media_read_max_limited_frames - media_read_limited_count - media_read_total_expected_frames - media_read_max_expected_frames - media_read_expected_count * Updated the implementation of buffer_overruns_max_count to use the (new) counter tx_queue_max_dropped_messages instead of media_read_max_expected_frames * Replaced usage of LOG_DEBUG() in stack/a2d/ with LOG_VERBOSE(): the former is enabled by default on some of the builds. * Renamed: - btif_a2dp_sink_audio_focus_state_t -> btif_a2dp_sink_focus_state_t - btif_a2dp_sink_set_audio_focus_state_req() -> btif_a2dp_sink_set_focus_state_req() - tBTIF_A2DP_SINK_CB.RxSbcQ -> rx_audio_queue - btif_a2dp_source_start_aa_req() -> btif_a2dp_source_start_audio_req() - btif_a2dp_source_stop_aa_req() -> btif_a2dp_source_stop_audio_req() - btif_a2dp_source_aa_readbuf() -> btif_a2dp_source_audio_readbuf() - tBTIF_A2DP_SOURCE_CB.TxAaQ -> tx_audio_queue - BTIF_A2DP_SOURCE_MEDIA_TIMER_MS -> A2D_SBC_ENCODER_INTERVAL_MS - tA2D_AV_MEDIA_FEEDINGS -> tA2D_FEEDING_PARAMS - tBTIF_A2DP_SOURCE_INIT_AUDIO -> tA2D_ENCODER_INIT_PARAMS - tBTIF_A2DP_SOURCE_UPDATE_AUDIO -> tA2D_ENCODER_UPDATE_PARAMS - tBTIF_A2DP_SOURCE_INIT_AUDIO_FEEDING -> tBTIF_A2DP_SOURCE_INIT_FEEDING Bug: 30958229 Test: TestTracker/65192 Change-Id: Iba0a9694bda3dba73f211f1bde25821497fa6a06
/system/bt/btif/include/btif_a2dp_sink.h
|
08406e93e6027082f8102df21f7e59f27c502c18 |
|
24-Sep-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Split btif_media_task into Source, Sink and Control * btif/include/btif_a2dp.h and btif/src/btif_a2dp.cc implement the entry points for the BTIF A2DP module. * btif/include/btif_a2dp_source.h and btif/src/btif_a2dp_source.cc implement the BTIF A2DP Source component. * btif/include/btif_a2dp_sink.h and btif/src/btif_a2dp_sink.cc implement the BTIF A2DP Sink component. * btif/include/btif_a2dp_control.h and btif/src/btif_a2dp_control.cc implement the A2DP control mechanism for the audio channel from the Media Framework. Also: * Removed BTA_AV_SBC_HDR_SIZE and used A2D_SBC_MPL_HDR_LEN instead. * Removed BTIF_AV_SINK_FOCUS_REQ_EVT, because it is not used. * Removed many of the "#if (BTA_AV_SINK_INCLUDED == TRUE)" guards. * Removed "#ifdef USE_AUDIO_TRACK" guard, and always compile the corresponding code. * Removed tBTIF_AV_MEDIA_FEEDINGS_PCM_STATE and moved its state to tBTIF_AV_MEDIA_FEEDINGS_STATE . Bug: 30958229 Test: TestTracker/65192 Change-Id: I20bc52a1d7a7f03c92628a1562f14b7df3ebb445
/system/bt/btif/include/btif_a2dp_sink.h
|