mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Rewrite av clean_up procedure
This commit is contained in:
@ -1039,22 +1039,22 @@ static void clean_up(int service_id)
|
|||||||
tle_av_open_on_rc = NULL;
|
tle_av_open_on_rc = NULL;
|
||||||
}
|
}
|
||||||
#endif /* BTC_AV_SRC_INCLUDED */
|
#endif /* BTC_AV_SRC_INCLUDED */
|
||||||
|
btc_dm_disable_service(BTA_A2DP_SOURCE_SERVICE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
btc_dm_disable_service(BTA_A2DP_SOURCE_SERVICE_ID);
|
|
||||||
|
|
||||||
if (service_id == BTA_A2DP_SINK_SERVICE_ID) {
|
|
||||||
btc_dm_disable_service(BTA_A2DP_SINK_SERVICE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Also shut down the AV state machine */
|
|
||||||
btc_sm_shutdown(btc_av_cb.sm_handle);
|
|
||||||
btc_av_cb.sm_handle = NULL;
|
|
||||||
|
|
||||||
if (service_id == BTA_A2DP_SINK_SERVICE_ID) {
|
if (service_id == BTA_A2DP_SINK_SERVICE_ID) {
|
||||||
#if BTC_AV_SINK_INCLUDED
|
#if BTC_AV_SINK_INCLUDED
|
||||||
btc_a2dp_sink_shutdown();
|
btc_a2dp_sink_shutdown();
|
||||||
#endif /* BTC_AV_SINK_INCLUDED */
|
#endif /* BTC_AV_SINK_INCLUDED */
|
||||||
|
btc_dm_disable_service(BTA_A2DP_SINK_SERVICE_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (btc_av_cb.sm_handle) {
|
||||||
|
/* Also shut down the AV state machine */
|
||||||
|
btc_sm_shutdown(btc_av_cb.sm_handle);
|
||||||
|
btc_av_cb.sm_handle = NULL;
|
||||||
|
} else {
|
||||||
|
BTC_TRACE_WARNING("AV sm handle already free\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user