• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_BUTT,
26 };
27 
28 struct ControlHost {
29     struct IDeviceIoService service;
30     struct HdfDeviceObject *device;
31     void *priv;
32 };
33 
34 struct ControlDispCmdHandleList {
35     enum ControlDispMethodCmd cmd;
36     int32_t (*func)(const struct HdfDeviceIoClient *client, struct HdfSBuf *data, struct HdfSBuf *reply);
37 };
38 
39 #ifdef __cplusplus
40 #if __cplusplus
41 }
42 #endif
43 #endif /* __cplusplus */
44 
45 #endif /* AUDIO_CONTROL_H */
46