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