Fixed a2dp source audio data packet congestion causing choppy audio in a2dp sink

pull/8219/head
xiongweichao 2021-12-23 20:45:09 +08:00
rodzic 5d47efb72d
commit 061ae4c07a
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -138,10 +138,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);

Wyświetl plik

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -673,6 +673,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;