am 7e5b6ac3: am 29555939: mm-audio: Fix delay with first voice call after bootup.
* commit '7e5b6ac34dec11d2e0be2b05272950618a7598cc': mm-audio: Fix delay with first voice call after bootup.
This commit is contained in:
commit
8969dc0cca
|
@ -57,6 +57,8 @@ extern "C"
|
|||
static void (*acdb_deallocate)();
|
||||
#endif
|
||||
#ifdef QCOM_CSDCLIENT_ENABLED
|
||||
static int (*csd_client_init)();
|
||||
static int (*csd_client_deinit)();
|
||||
static int (*csd_start_playback)();
|
||||
static int (*csd_stop_playback)();
|
||||
#endif
|
||||
|
@ -128,8 +130,16 @@ AudioHardwareALSA::AudioHardwareALSA() :
|
|||
ALOGE("AudioHardware: DLOPEN not successful for CSD CLIENT");
|
||||
} else {
|
||||
ALOGD("AudioHardware: DLOPEN successful for CSD CLIENT");
|
||||
csd_client_init = (int (*)())::dlsym(mCsdHandle,"csd_client_init");
|
||||
csd_client_deinit = (int (*)())::dlsym(mCsdHandle,"csd_client_deinit");
|
||||
csd_start_playback = (int (*)())::dlsym(mCsdHandle,"csd_client_start_playback");
|
||||
csd_stop_playback = (int (*)())::dlsym(mCsdHandle,"csd_client_stop_playback");
|
||||
|
||||
if (csd_client_init == NULL) {
|
||||
ALOGE("dlsym: Error:%s Loading csd_client_init", dlerror());
|
||||
} else {
|
||||
csd_client_init();
|
||||
}
|
||||
}
|
||||
mALSADevice->setCsdHandle(mCsdHandle);
|
||||
#endif
|
||||
|
@ -179,6 +189,10 @@ AudioHardwareALSA::AudioHardwareALSA() :
|
|||
#ifdef QCOM_ACDB_ENABLED
|
||||
if (mAcdbHandle) {
|
||||
mUcMgr->acdb_handle = static_cast<void*> (mAcdbHandle);
|
||||
if (mFusion3Platform)
|
||||
mUcMgr->isFusion3Platform = true;
|
||||
else
|
||||
mUcMgr->isFusion3Platform = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -221,8 +235,13 @@ AudioHardwareALSA::~AudioHardwareALSA()
|
|||
|
||||
#ifdef QCOM_CSDCLEINT_ENABLED
|
||||
if (mCsdHandle) {
|
||||
::dlclose(mCsdHandle);
|
||||
mCsdHandle = NULL;
|
||||
if (csd_client_deinit == NULL) {
|
||||
ALOGE("dlsym: Error:%s Loading csd_client_deinit", dlerror());
|
||||
} else {
|
||||
csd_client_deinit();
|
||||
}
|
||||
::dlclose(mCsdHandle);
|
||||
mCsdHandle = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#define LOG_TAG "alsa_ucm"
|
||||
#define LOG_NDDEBUG 0
|
||||
//#define LOG_NDDEBUG 0
|
||||
|
||||
#ifdef ANDROID
|
||||
/* definitions for Android logging */
|
||||
|
@ -673,7 +673,7 @@ int use_case_index)
|
|||
ALOGD("Voice acdb: rx id %d tx id %d",
|
||||
uc_mgr->current_rx_device,
|
||||
uc_mgr->current_tx_device);
|
||||
if (uc_mgr->acdb_handle) {
|
||||
if (uc_mgr->acdb_handle && !uc_mgr->isFusion3Platform) {
|
||||
acdb_send_voice_cal = dlsym(uc_mgr->acdb_handle,"acdb_loader_send_voice_cal");
|
||||
if (acdb_send_voice_cal == NULL) {
|
||||
ALOGE("ucm: dlsym: Error:%s Loading acdb_loader_send_voice_cal", dlerror());
|
||||
|
|
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
|
||||
#include "alsa_ucm.h"
|
||||
#include "alsa_audio.h"
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
#define SND_UCM_END_OF_LIST "end"
|
||||
|
||||
|
@ -169,6 +170,7 @@ struct snd_use_case_mgr {
|
|||
card_ctxt_t *card_ctxt_ptr;
|
||||
pthread_t thr;
|
||||
void *acdb_handle;
|
||||
bool isFusion3Platform;
|
||||
};
|
||||
|
||||
#define MAX_NUM_CARDS (sizeof(card_list)/sizeof(char *))
|
||||
|
|
Loading…
Reference in New Issue