mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Fixed a2dp source audio data packet congestion causing choppy audio in a2dp sink
This commit is contained in:
@ -146,10 +146,8 @@ void btc_a2dp_control_media_ctrl(esp_a2d_media_ctrl_t ctrl)
|
||||
break;
|
||||
case ESP_A2D_MEDIA_CTRL_START:
|
||||
if (btc_av_stream_ready() == TRUE ) {
|
||||
/* post start event and wait for audio path to open */
|
||||
/* post start event */
|
||||
btc_dispatch_sm_event(BTC_AV_START_STREAM_REQ_EVT, NULL, 0);
|
||||
|
||||
btc_a2dp_dispatch_datapath_evt(BTC_AV_DATAPATH_OPEN_EVT);
|
||||
#if (BTC_AV_SINK_INCLUDED == TRUE)
|
||||
if (btc_av_get_peer_sep() == AVDT_TSEP_SRC && btc_av_get_service_id() == BTA_A2DP_SINK_SERVICE_ID) {
|
||||
btc_a2dp_control_command_ack(ESP_A2D_MEDIA_CTRL_ACK_SUCCESS);
|
||||
|
@ -681,6 +681,9 @@ static BOOLEAN btc_av_state_opened_handler(btc_sm_event_t event, void *p_data)
|
||||
/* pending start flag will be cleared when exit current state */
|
||||
}
|
||||
#endif /* BTC_AV_SRC_INCLUDED */
|
||||
/* wait for audio path to open */
|
||||
btc_a2dp_control_datapath_ctrl(BTC_AV_DATAPATH_OPEN_EVT);
|
||||
|
||||
btc_sm_change_state(btc_av_cb.sm_handle, BTC_AV_STATE_STARTED);
|
||||
|
||||
} break;
|
||||
|
Reference in New Issue
Block a user