+// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#ifndef __ESP_A2DP_API_H__
#define __ESP_A2DP_API_H__
typedef uint8_t esp_a2d_mct_t;
/**
- * @brief Codec specific information for different codec types
+ * @brief Codec specific information elements as defined in A2DP spec.
*/
/**
/**
* @brief This function is called to register A2DP sink data output function
- * currently only supports SBC codec, and the output data is PCM format
+ * for now only supports SBC codec, and the output is PCM data stream
*
* @param[in] callback: A2DP data callback function
*
static void btif_media_thread_init(UNUSED_ATTR void *context)
{
memset(&btif_media_cb, 0, sizeof(btif_media_cb));
- LOG_ERROR("med thread init\n");
-#if (UIPC_INCLUDED == TRUE)
- UIPC_Init(NULL);
-
-#if (BTA_AV_INCLUDED == TRUE)
- UIPC_Open(UIPC_CH_ID_AV_CTRL , btif_a2dp_ctrl_cb);
-#endif ( BTA_AV_INCLUDED == TRUE)
-#endif /* UIPC_INCLUDED == TRUE */
+ LOG_INFO("media thread init\n");
btif_media_cb.av_sm_hdl = btif_av_get_sm_handle();
raise_priority_a2dp(TASK_HIGH_MEDIA);
media_task_running = MEDIA_TASK_STATE_ON;
}
//Now Test Case Not Supported BTU
- LOG_ERROR("Startup BTU\n");
+ LOG_INFO("Startup BTU\n");
BTU_StartUp();
}
int osi_alarm_free(osi_alarm_t *alarm)
{
if (!alarm) {
- LOG_ERROR("%s null\n", __func__);
+ LOG_INFO("%s null\n", __func__);
return -1;
}
static void bt_app_context_switched(bt_app_msg_t *msg)
{
- BT_APP_TRACE_DEBUG(" context switched\n");
+ BT_APP_TRACE_DEBUG("bt app context switched\n");
if (msg->cb) {
msg->cb(msg->event, msg->param);
}
static void bt_app_handle_evt(UINT16 event, void *p_param)
{
- BT_APP_TRACE_EVENT("bt_app_handle_evt 0x%x\n", event);
+ BT_APP_TRACE_DEBUG("bt_app_handle_evt 0x%x\n", event);
esp_a2d_cb_param_t *a2d = NULL;
switch (event) {
case BT_APP_EVT_STACK_ON: {
}
case ESP_A2D_CONNECTION_STATE_EVT: {
a2d = (esp_a2d_cb_param_t *)(p_param);
- BT_APP_TRACE_ERROR("===a2dp conn_state_cb %d ===\n", a2d->conn_stat.state);
+ BT_APP_TRACE_EVENT("===a2dp conn_state_cb %d ===\n", a2d->conn_stat.state);
break;
}
case ESP_A2D_AUDIO_STATE_EVT: {
a2d = (esp_a2d_cb_param_t *)(p_param);
- BT_APP_TRACE_ERROR("===a2dp audio_state_cb %d ===\n", a2d->audio_stat.state);
+ BT_APP_TRACE_EVENT("===a2dp audio_state_cb %d ===\n", a2d->audio_stat.state);
break;
}
case ESP_A2D_AUDIO_CFG_EVT: {
a2d = (esp_a2d_cb_param_t *)(p_param);
- BT_APP_TRACE_ERROR("===a2dp audio_cfg_cb type %d ===\n", a2d->audio_cfg.mcc.type);
+ BT_APP_TRACE_EVENT("===a2dp audio_cfg_cb type %d ===\n", a2d->audio_cfg.mcc.type);
if (a2d->audio_cfg.mcc.type == ESP_A2D_MCT_SBC) {
// temporarily hardcoded the PCM configuaration
- BT_APP_TRACE_ERROR("configure audio player\n");
+ BT_APP_TRACE_EVENT("configure audio player\n");
// EspAudioPlayerStreamCfg(StreamSampleRate_44k, 2, StreamBitLen_16BIT);
// EspAudio_SetupStream("stream.pcm", InputSrcType_Stream);
// EspAudio_SetVolume(99);