diff options
author | Eric Laurent <elaurent@google.com> | 2012-09-07 16:46:39 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-07 16:46:40 -0700 |
commit | 5e54e0898a0110642df126238227eca150f2654a (patch) | |
tree | 3102dd4df0ce3972e0137e59bad49bf958c10129 /media/libeffects | |
parent | 10894e509f777c6bd7e408a57f5cf21ee2b36a96 (diff) | |
parent | f6c7a40f8cbbd2fa1a4131ef91b30cf7c5c2d0d7 (diff) | |
download | frameworks_av-5e54e0898a0110642df126238227eca150f2654a.zip frameworks_av-5e54e0898a0110642df126238227eca150f2654a.tar.gz frameworks_av-5e54e0898a0110642df126238227eca150f2654a.tar.bz2 |
Merge "Fix headroom management in equalizer" into jb-mr1-dev
Diffstat (limited to 'media/libeffects')
-rw-r--r-- | media/libeffects/lvm/lib/Bundle/src/LVM_Init.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/media/libeffects/lvm/lib/Bundle/src/LVM_Init.c b/media/libeffects/lvm/lib/Bundle/src/LVM_Init.c index dd34fb5..542c3c8 100644 --- a/media/libeffects/lvm/lib/Bundle/src/LVM_Init.c +++ b/media/libeffects/lvm/lib/Bundle/src/LVM_Init.c @@ -557,9 +557,7 @@ LVM_ReturnStatus_en LVM_GetInstanceHandle(LVM_Handle_t *phInstance, */ pInstance->Params.OperatingMode = LVM_MODE_OFF; pInstance->Params.SampleRate = LVM_FS_8000; -// FIXME: Workaround to avoid reset of headroom parameters on first call to LVM_Process. -// pInstance->Params.SourceFormat = LVM_MONO; - pInstance->Params.SourceFormat = LVM_STEREO; + pInstance->Params.SourceFormat = LVM_MONO; pInstance->Params.SpeakerType = LVM_HEADPHONES; pInstance->Params.VC_EffectLevel = 0; pInstance->Params.VC_Balance = 0; @@ -963,6 +961,7 @@ LVM_ReturnStatus_en LVM_ClearAudioBuffers(LVM_Handle_t hInstance) LVM_InstParams_t InstParams; /* Instance parameters */ LVM_ControlParams_t Params; /* Control Parameters */ LVM_Instance_t *pInstance = (LVM_Instance_t *)hInstance; /* Pointer to Instance */ + LVM_HeadroomParams_t HeadroomParams; if(hInstance == LVM_NULL){ @@ -972,6 +971,9 @@ LVM_ReturnStatus_en LVM_ClearAudioBuffers(LVM_Handle_t hInstance) /* Save the control parameters */ /* coverity[unchecked_value] */ /* Do not check return value internal function calls */ LVM_GetControlParameters(hInstance, &Params); + /*Save the headroom parameters*/ + LVM_GetHeadroomParams(hInstance, &HeadroomParams); + /* Retrieve allocated buffers in memtab */ LVM_GetMemoryTable(hInstance, &MemTab, LVM_NULL); @@ -986,6 +988,9 @@ LVM_ReturnStatus_en LVM_ClearAudioBuffers(LVM_Handle_t hInstance) /* Restore control parameters */ /* coverity[unchecked_value] */ /* Do not check return value internal function calls */ LVM_SetControlParameters(hInstance, &Params); + /*Restore the headroom parameters*/ + LVM_SetHeadroomParams(hInstance, &HeadroomParams); + /* DC removal filter */ DC_2I_D16_TRC_WRA_01_Init(&pInstance->DC_RemovalInstance); |