mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-01-03 16:13:35 +08:00
Pass disable reason to the app
This commit is contained in:
parent
173222774f
commit
01029501e2
@ -16,6 +16,8 @@ extern "C" {
|
|||||||
#define PARAM_GET_CONVOLUTION_KERNEL_ID 5
|
#define PARAM_GET_CONVOLUTION_KERNEL_ID 5
|
||||||
#define PARAM_GET_DRIVER_VERSION_CODE 6
|
#define PARAM_GET_DRIVER_VERSION_CODE 6
|
||||||
#define PARAM_GET_DRIVER_VERSION_NAME 7
|
#define PARAM_GET_DRIVER_VERSION_NAME 7
|
||||||
|
#define PARAM_GET_DISABLE_REASON 8
|
||||||
|
#define PARAM_GET_DISABLE_REASON_MESSAGE 9
|
||||||
|
|
||||||
// Param set
|
// Param set
|
||||||
#define PARAM_SET_UPDATE_STATUS 0x9002
|
#define PARAM_SET_UPDATE_STATUS 0x9002
|
||||||
|
@ -214,6 +214,20 @@ int32_t ViperContext::handleGetParam(effect_param_t *pCmdParam, effect_param_t *
|
|||||||
*pReplySize = sizeof(effect_param_t) + pReplyParam->psize + vOffset + pReplyParam->vsize;
|
*pReplySize = sizeof(effect_param_t) + pReplyParam->psize + vOffset + pReplyParam->vsize;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case PARAM_GET_DISABLE_REASON: {
|
||||||
|
pReplyParam->status = 0;
|
||||||
|
pReplyParam->vsize = sizeof(int32_t);
|
||||||
|
*(int32_t *) (pReplyParam->data + vOffset) = static_cast<int32_t>(disableReason);
|
||||||
|
*pReplySize = sizeof(effect_param_t) + pReplyParam->psize + vOffset + pReplyParam->vsize;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
case PARAM_GET_DISABLE_REASON_MESSAGE: {
|
||||||
|
pReplyParam->status = 0;
|
||||||
|
pReplyParam->vsize = disableReasonMessage.size();
|
||||||
|
memcpy(pReplyParam->data + vOffset, disableReasonMessage.c_str(), pReplyParam->vsize);
|
||||||
|
*pReplySize = sizeof(effect_param_t) + pReplyParam->psize + vOffset + pReplyParam->vsize;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
class ViperContext {
|
class ViperContext {
|
||||||
public:
|
public:
|
||||||
enum class DisableReason {
|
enum class DisableReason : int32_t {
|
||||||
NONE,
|
UNKNOWN = -1,
|
||||||
UNKNOWN,
|
NONE = 0,
|
||||||
INVALID_FRAME_COUNT,
|
INVALID_FRAME_COUNT,
|
||||||
INVALID_SAMPLING_RATE,
|
INVALID_SAMPLING_RATE,
|
||||||
INVALID_CHANNEL_COUNT,
|
INVALID_CHANNEL_COUNT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user