1
2
3
4 #ifndef _VC_AUDIO_DEFS_H_
5 #define _VC_AUDIO_DEFS_H_
6
7 #define VC_AUDIOSERV_MIN_VER 1
8 #define VC_AUDIOSERV_VER 2
9
10
11 #define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS")
12 #define VC_AUDIO_WRITE_COOKIE1 MAKE_FOURCC("BCMA")
13 #define VC_AUDIO_WRITE_COOKIE2 MAKE_FOURCC("DATA")
14
15
16
17
18
19
20 enum vc_audio_msg_type {
21 VC_AUDIO_MSG_TYPE_RESULT,
22 VC_AUDIO_MSG_TYPE_COMPLETE,
23 VC_AUDIO_MSG_TYPE_CONFIG,
24 VC_AUDIO_MSG_TYPE_CONTROL,
25 VC_AUDIO_MSG_TYPE_OPEN,
26 VC_AUDIO_MSG_TYPE_CLOSE,
27 VC_AUDIO_MSG_TYPE_START,
28 VC_AUDIO_MSG_TYPE_STOP,
29 VC_AUDIO_MSG_TYPE_WRITE,
30 VC_AUDIO_MSG_TYPE_MAX
31 };
32
33
34
35 struct vc_audio_config {
36 u32 channels;
37 u32 samplerate;
38 u32 bps;
39 };
40
41 struct vc_audio_control {
42 u32 volume;
43 u32 dest;
44 };
45
46 struct vc_audio_open {
47 u32 dummy;
48 };
49
50 struct vc_audio_close {
51 u32 dummy;
52 };
53
54 struct vc_audio_start {
55 u32 dummy;
56 };
57
58 struct vc_audio_stop {
59 u32 draining;
60 };
61
62
63 struct vc_audio_write {
64 u32 count;
65 u32 cookie1;
66 u32 cookie2;
67 s16 silence;
68 s16 max_packet;
69 };
70
71
72 struct vc_audio_result {
73 s32 success;
74 };
75
76
77 struct vc_audio_complete {
78 s32 count;
79 u32 cookie1;
80 u32 cookie2;
81 };
82
83
84 struct vc_audio_msg {
85 s32 type;
86 union {
87 struct vc_audio_config config;
88 struct vc_audio_control control;
89 struct vc_audio_open open;
90 struct vc_audio_close close;
91 struct vc_audio_start start;
92 struct vc_audio_stop stop;
93 struct vc_audio_write write;
94 struct vc_audio_result result;
95 struct vc_audio_complete complete;
96 };
97 };
98
99 #endif