1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef AUDIO_CONTROL_DISPATCH_H
10 #define AUDIO_CONTROL_DISPATCH_H
11 
12 #include "audio_host.h"
13 
14 #ifdef __cplusplus
15 #if __cplusplus
16 extern "C" {
17 #endif
18 #endif /* __cplusplus */
19 
20 enum ControlDispMethodCmd {
21     AUDIODRV_CTRL_IOCTRL_ELEM_INFO,
22     AUDIODRV_CTRL_IOCTRL_ELEM_READ,
23     AUDIODRV_CTRL_IOCTRL_ELEM_WRITE,
24     AUDIODRV_CTRL_IOCTRL_ELEM_LIST,
25     AUDIODRV_CTRL_IOCTRL_ELEM_CARD,
26     AUDIODRV_CTRL_IOCTRL_ELEM_HDMI,
27     AUDIODRV_CTRL_IOCTRL_ELEM_BUTT,
28 };
29 
30 struct ControlHost {
31     struct IDeviceIoService service;
32     struct HdfDeviceObject *device;
33     void *priv;
34 };
35 
36 struct ControlDispCmdHandleList {
37     enum ControlDispMethodCmd cmd;
38     int32_t (*func)(const struct HdfDeviceIoClient *client, struct HdfSBuf *data, struct HdfSBuf *reply);
39 };
40 
41 #ifdef __cplusplus
42 #if __cplusplus
43 }
44 #endif
45 #endif /* __cplusplus */
46 
47 #endif /* AUDIO_CONTROL_H */
48