From 25f4395b932fa9859a6e91ba77c5d20d009da64a Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 28 Jul 2010 05:40:18 -0700 Subject: Audio effects: modified command() parameter types. The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command() function have been modified from int to uint32_t. This is more consistent with their role. Change-Id: I84d289fc262d6753747910f06f485597dfee6591 --- include/media/AudioEffect.h | 18 ++-- include/media/EffectApi.h | 6 +- include/media/IEffect.h | 6 +- include/media/IEffectClient.h | 6 +- media/libeffects/factory/EffectsFactory.c | 7 +- .../libeffects/lvm/wrapper/Bundle/EffectBundle.cpp | 6 +- media/libeffects/testlibs/EffectEqualizer.cpp | 4 +- media/libeffects/testlibs/EffectReverb.c | 4 +- media/libeffects/testlibs/EffectReverb.h | 19 +++- media/libeffects/visualizer/EffectVisualizer.cpp | 4 +- media/libmedia/AudioEffect.cpp | 20 ++-- media/libmedia/IEffect.cpp | 14 ++- media/libmedia/IEffectClient.cpp | 12 ++- media/libmedia/Visualizer.cpp | 2 +- services/audioflinger/AudioFlinger.cpp | 105 ++++++++++++++++----- services/audioflinger/AudioFlinger.h | 18 +++- 16 files changed, 183 insertions(+), 68 deletions(-) diff --git a/include/media/AudioEffect.h b/include/media/AudioEffect.h index e9ff8a3..c967efb 100644 --- a/include/media/AudioEffect.h +++ b/include/media/AudioEffect.h @@ -382,10 +382,10 @@ public: * See EffectApi.h for details on effect command() function, valid command codes * and formats. */ - virtual status_t command(int32_t cmdCode, - int32_t cmdSize, + virtual status_t command(uint32_t cmdCode, + uint32_t cmdSize, void *cmdData, - int32_t *replySize, + uint32_t *replySize, void *replyData); @@ -429,10 +429,10 @@ private: virtual void enableStatusChanged(bool enabled) { mEffect->enableStatusChanged(enabled); } - virtual void commandExecuted(int cmdCode, - int cmdSize, + virtual void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, void *pCmdData, - int replySize, + uint32_t replySize, void *pReplyData) { mEffect->commandExecuted(cmdCode, cmdSize, pCmdData, replySize, pReplyData); } @@ -450,7 +450,11 @@ private: // IEffectClient void controlStatusChanged(bool controlGranted); void enableStatusChanged(bool enabled); - void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData); + void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData); void binderDied(); diff --git a/include/media/EffectApi.h b/include/media/EffectApi.h index 8c120e5..16fb43c 100644 --- a/include/media/EffectApi.h +++ b/include/media/EffectApi.h @@ -284,10 +284,10 @@ typedef int32_t (*effect_process_t)(effect_interface_t self, // //////////////////////////////////////////////////////////////////////////////// typedef int32_t (*effect_command_t)(effect_interface_t self, - int32_t cmdCode, - int32_t cmdSize, + uint32_t cmdCode, + uint32_t cmdSize, void *pCmdData, - int32_t *replySize, + uint32_t *replySize, void *pReplyData); diff --git a/include/media/IEffect.h b/include/media/IEffect.h index 6dad393..ff04869 100644 --- a/include/media/IEffect.h +++ b/include/media/IEffect.h @@ -33,7 +33,11 @@ public: virtual status_t disable() = 0; - virtual status_t command(int cmdCode, int cmdSize, void *pCmdData, int *pReplySize, void *pReplyData) = 0; + virtual status_t command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *pReplySize, + void *pReplyData) = 0; virtual void disconnect() = 0; diff --git a/include/media/IEffectClient.h b/include/media/IEffectClient.h index d22daf8..2f78c98 100644 --- a/include/media/IEffectClient.h +++ b/include/media/IEffectClient.h @@ -31,7 +31,11 @@ public: virtual void controlStatusChanged(bool controlGranted) = 0; virtual void enableStatusChanged(bool enabled) = 0; - virtual void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData) = 0; + virtual void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData) = 0; }; // ---------------------------------------------------------------------------- diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c index 0be280c..c19a505 100644 --- a/media/libeffects/factory/EffectsFactory.c +++ b/media/libeffects/factory/EffectsFactory.c @@ -73,7 +73,12 @@ int Effect_Process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buff return ret; } -int Effect_Command(effect_interface_t self, int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData) +int Effect_Command(effect_interface_t self, + uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData) { int ret = init(); if (ret < 0) { diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp index 4440447..4c3ebca 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp @@ -2348,10 +2348,10 @@ extern "C" int Effect_process(effect_interface_t self, /* Effect Control Interface Implementation: Command */ extern "C" int Effect_command(effect_interface_t self, - int cmdCode, - int cmdSize, + uint32_t cmdCode, + uint32_t cmdSize, void *pCmdData, - int *replySize, + uint32_t *replySize, void *pReplyData){ EffectContext * pContext = (EffectContext *) self; int retsize; diff --git a/media/libeffects/testlibs/EffectEqualizer.cpp b/media/libeffects/testlibs/EffectEqualizer.cpp index 0eb2bdf..a71f236 100644 --- a/media/libeffects/testlibs/EffectEqualizer.cpp +++ b/media/libeffects/testlibs/EffectEqualizer.cpp @@ -551,8 +551,8 @@ extern "C" int Equalizer_process(effect_interface_t self, audio_buffer_t *inBuff return 0; } // end Equalizer_process -extern "C" int Equalizer_command(effect_interface_t self, int cmdCode, int cmdSize, - void *pCmdData, int *replySize, void *pReplyData) { +extern "C" int Equalizer_command(effect_interface_t self, uint32_t cmdCode, uint32_t cmdSize, + void *pCmdData, uint32_t *replySize, void *pReplyData) { android::EqualizerContext * pContext = (android::EqualizerContext *) self; int retsize; diff --git a/media/libeffects/testlibs/EffectReverb.c b/media/libeffects/testlibs/EffectReverb.c index 3f9069f..3eb8b2c 100644 --- a/media/libeffects/testlibs/EffectReverb.c +++ b/media/libeffects/testlibs/EffectReverb.c @@ -270,8 +270,8 @@ static int Reverb_Process(effect_interface_t self, audio_buffer_t *inBuffer, aud } -static int Reverb_Command(effect_interface_t self, int cmdCode, int cmdSize, - void *pCmdData, int *replySize, void *pReplyData) { +static int Reverb_Command(effect_interface_t self, uint32_t cmdCode, uint32_t cmdSize, + void *pCmdData, uint32_t *replySize, void *pReplyData) { reverb_module_t *pRvbModule = (reverb_module_t *) self; reverb_object_t *pReverb; int retsize; diff --git a/media/libeffects/testlibs/EffectReverb.h b/media/libeffects/testlibs/EffectReverb.h index ee8e390..dbcd192 100644 --- a/media/libeffects/testlibs/EffectReverb.h +++ b/media/libeffects/testlibs/EffectReverb.h @@ -301,12 +301,23 @@ typedef struct reverb_module_s { *------------------------------------ */ int EffectQueryNumberEffects(uint32_t *pNumEffects); -int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor); -int EffectCreate(effect_uuid_t *effectUID, int32_t sessionId, int32_t ioId, effect_interface_t *pInterface); +int EffectQueryEffect(uint32_t index, + effect_descriptor_t *pDescriptor); +int EffectCreate(effect_uuid_t *effectUID, + int32_t sessionId, + int32_t ioId, + effect_interface_t *pInterface); int EffectRelease(effect_interface_t interface); -static int Reverb_Process(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer); -static int Reverb_Command(effect_interface_t self, int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData); +static int Reverb_Process(effect_interface_t self, + audio_buffer_t *inBuffer, + audio_buffer_t *outBuffer); +static int Reverb_Command(effect_interface_t self, + uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData); /*------------------------------------ diff --git a/media/libeffects/visualizer/EffectVisualizer.cpp b/media/libeffects/visualizer/EffectVisualizer.cpp index ec13557..8ab57c9 100644 --- a/media/libeffects/visualizer/EffectVisualizer.cpp +++ b/media/libeffects/visualizer/EffectVisualizer.cpp @@ -272,8 +272,8 @@ extern "C" int Visualizer_process( return 0; } // end Visualizer_process -extern "C" int Visualizer_command(effect_interface_t self, int cmdCode, int cmdSize, - void *pCmdData, int *replySize, void *pReplyData) { +extern "C" int Visualizer_command(effect_interface_t self, uint32_t cmdCode, uint32_t cmdSize, + void *pCmdData, uint32_t *replySize, void *pReplyData) { android::VisualizerContext * pContext = (android::VisualizerContext *)self; int retsize; diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index df0f73b..3cdf48a 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -221,7 +221,11 @@ status_t AudioEffect::setEnabled(bool enabled) return INVALID_OPERATION; } -status_t AudioEffect::command(int32_t cmdCode, int32_t cmdSize, void *cmdData, int32_t *replySize, void *replyData) +status_t AudioEffect::command(uint32_t cmdCode, + uint32_t cmdSize, + void *cmdData, + uint32_t *replySize, + void *replyData) { if (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS) { return INVALID_OPERATION; @@ -241,8 +245,8 @@ status_t AudioEffect::setParameter(effect_param_t *param) return BAD_VALUE; } - int size = sizeof(int); - int psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; + uint32_t size = sizeof(int); + uint32_t psize = ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; LOGV("setParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); @@ -285,7 +289,7 @@ status_t AudioEffect::setParameterCommit() if (mCblk->clientIndex == 0) { return INVALID_OPERATION; } - int size = 0; + uint32_t size = 0; return mIEffect->command(EFFECT_CMD_SET_PARAM_COMMIT, 0, NULL, &size, NULL); } @@ -301,7 +305,7 @@ status_t AudioEffect::getParameter(effect_param_t *param) LOGV("getParameter: param: %d, param2: %d", *(int *)param->data, (param->psize == 8) ? *((int *)param->data + 1): -1); - int psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; + uint32_t psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; return mIEffect->command(EFFECT_CMD_GET_PARAM, sizeof(effect_param_t) + param->psize, param, &psize, param); } @@ -350,7 +354,11 @@ void AudioEffect::enableStatusChanged(bool enabled) } } -void AudioEffect::commandExecuted(int cmdCode, int cmdSize, void *cmdData, int replySize, void *replyData) +void AudioEffect::commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *cmdData, + uint32_t replySize, + void *replyData) { if (cmdData == NULL || replyData == NULL) { return; diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp index 8e3ac71..a945b97 100644 --- a/media/libmedia/IEffect.cpp +++ b/media/libmedia/IEffect.cpp @@ -59,7 +59,11 @@ public: return reply.readInt32(); } - status_t command(int cmdCode, int cmdSize, void *pCmdData, int *pReplySize, void *pReplyData) + status_t command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *pReplySize, + void *pReplyData) { LOGV("command"); Parcel data, reply; @@ -136,15 +140,15 @@ status_t BnEffect::onTransact( case COMMAND: { LOGV("COMMAND"); CHECK_INTERFACE(IEffect, data, reply); - int cmdCode = data.readInt32(); - int cmdSize = data.readInt32(); + uint32_t cmdCode = data.readInt32(); + uint32_t cmdSize = data.readInt32(); char *cmd = NULL; if (cmdSize) { cmd = (char *)malloc(cmdSize); data.read(cmd, cmdSize); } - int replySize = data.readInt32(); - int replySz = replySize; + uint32_t replySize = data.readInt32(); + uint32_t replySz = replySize; char *resp = NULL; if (replySize) { resp = (char *)malloc(replySize); diff --git a/media/libmedia/IEffectClient.cpp b/media/libmedia/IEffectClient.cpp index e7659ae..1fa9cbe 100644 --- a/media/libmedia/IEffectClient.cpp +++ b/media/libmedia/IEffectClient.cpp @@ -56,7 +56,11 @@ public: remote()->transact(ENABLE_STATUS_CHANGED, data, &reply, IBinder::FLAG_ONEWAY); } - void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData) + void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData) { LOGV("commandExecuted"); Parcel data, reply; @@ -108,14 +112,14 @@ status_t BnEffectClient::onTransact( case COMMAND_EXECUTED: { LOGV("COMMAND_EXECUTED"); CHECK_INTERFACE(IEffectClient, data, reply); - int cmdCode = data.readInt32(); - int cmdSize = data.readInt32(); + uint32_t cmdCode = data.readInt32(); + uint32_t cmdSize = data.readInt32(); char *cmd = NULL; if (cmdSize) { cmd = (char *)malloc(cmdSize); data.read(cmd, cmdSize); } - int replySize = data.readInt32(); + uint32_t replySize = data.readInt32(); char *resp = NULL; if (replySize) { resp = (char *)malloc(replySize); diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp index 47e96e5..32cdb49 100644 --- a/media/libmedia/Visualizer.cpp +++ b/media/libmedia/Visualizer.cpp @@ -184,7 +184,7 @@ status_t Visualizer::getWaveForm(uint8_t *waveform) status_t status = NO_ERROR; if (mEnabled) { - int32_t replySize = mCaptureSize; + uint32_t replySize = mCaptureSize; status_t status = command(VISU_CMD_CAPTURE, 0, NULL, &replySize, waveform); if (replySize == 0) { status = NOT_ENOUGH_DATA; diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index b88e69d..3572d10 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -5408,8 +5408,13 @@ status_t AudioFlinger::EffectModule::configure() this, thread.get(), mConfig.inputCfg.buffer.raw, mConfig.inputCfg.buffer.frameCount); status_t cmdStatus; - int size = sizeof(int); - status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_CONFIGURE, sizeof(effect_config_t), &mConfig, &size, &cmdStatus); + uint32_t size = sizeof(int); + status_t status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_CONFIGURE, + sizeof(effect_config_t), + &mConfig, + &size, + &cmdStatus); if (status == 0) { status = cmdStatus; } @@ -5427,8 +5432,13 @@ status_t AudioFlinger::EffectModule::init() return NO_INIT; } status_t cmdStatus; - int size = sizeof(status_t); - status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_INIT, 0, NULL, &size, &cmdStatus); + uint32_t size = sizeof(status_t); + status_t status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_INIT, + 0, + NULL, + &size, + &cmdStatus); if (status == 0) { status = cmdStatus; } @@ -5441,8 +5451,13 @@ status_t AudioFlinger::EffectModule::start_l() return NO_INIT; } status_t cmdStatus; - int size = sizeof(status_t); - status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_ENABLE, 0, NULL, &size, &cmdStatus); + uint32_t size = sizeof(status_t); + status_t status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_ENABLE, + 0, + NULL, + &size, + &cmdStatus); if (status == 0) { status = cmdStatus; } @@ -5455,15 +5470,24 @@ status_t AudioFlinger::EffectModule::stop_l() return NO_INIT; } status_t cmdStatus; - int size = sizeof(status_t); - status_t status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_DISABLE, 0, NULL, &size, &cmdStatus); + uint32_t size = sizeof(status_t); + status_t status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_DISABLE, + 0, + NULL, + &size, + &cmdStatus); if (status == 0) { status = cmdStatus; } return status; } -status_t AudioFlinger::EffectModule::command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData) +status_t AudioFlinger::EffectModule::command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData) { Mutex::Autolock _l(mLock); // LOGV("command(), cmdCode: %d, mEffectInterface: %p", cmdCode, mEffectInterface); @@ -5471,9 +5495,14 @@ status_t AudioFlinger::EffectModule::command(int cmdCode, int cmdSize, void *pCm if (mEffectInterface == NULL) { return NO_INIT; } - status_t status = (*mEffectInterface)->command(mEffectInterface, cmdCode, cmdSize, pCmdData, replySize, pReplyData); + status_t status = (*mEffectInterface)->command(mEffectInterface, + cmdCode, + cmdSize, + pCmdData, + replySize, + pReplyData); if (cmdCode != EFFECT_CMD_GET_PARAM && status == NO_ERROR) { - int size = (replySize == NULL) ? 0 : *replySize; + uint32_t size = (replySize == NULL) ? 0 : *replySize; for (size_t i = 1; i < mHandles.size(); i++) { sp h = mHandles[i].promote(); if (h != 0) { @@ -5549,13 +5578,18 @@ status_t AudioFlinger::EffectModule::setVolume(uint32_t *left, uint32_t *right, status_t cmdStatus; uint32_t volume[2]; uint32_t *pVolume = NULL; - int size = sizeof(volume); + uint32_t size = sizeof(volume); volume[0] = *left; volume[1] = *right; if (controller) { pVolume = volume; } - status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_VOLUME, size, volume, &size, pVolume); + status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_SET_VOLUME, + size, + volume, + &size, + pVolume); if (controller && status == NO_ERROR && size == sizeof(volume)) { *left = volume[0]; *right = volume[1]; @@ -5575,8 +5609,13 @@ status_t AudioFlinger::EffectModule::setDevice(uint32_t device) return BAD_VALUE; } status_t cmdStatus; - int size = sizeof(status_t); - status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_DEVICE, sizeof(uint32_t), &device, &size, &cmdStatus); + uint32_t size = sizeof(status_t); + status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_SET_DEVICE, + sizeof(uint32_t), + &device, + &size, + &cmdStatus); if (status == NO_ERROR) { status = cmdStatus; } @@ -5595,8 +5634,13 @@ status_t AudioFlinger::EffectModule::setMode(uint32_t mode) return BAD_VALUE; } status_t cmdStatus; - int size = sizeof(status_t); - status = (*mEffectInterface)->command(mEffectInterface, EFFECT_CMD_SET_AUDIO_MODE, sizeof(int), &effectMode, &size, &cmdStatus); + uint32_t size = sizeof(status_t); + status = (*mEffectInterface)->command(mEffectInterface, + EFFECT_CMD_SET_AUDIO_MODE, + sizeof(int), + &effectMode, + &size, + &cmdStatus); if (status == NO_ERROR) { status = cmdStatus; } @@ -5805,9 +5849,14 @@ void AudioFlinger::EffectHandle::disconnect() } } -status_t AudioFlinger::EffectHandle::command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData) +status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData) { -// LOGV("command(), cmdCode: %d, mHasControl: %d, mEffect: %p", cmdCode, mHasControl, (mEffect == 0) ? 0 : mEffect.get()); +// LOGV("command(), cmdCode: %d, mHasControl: %d, mEffect: %p", +// cmdCode, mHasControl, (mEffect == 0) ? 0 : mEffect.get()); // only get parameter command is permitted for applications not controlling the effect if (!mHasControl && cmdCode != EFFECT_CMD_GET_PARAM) { @@ -5829,7 +5878,7 @@ status_t AudioFlinger::EffectHandle::command(int cmdCode, int cmdSize, void *pCm status_t status = NO_ERROR; while (mCblk->serverIndex < mCblk->clientIndex) { int reply; - int rsize = sizeof(int); + uint32_t rsize = sizeof(int); int *p = (int *)(mBuffer + mCblk->serverIndex); int size = *p++; if (((uint8_t *)p + size) > mBuffer + mCblk->clientIndex) { @@ -5842,8 +5891,14 @@ status_t AudioFlinger::EffectHandle::command(int cmdCode, int cmdSize, void *pCm mCblk->serverIndex += size; continue; } - int psize = sizeof(effect_param_t) + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + param->vsize; - status_t ret = mEffect->command(EFFECT_CMD_SET_PARAM, psize, p, &rsize, &reply); + uint32_t psize = sizeof(effect_param_t) + + ((param->psize - 1) / sizeof(int) + 1) * sizeof(int) + + param->vsize; + status_t ret = mEffect->command(EFFECT_CMD_SET_PARAM, + psize, + p, + &rsize, + &reply); if (ret == NO_ERROR) { if (reply != NO_ERROR) { status = reply; @@ -5879,7 +5934,11 @@ void AudioFlinger::EffectHandle::setControl(bool hasControl, bool signal) } } -void AudioFlinger::EffectHandle::commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData) +void AudioFlinger::EffectHandle::commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData) { if (mEffectClient != 0) { mEffectClient->commandExecuted(cmdCode, cmdSize, pCmdData, replySize, pReplyData); diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index a8c9a92..8f667a3 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -933,7 +933,11 @@ private: int id() { return mId; } void process(); void updateState(); - status_t command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData); + status_t command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData); void reset_l(); status_t configure(); @@ -1023,7 +1027,11 @@ private: // IEffect virtual status_t enable(); virtual status_t disable(); - virtual status_t command(int cmdCode, int cmdSize, void *pCmdData, int *replySize, void *pReplyData); + virtual status_t command(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t *replySize, + void *pReplyData); virtual void disconnect(); virtual sp getCblk() const; virtual status_t onTransact(uint32_t code, const Parcel& data, @@ -1032,7 +1040,11 @@ private: // Give or take control of effect module void setControl(bool hasControl, bool signal); - void commandExecuted(int cmdCode, int cmdSize, void *pCmdData, int replySize, void *pReplyData); + void commandExecuted(uint32_t cmdCode, + uint32_t cmdSize, + void *pCmdData, + uint32_t replySize, + void *pReplyData); void setEnabled(bool enabled); // Getters -- cgit v1.1