summaryrefslogtreecommitdiffstats
path: root/media/libeffects
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-07-26 12:30:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-07-26 12:30:49 -0700
commit49c16aaec0d314bcf320e088e4bc68d0585c040a (patch)
treeb29d2e870f53ebd5d2c46d659c9b5501a9837826 /media/libeffects
parentdc619be998a8e727008677ea222bc1e032453785 (diff)
parentf12da407f72875d78d7927a4ef82fb46b6c78203 (diff)
downloadframeworks_av-49c16aaec0d314bcf320e088e4bc68d0585c040a.zip
frameworks_av-49c16aaec0d314bcf320e088e4bc68d0585c040a.tar.gz
frameworks_av-49c16aaec0d314bcf320e088e4bc68d0585c040a.tar.bz2
am e80c30c6: am 00de7218: Merge "Fixed bug in vlm effect bunde wrapper effect init function." into gingerbread
Merge commit 'e80c30c6b557fab2f5fc7a87c51018f5a8074338' * commit 'e80c30c6b557fab2f5fc7a87c51018f5a8074338': Fixed bug in vlm effect bunde wrapper effect init function.
Diffstat (limited to 'media/libeffects')
-rw-r--r--media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp40
1 files changed, 7 insertions, 33 deletions
diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
index 6043dd5..5e91974 100644
--- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
+++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
@@ -2337,7 +2337,6 @@ extern "C" int Effect_command(effect_interface_t self,
void *pReplyData){
EffectContext * pContext = (EffectContext *) self;
int retsize;
- int status = 0;
//LOGV("\t\nEffect_command start");
@@ -2371,54 +2370,29 @@ extern "C" int Effect_command(effect_interface_t self,
switch (cmdCode){
case EFFECT_CMD_INIT:
+ if (pReplyData == NULL || *replySize != sizeof(int)){
+ LOGV("\tLVM_ERROR, EFFECT_CMD_INIT: ERROR for effect type %d",
+ pContext->EffectType);
+ return -EINVAL;
+ }
+ *(int *) pReplyData = 0;
//LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT start");
if(pContext->EffectType == LVM_BASS_BOOST){
//LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_BASS_BOOST");
-
- if (pReplyData == NULL || *replySize != sizeof(int)){
- LOGV("\tLVM_ERROR : BassBoost_command cmdCode Case: "
- "EFFECT_CMD_INIT: ERROR");
- return -EINVAL;
- }
-
android::BassSetStrength(pContext, 0);
}
if(pContext->EffectType == LVM_VIRTUALIZER){
//LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_VIRTUALIZER");
-
- if (pReplyData == NULL || *replySize != sizeof(int)){
- LOGV("\tLVM_ERROR : Virtualizer_command cmdCode Case: "
- "EFFECT_CMD_INIT: ERROR");
- return -EINVAL;
- }
-
android::VirtualizerSetStrength(pContext, 0);
}
if(pContext->EffectType == LVM_EQUALIZER){
//LOGV("\tEffect_command cmdCode Case: EFFECT_CMD_INIT for LVM_EQUALIZER");
-
- if (pReplyData == NULL || *replySize != sizeof(int)){
- LOGV("\tLVM_ERROR : Equalizer_command cmdCode Case: "
- "EFFECT_CMD_INIT: ERROR");
- return -EINVAL;
- }
-
android::EqualizerSetPreset(pContext, 0);
}
if(pContext->EffectType == LVM_VOLUME){
//LOGV("\tEffect_command cmdCode Case: "
// "EFFECT_CMD_INIT start");
-
- if (pReplyData == NULL || *replySize != sizeof(int)){
- LOGV("\tLVM_ERROR : Volume_command cmdCode Case: "
- "EFFECT_CMD_INIT: ERROR");
- return -EINVAL;
- }
-
- status = android::VolumeSetVolumeLevel(pContext, 0);
- if(status == -EINVAL){
- return -EINVAL;
- }
+ *(int *) pReplyData = android::VolumeSetVolumeLevel(pContext, 0);
}
break;