mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Add A2DP Init and Deinit Complete Evt
This commit is contained in:
parent
69fd702b1d
commit
d2ddfa5183
@ -89,6 +89,7 @@ typedef enum {
|
||||
ESP_A2D_AUDIO_STATE_EVT, /*!< audio stream transmission state changed event */
|
||||
ESP_A2D_AUDIO_CFG_EVT, /*!< audio codec is configured, only used for A2DP SINK */
|
||||
ESP_A2D_MEDIA_CTRL_ACK_EVT, /*!< acknowledge event in response to media control commands */
|
||||
ESP_A2D_PROF_STATE_EVT, /*!< indicate a2dp deinit complete */
|
||||
} esp_a2d_cb_event_t;
|
||||
|
||||
/// A2DP state callback parameters
|
||||
@ -125,6 +126,13 @@ typedef union {
|
||||
esp_a2d_media_ctrl_t cmd; /*!< media control commands to acknowledge */
|
||||
esp_a2d_media_ctrl_ack_t status; /*!< acknowledgement to media control commands */
|
||||
} media_ctrl_stat; /*!< status in acknowledgement to media control commands */
|
||||
|
||||
/**
|
||||
* @brief ESP_A2D_PROF_STATE_EVT
|
||||
*/
|
||||
struct a2d_prof_stat_param {
|
||||
int init_state; /*!< a2dp profile state param */
|
||||
} a2d_prof_stat; /*!< status to indicate a2d prof init or deinit */
|
||||
} esp_a2d_cb_param_t;
|
||||
|
||||
/**
|
||||
|
@ -989,7 +989,10 @@ static bt_status_t btc_av_init(int service_id)
|
||||
}
|
||||
|
||||
btc_a2dp_on_init();
|
||||
|
||||
esp_a2d_cb_param_t param;
|
||||
memset(¶m, 0, sizeof(esp_a2d_cb_param_t));
|
||||
param.a2d_prof_stat.init_state = 1;
|
||||
btc_a2d_cb_to_app(ESP_A2D_PROF_STATE_EVT, ¶m);
|
||||
return BT_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1056,6 +1059,11 @@ static void clean_up(int service_id)
|
||||
} else {
|
||||
BTC_TRACE_WARNING("AV sm handle already free\n");
|
||||
}
|
||||
|
||||
esp_a2d_cb_param_t param;
|
||||
memset(¶m, 0, sizeof(esp_a2d_cb_param_t));
|
||||
param.a2d_prof_stat.init_state = 0;
|
||||
btc_a2d_cb_to_app(ESP_A2D_PROF_STATE_EVT, ¶m);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user