summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-05-01 16:55:59 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-01 16:55:59 -0700
commite1aa23308048da5f2f9902b99b28fad281725011 (patch)
treeba6ffc0f394d273749a9f13087e1c782f4adda9d
parent9db1b382c279f992dcd33a56226b1f5d2a24afca (diff)
parentbf2bb00e29f69b0de1cde8d31a6f1431d984388b (diff)
downloadframeworks_av-e1aa23308048da5f2f9902b99b28fad281725011.zip
frameworks_av-e1aa23308048da5f2f9902b99b28fad281725011.tar.gz
frameworks_av-e1aa23308048da5f2f9902b99b28fad281725011.tar.bz2
am bf2bb00e: Merge "Fix reverb at 48kHz" into jb-mr2-dev
* commit 'bf2bb00e29f69b0de1cde8d31a6f1431d984388b': Fix reverb at 48kHz
-rw-r--r--media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp
index 87e2c85..8a96212 100644
--- a/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp
+++ b/media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp
@@ -616,10 +616,6 @@ int Reverb_setConfig(ReverbContext *pContext, effect_config_t *pConfig){
|| pConfig->outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE);
CHECK_ARG(pConfig->inputCfg.format == AUDIO_FORMAT_PCM_16_BIT);
- if(pConfig->inputCfg.samplingRate != 44100){
- return -EINVAL;
- }
-
//ALOGV("\tReverb_setConfig calling memcpy");
pContext->config = *pConfig;
@@ -648,7 +644,7 @@ int Reverb_setConfig(ReverbContext *pContext, effect_config_t *pConfig){
return -EINVAL;
}
- if(pContext->SampleRate != SampleRate){
+ if (pContext->SampleRate != SampleRate) {
LVREV_ControlParams_st ActiveParams;
LVREV_ReturnStatus_en LvmStatus = LVREV_SUCCESS;
@@ -662,11 +658,14 @@ int Reverb_setConfig(ReverbContext *pContext, effect_config_t *pConfig){
LVM_ERROR_CHECK(LvmStatus, "LVREV_GetControlParameters", "Reverb_setConfig")
if(LvmStatus != LVREV_SUCCESS) return -EINVAL;
+ ActiveParams.SampleRate = SampleRate;
+
LvmStatus = LVREV_SetControlParameters(pContext->hInstance, &ActiveParams);
LVM_ERROR_CHECK(LvmStatus, "LVREV_SetControlParameters", "Reverb_setConfig")
+ if(LvmStatus != LVREV_SUCCESS) return -EINVAL;
//ALOGV("\tReverb_setConfig Succesfully called LVREV_SetControlParameters\n");
-
+ pContext->SampleRate = SampleRate;
}else{
//ALOGV("\tReverb_setConfig keep sampling rate at %d", SampleRate);
}
@@ -818,6 +817,7 @@ int Reverb_init(ReverbContext *pContext){
/* General parameters */
params.OperatingMode = LVM_MODE_ON;
params.SampleRate = LVM_FS_44100;
+ pContext->SampleRate = LVM_FS_44100;
if(pContext->config.inputCfg.channels == AUDIO_CHANNEL_OUT_MONO){
params.SourceFormat = LVM_MONO;