1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_VDI_AUDIO_V1_0_EFFECTTYPES_H
17 #define OHOS_VDI_AUDIO_V1_0_EFFECTTYPES_H
18 
19 #include <stdbool.h>
20 #include <stdint.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25 
26 struct EffectInfoVdi {
27     char *libName;
28     char *effectId;
29     int32_t ioDirection;
30 };
31 
32 struct ControllerIdVdi {
33     char *libName;
34     char *effectId;
35 };
36 
37 struct EffectControllerDescriptorVdi {
38     char *effectId;
39     char *effectName;
40     char *libName;
41     char *supplier;
42 };
43 
44 enum AudioEffectBufferVdiTag {
45     EFFECT_BUFFER_VDI_VOID_TYPE = 0x0,
46     EFFECT_BUFFER_VDI_FLOAT_SIGNED_32 = 0x1,
47     EFFECT_BUFFER_VDI_SINGED_32 = 0x2,
48     EFFECT_BUFFER_VDI_SIGNED_16 = 0x4,
49     EFFECT_BUFFER_VDI_UNSIGNED_8 = 0x8,
50 };
51 
52 struct AudioEffectBufferVdi {
53     uint32_t frameCount;
54     int32_t datatag;
55     int8_t *rawData;
56     uint32_t rawDataLen;
57 };
58 
59 enum EffectCommandTableIndexVdi {
60     AUDIO_EFFECT_COMMAND_VDI_INIT_CONTOLLER,
61     AUDIO_EFFECT_COMMAND_VDI_SET_CONFIG,
62     AUDIO_EFFECT_COMMAND_VDI_GET_CONFIG,
63     AUDIO_EFFECT_COMMAND_VDI_RESET,
64     AUDIO_EFFECT_COMMAND_VDI_ENABLE,
65     AUDIO_EFFECT_COMMAND_VDI_DISABLE,
66     AUDIO_EFFECT_COMMAND_VDI_SET_PARAM,
67     AUDIO_EFFECT_COMMAND_VDI_GET_PARAM,
68 };
69 
70 enum AudioEffectHDICommandVdi {
71     EFFECT_INIT = 0,
72     EFFECT_BYPASS = 1,
73     EFFECT_HEAD_MODE = 2,
74     EFFECT_ROOM_MODE = 3,
75     EFFECT_BLUETOOTH_MODE = 4,
76     EFFECT_DESTROY = 5,
77     EFFECT_SPATIAL_DEVICE_TYPE = 6,
78 };
79 
80 #ifdef __cplusplus
81 }
82 #endif /* __cplusplus */
83 
84 #endif /* OHOS_VDI_AUDIO_EFFECTTYPES_H */