btc_a2dp_control_set_datachnl_stat is only used by a2dp sink

This commit is contained in:
xiongweichao
2022-01-06 14:10:18 +08:00
parent 688700f33b
commit 83b9320d2e
2 changed files with 4 additions and 3 deletions

View File

@@ -25,7 +25,7 @@
#if BTC_AV_INCLUDED #if BTC_AV_INCLUDED
typedef struct { typedef struct {
BOOLEAN data_channel_open; BOOLEAN data_channel_open; /* used only by A2DP sink */
UINT8 a2dp_cmd_pending; /* we can have max one command pending */ UINT8 a2dp_cmd_pending; /* we can have max one command pending */
} tBTC_AA_CTRL_CB; } tBTC_AA_CTRL_CB;
@@ -75,7 +75,9 @@ static void btc_a2dp_datapath_open(void)
btc_a2dp_source_encoder_update(); btc_a2dp_source_encoder_update();
} }
#endif #endif
#if (BTC_AV_SINK_INCLUDED == TRUE)
btc_aa_ctrl_cb.data_channel_open = TRUE; btc_aa_ctrl_cb.data_channel_open = TRUE;
#endif
} }
BOOLEAN btc_a2dp_control_get_datachnl_stat(void) BOOLEAN btc_a2dp_control_get_datachnl_stat(void)

View File

@@ -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 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -1571,7 +1571,6 @@ static void btc_a2dp_source_thread_init(UNUSED_ATTR void *context)
static void btc_a2dp_source_thread_cleanup(UNUSED_ATTR void *context) static void btc_a2dp_source_thread_cleanup(UNUSED_ATTR void *context)
{ {
btc_a2dp_control_set_datachnl_stat(FALSE);
/* Clear media task flag */ /* Clear media task flag */
btc_a2dp_source_state = BTC_A2DP_SOURCE_STATE_OFF; btc_a2dp_source_state = BTC_A2DP_SOURCE_STATE_OFF;