af_ql_audio
Change-Id: Ic0c8174f86070e5a8f3b39e1e03d73ae437739a7
diff --git a/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c b/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
index ca0ca50..a08338f 100755
--- a/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
+++ b/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
@@ -663,6 +663,7 @@
mbtk_audio_handle mbtk_audio_open_new(mbtk_audio_dev_enum dev, int flag, int rate, void *usrData)
{
+
int value = 1;
struct mopen_audio_t *aud_hdl = NULL;
int ret;
@@ -676,10 +677,11 @@
aud_hdl = (struct mopen_audio_t *) calloc(1, sizeof(struct mopen_audio_t));
if (!aud_hdl)
{
- fprintf(stderr, "\n%s:Failed to allocate audio hdl!, errno=%d\n", __FUNCTION__, errno);
+ LOGD("\n%s:Failed to allocate audio hdl!, errno=%d\n", __FUNCTION__, errno);
return NULL;
}
memset(aud_hdl, 0, sizeof(struct mopen_audio_t));
+ LOGD("mbtk_audio_open() success aud_hdl:%p\n", aud_hdl);
//init global variables
aud_hdl->audio_ahw_dev_ubus = audio_hal_install();
@@ -710,6 +712,7 @@
/* printf("Mbtk_Audio_Open aud_hdl[%x][%x][%x]\n", aud_hdl, aud_hdl->_mixer_ctl, aud_hdl->_pcm); */
internal_hdl = aud_hdl;
+ LOGD("mbtk_audio_open() success aud_hdl:%p\n", aud_hdl);
return (void *)aud_hdl;
error:
@@ -737,6 +740,8 @@
if (NULL == dev_hdl || NULL == internal_hdl)
return -1;
+
+ LOGD("mbtk_audio_play_file_new() dev_hdl:%p\n", dev_hdl);
if(AUDIO_RUNNING == pcxt->state)
return -2;
@@ -828,6 +833,8 @@
if (NULL == dev_hdl || NULL == internal_hdl || pData == NULL)
return -1;
+ LOGD("mbtk_audio_play_stream_new() dev_hdl:%p\n", dev_hdl);
+
if(AUDIO_RUNNING == pcxt->state)
return -2;
@@ -909,13 +916,13 @@
int mbtk_audio_close_new(void *dev_hdl)
{
- printf("mbtk_audio_close()\n");
+ LOGD("mbtk_audio_close()\n");
int value = 0;
struct mopen_audio_t *_hdl = (struct mopen_audio_t *)dev_hdl;
if (NULL == _hdl || NULL == internal_hdl )
{
- printf("mbtk_audio_close() fail dev_hdl is NULL\n");
+ LOGD("mbtk_audio_close() fail dev_hdl is NULL\n");
return -1;
}