1 # KOBJ
2 #
3 # Copyright (c) 2000 Cameron Grant <cg@freebsd.org>
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 #
15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 # SUCH DAMAGE.
26 #
27 # $FreeBSD: releng/5.3/sys/dev/sound/pcm/channel_if.m 77269 2001-05-27 17:22:00Z cg $
28 #
29
30 #include <dev/sound/pcm/sound.h>
31
32 INTERFACE channel;
33
34 CODE {
35
36 static int
37 channel_nosetdir(kobj_t obj, void *data, int dir)
38 {
39 return 0;
40 }
41
42 static int
43 channel_noreset(kobj_t obj, void *data)
44 {
45 return 0;
46 }
47
48 static int
49 channel_noresetdone(kobj_t obj, void *data)
50 {
51 return 0;
52 }
53
54 static int
55 channel_nofree(kobj_t obj, void *data)
56 {
57 return 1;
58 }
59
60 static u_int32_t
61 channel_nogetptr(kobj_t obj, void *data)
62 {
63 return 0;
64 }
65
66 static int
67 channel_nonotify(kobj_t obj, void *data, u_int32_t changed)
68 {
69 return 0;
70 }
71
72 };
73
74 METHOD void* init {
75 kobj_t obj;
76 void *devinfo;
77 struct snd_dbuf *b;
78 struct pcm_channel *c;
79 int dir;
80 };
81
82 METHOD int free {
83 kobj_t obj;
84 void *data;
85 } DEFAULT channel_nofree;
86
87 METHOD int reset {
88 kobj_t obj;
89 void *data;
90 } DEFAULT channel_noreset;
91
92 METHOD int resetdone {
93 kobj_t obj;
94 void *data;
95 } DEFAULT channel_noresetdone;
96
97 METHOD int setdir {
98 kobj_t obj;
99 void *data;
100 int dir;
101 } DEFAULT channel_nosetdir;
102
103 METHOD u_int32_t setformat {
104 kobj_t obj;
105 void *data;
106 u_int32_t format;
107 };
108
109 METHOD u_int32_t setspeed {
110 kobj_t obj;
111 void *data;
112 u_int32_t speed;
113 };
114
115 METHOD u_int32_t setblocksize {
116 kobj_t obj;
117 void *data;
118 u_int32_t blocksize;
119 };
120
121 METHOD int trigger {
122 kobj_t obj;
123 void *data;
124 int go;
125 };
126
127 METHOD u_int32_t getptr {
128 kobj_t obj;
129 void *data;
130 } DEFAULT channel_nogetptr;
131
132 METHOD struct pcmchan_caps* getcaps {
133 kobj_t obj;
134 void *data;
135 };
136
137 METHOD int notify {
138 kobj_t obj;
139 void *data;
140 u_int32_t changed;
141 } DEFAULT channel_nonotify;
Cache object: 0d41e4c363a9fdfed61ba26ba5b13a3d
|