Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / rom / usb / classes / audio / usbaudio.class.h
blobdc1f214dce4746855c2919c5fc563de10118fa91
1 #ifndef USBAUDIO_CLASS_H
2 #define USBAUDIO_CLASS_H
4 /*
5 *----------------------------------------------------------------------------
6 * Includes for usbaudio class
7 *----------------------------------------------------------------------------
8 * By Chris Hodges <chrisly@platon42.de>
9 */
11 #include "common.h"
13 #include <devices/usb_audio.h>
14 #include <libraries/usbclass.h>
16 #include <devices/ahi.h>
17 #include <libraries/ahi_sub.h>
19 #include <string.h>
20 #include <stddef.h>
21 #include <stdio.h>
23 #include "usbaudio.h"
25 #define SUBLIBBASETYPEPTR struct NepAudioSubLibBase *
27 /* Protos */
29 struct NepClassAudio * usbAttemptInterfaceBinding(struct NepAudioBase *nh, struct PsdInterface *pif);
30 struct NepClassAudio * usbForceInterfaceBinding(struct NepAudioBase *nh, struct PsdInterface *pif);
31 void usbReleaseInterfaceBinding(struct NepAudioBase *nh, struct NepClassAudio *nch);
33 AROS_UFP3(SUBLIBBASETYPEPTR, subLibInit,
34 AROS_UFPA(SUBLIBBASETYPEPTR, nas, D0),
35 AROS_UFPA(BPTR, seglist, A0),
36 AROS_UFPA(struct ExecBase *, SysBase, A6));
38 AROS_LD1(SUBLIBBASETYPEPTR, subLibOpen,
39 AROS_LDA(ULONG, version, D0),
40 SUBLIBBASETYPEPTR, nas, 1, nep);
42 AROS_LD0(BPTR, subLibClose,
43 SUBLIBBASETYPEPTR, nas, 2, nep);
45 AROS_LD1(BPTR, subLibExpunge,
46 AROS_LDA(SUBLIBBASETYPEPTR, extralh, D0),
47 SUBLIBBASETYPEPTR, nas, 3, nep);
49 AROS_LD0(SUBLIBBASETYPEPTR, subLibReserved,
50 SUBLIBBASETYPEPTR, nas, 4, nep);
52 AROS_LD2(ULONG, subLibAllocAudio,
53 AROS_LDA(struct TagItem *, tags, A1),
54 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
55 SUBLIBBASETYPEPTR, nas, 5, nep);
57 AROS_LD1(void, subLibFreeAudio,
58 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
59 SUBLIBBASETYPEPTR, nas, 6, nep);
61 AROS_LD1(void, subLibDisable,
62 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
63 SUBLIBBASETYPEPTR, nas, 7, nep);
65 AROS_LD1(void, subLibEnable,
66 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
67 SUBLIBBASETYPEPTR, nas, 8, nep);
69 AROS_LD2(ULONG, subLibStart,
70 AROS_LDA(ULONG, flags, D0),
71 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
72 SUBLIBBASETYPEPTR, nas, 9, nep);
74 AROS_LD2(ULONG, subLibUpdate,
75 AROS_LDA(ULONG, flags, D0),
76 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
77 SUBLIBBASETYPEPTR, nas, 10, nep);
79 AROS_LD2(ULONG, subLibStop,
80 AROS_LDA(ULONG, flags, D0),
81 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
82 SUBLIBBASETYPEPTR, nas, 11, nep);
84 AROS_LD5(ULONG, subLibSetVol,
85 AROS_LDA(UWORD, channel, D0),
86 AROS_LDA(Fixed, volume, D1),
87 AROS_LDA(sposition, pan, D2),
88 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
89 AROS_LDA(ULONG, flags, D3),
90 SUBLIBBASETYPEPTR, nas, 12, nep);
92 AROS_LD4(ULONG, subLibSetFreq,
93 AROS_LDA(UWORD, channel, D0),
94 AROS_LDA(ULONG, freq, D1),
95 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
96 AROS_LDA(ULONG, flags, D2),
97 SUBLIBBASETYPEPTR, nas, 13, nep);
99 AROS_LD6(ULONG, subLibSetSound,
100 AROS_LDA(UWORD, channel, D0),
101 AROS_LDA(UWORD, sound, D1),
102 AROS_LDA(ULONG, offset, D2),
103 AROS_LDA(LONG, length, D3),
104 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
105 AROS_LDA(ULONG, flags, D4),
106 SUBLIBBASETYPEPTR, nas, 14, nep);
108 AROS_LD2(ULONG, subLibSetEffect,
109 AROS_LDA(ULONG *, effect, A0),
110 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
111 SUBLIBBASETYPEPTR, nas, 15, nep);
113 AROS_LD4(ULONG, subLibLoadSound,
114 AROS_LDA(UWORD, sound, D0),
115 AROS_LDA(ULONG, type, D1),
116 AROS_LDA(APTR, info, A0),
117 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
118 SUBLIBBASETYPEPTR, nas, 16, nep);
120 AROS_LD2(ULONG, subLibUnloadSound,
121 AROS_LDA(UWORD, sound, D0),
122 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
123 SUBLIBBASETYPEPTR, nas, 17, nep);
125 AROS_LD5(IPTR, subLibGetAttr,
126 AROS_LDA(ULONG, attr, D0),
127 AROS_LDA(LONG, arg, D1),
128 AROS_LDA(LONG, defvalue, D2),
129 AROS_LDA(struct TagItem *, tags, A1),
130 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
131 SUBLIBBASETYPEPTR, nas, 18, nep);
133 AROS_LD3(IPTR, subLibHardwareControl,
134 AROS_LDA(ULONG, attr, D0),
135 AROS_LDA(LONG, arg, D1),
136 AROS_LDA(struct AHIAudioCtrlDrv *, audioctrl, A2),
137 SUBLIBBASETYPEPTR, nas, 19, nep);
139 AROS_INTP(subLibPlayerIntV4);
141 AROS_INTP(subLibPlayerIntV6);
143 AROS_INTP(subLibPlayerIntDummy);
145 struct NepClassAudio * nAllocAudio(void);
146 void nFreeAudio(struct NepClassAudio *nch);
148 BOOL nLoadClassConfig(struct NepAudioBase *nh);
149 LONG nOpenCfgWindow(struct NepAudioBase *nh);
151 void nGUITaskCleanup(struct NepAudioBase *nh);
153 AROS_UFP0(void, nAudioTask);
154 AROS_UFP0(void, nGUITask);
156 AROS_UFP3(void, nOutReqHook,
157 AROS_UFPA(struct Hook *, hook, A0),
158 AROS_UFPA(struct IOUsbHWRTIso *, urti, A2),
159 AROS_UFPA(struct IOUsbHWBufferReq *, ubr, A1));
161 AROS_UFP3(void, nInReqHook,
162 AROS_UFPA(struct Hook *, hook, A0),
163 AROS_UFPA(struct IOUsbHWRTIso *, urti, A2),
164 AROS_UFPA(struct IOUsbHWBufferReq *, ubr, A1));
166 AROS_UFP3(void, nInDoneHook,
167 AROS_UFPA(struct Hook *, hook, A0),
168 AROS_UFPA(struct IOUsbHWRTIso *, urti, A2),
169 AROS_UFPA(struct IOUsbHWBufferReq *, ubr, A1));
171 AROS_UFP3(void, nReleaseHook,
172 AROS_UFPA(struct Hook *, hook, A0),
173 AROS_UFPA(APTR, prt, A2),
174 AROS_UFPA(APTR, unused, A1));
176 #endif /* USBAUDIO_CLASS_H */