msm6258.c revision 1.17.8.1 1 1.17 jmcneill /* $NetBSD: msm6258.c,v 1.17.8.1 2017/12/03 11:37:03 jdolecek Exp $ */
2 1.1 minoura
3 1.1 minoura /*
4 1.1 minoura * Copyright (c) 2001 Tetsuya Isaki. All rights reserved.
5 1.1 minoura *
6 1.1 minoura * Redistribution and use in source and binary forms, with or without
7 1.1 minoura * modification, are permitted provided that the following conditions
8 1.1 minoura * are met:
9 1.1 minoura * 1. Redistributions of source code must retain the above copyright
10 1.1 minoura * notice, this list of conditions and the following disclaimer.
11 1.1 minoura * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 minoura * notice, this list of conditions and the following disclaimer in the
13 1.1 minoura * documentation and/or other materials provided with the distribution.
14 1.1 minoura *
15 1.1 minoura * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 1.1 minoura * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 1.1 minoura * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 1.1 minoura * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 1.1 minoura * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 1.1 minoura * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 1.1 minoura * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22 1.1 minoura * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 1.1 minoura * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 1.1 minoura * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 1.1 minoura * SUCH DAMAGE.
26 1.1 minoura */
27 1.1 minoura
28 1.1 minoura /*
29 1.1 minoura * OKI MSM6258 ADPCM voice synthesizer codec.
30 1.1 minoura */
31 1.5 lukem
32 1.5 lukem #include <sys/cdefs.h>
33 1.17 jmcneill __KERNEL_RCSID(0, "$NetBSD: msm6258.c,v 1.17.8.1 2017/12/03 11:37:03 jdolecek Exp $");
34 1.1 minoura
35 1.1 minoura #include <sys/systm.h>
36 1.1 minoura #include <sys/device.h>
37 1.17 jmcneill #include <sys/kmem.h>
38 1.1 minoura #include <sys/select.h>
39 1.1 minoura #include <sys/audioio.h>
40 1.1 minoura
41 1.1 minoura #include <dev/audio_if.h>
42 1.6 isaki #include <dev/auconv.h>
43 1.1 minoura #include <dev/audiovar.h>
44 1.4 minoura #include <dev/mulaw.h>
45 1.1 minoura #include <dev/ic/msm6258var.h>
46 1.1 minoura
47 1.9 isaki struct msm6258_codecvar {
48 1.12 kent stream_filter_t base;
49 1.12 kent short mc_amp;
50 1.12 kent char mc_estim;
51 1.9 isaki };
52 1.9 isaki
53 1.12 kent static stream_filter_t *msm6258_factory
54 1.17 jmcneill (struct audio_softc *,
55 1.17 jmcneill int (*)(struct audio_softc *, stream_fetcher_t *, audio_stream_t *, int));
56 1.12 kent static void msm6258_dtor(struct stream_filter *);
57 1.15 perry static inline uint8_t pcm2adpcm_step(struct msm6258_codecvar *, int16_t);
58 1.15 perry static inline int16_t adpcm2pcm_step(struct msm6258_codecvar *, uint8_t);
59 1.1 minoura
60 1.12 kent static const int adpcm_estimindex[16] = {
61 1.9 isaki 2, 6, 10, 14, 18, 22, 26, 30,
62 1.9 isaki -2, -6, -10, -14, -18, -22, -26, -30
63 1.1 minoura };
64 1.1 minoura
65 1.12 kent static const int adpcm_estim[49] = {
66 1.1 minoura 16, 17, 19, 21, 23, 25, 28, 31, 34, 37,
67 1.1 minoura 41, 45, 50, 55, 60, 66, 73, 80, 88, 97,
68 1.1 minoura 107, 118, 130, 143, 157, 173, 190, 209, 230, 253,
69 1.1 minoura 279, 307, 337, 371, 408, 449, 494, 544, 598, 658,
70 1.10 isaki 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552
71 1.1 minoura };
72 1.1 minoura
73 1.12 kent static const int adpcm_estimstep[16] = {
74 1.1 minoura -1, -1, -1, -1, 2, 4, 6, 8,
75 1.1 minoura -1, -1, -1, -1, 2, 4, 6, 8
76 1.1 minoura };
77 1.1 minoura
78 1.17.8.1 jdolecek static int16_t buzzer; /* sound for debug */
79 1.17.8.1 jdolecek
80 1.12 kent static stream_filter_t *
81 1.17 jmcneill msm6258_factory(struct audio_softc *asc,
82 1.17 jmcneill int (*fetch_to)(struct audio_softc *, stream_fetcher_t *, audio_stream_t *, int))
83 1.1 minoura {
84 1.12 kent struct msm6258_codecvar *this;
85 1.1 minoura
86 1.17 jmcneill this = kmem_alloc(sizeof(struct msm6258_codecvar), KM_SLEEP);
87 1.12 kent this->base.base.fetch_to = fetch_to;
88 1.12 kent this->base.dtor = msm6258_dtor;
89 1.12 kent this->base.set_fetcher = stream_filter_set_fetcher;
90 1.12 kent this->base.set_inputbuffer = stream_filter_set_inputbuffer;
91 1.12 kent return &this->base;
92 1.8 isaki }
93 1.8 isaki
94 1.12 kent static void
95 1.12 kent msm6258_dtor(struct stream_filter *this)
96 1.8 isaki {
97 1.12 kent if (this != NULL)
98 1.17 jmcneill kmem_free(this, sizeof(struct msm6258_codecvar));
99 1.1 minoura }
100 1.1 minoura
101 1.9 isaki /*
102 1.9 isaki * signed 16bit linear PCM -> OkiADPCM
103 1.9 isaki */
104 1.15 perry static inline uint8_t
105 1.12 kent pcm2adpcm_step(struct msm6258_codecvar *mc, int16_t a)
106 1.9 isaki {
107 1.9 isaki int estim = (int)mc->mc_estim;
108 1.9 isaki int df;
109 1.9 isaki short dl, c;
110 1.12 kent uint8_t b;
111 1.12 kent uint8_t s;
112 1.9 isaki
113 1.9 isaki df = a - mc->mc_amp;
114 1.9 isaki dl = adpcm_estim[estim];
115 1.9 isaki c = (df / 16) * 8 / dl;
116 1.9 isaki if (df < 0) {
117 1.9 isaki b = (unsigned char)(-c) / 2;
118 1.9 isaki s = 0x08;
119 1.9 isaki } else {
120 1.9 isaki b = (unsigned char)(c) / 2;
121 1.9 isaki s = 0;
122 1.9 isaki }
123 1.9 isaki if (b > 7)
124 1.9 isaki b = 7;
125 1.9 isaki s |= b;
126 1.9 isaki mc->mc_amp += (short)(adpcm_estimindex[(int)s] * dl);
127 1.9 isaki estim += adpcm_estimstep[b];
128 1.9 isaki if (estim < 0)
129 1.9 isaki estim = 0;
130 1.9 isaki else if (estim > 48)
131 1.9 isaki estim = 48;
132 1.9 isaki
133 1.9 isaki mc->mc_estim = estim;
134 1.9 isaki return s;
135 1.9 isaki }
136 1.9 isaki
137 1.12 kent #define DEFINE_FILTER(name) \
138 1.12 kent static int \
139 1.17 jmcneill name##_fetch_to(struct audio_softc *, stream_fetcher_t *, audio_stream_t *, int); \
140 1.12 kent stream_filter_t * \
141 1.12 kent name(struct audio_softc *sc, const audio_params_t *from, \
142 1.12 kent const audio_params_t *to) \
143 1.12 kent { \
144 1.17 jmcneill return msm6258_factory(sc, name##_fetch_to); \
145 1.12 kent } \
146 1.12 kent static int \
147 1.17 jmcneill name##_fetch_to(struct audio_softc *asc, stream_fetcher_t *self, audio_stream_t *dst, int max_used)
148 1.12 kent
149 1.12 kent DEFINE_FILTER(msm6258_slinear16_to_adpcm)
150 1.12 kent {
151 1.12 kent stream_filter_t *this;
152 1.12 kent struct msm6258_codecvar *mc;
153 1.12 kent uint8_t *d;
154 1.12 kent const uint8_t *s;
155 1.12 kent int m, err, enc_src;
156 1.12 kent
157 1.12 kent this = (stream_filter_t *)self;
158 1.12 kent mc = (struct msm6258_codecvar *)self;
159 1.17 jmcneill if ((err = this->prev->fetch_to(asc, this->prev, this->src, max_used * 4)))
160 1.12 kent return err;
161 1.12 kent m = dst->end - dst->start;
162 1.12 kent m = min(m, max_used);
163 1.12 kent d = dst->inp;
164 1.12 kent s = this->src->outp;
165 1.12 kent enc_src = this->src->param.encoding;
166 1.12 kent if (enc_src == AUDIO_ENCODING_SLINEAR_LE) {
167 1.12 kent while (dst->used < m && this->src->used >= 4) {
168 1.12 kent uint8_t f;
169 1.12 kent int16_t ss;
170 1.17.8.1 jdolecek ss = le16toh(*(const int16_t*)s);
171 1.12 kent f = pcm2adpcm_step(mc, ss);
172 1.12 kent s = audio_stream_add_outp(this->src, s, 2);
173 1.17.8.1 jdolecek ss = le16toh(*(const int16_t*)s);
174 1.12 kent f |= pcm2adpcm_step(mc, ss) << 4;
175 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 2);
176 1.12 kent *d = f;
177 1.12 kent d = audio_stream_add_inp(dst, d, 1);
178 1.12 kent }
179 1.17.8.1 jdolecek } else if (enc_src == AUDIO_ENCODING_SLINEAR_BE) {
180 1.12 kent while (dst->used < m && this->src->used >= 4) {
181 1.12 kent uint8_t f;
182 1.12 kent int16_t ss;
183 1.17.8.1 jdolecek ss = be16toh(*(const int16_t*)s);
184 1.12 kent s = audio_stream_add_outp(this->src, s, 2);
185 1.12 kent f = pcm2adpcm_step(mc, ss);
186 1.17.8.1 jdolecek ss = be16toh(*(const int16_t*)s);
187 1.12 kent s = audio_stream_add_outp(this->src, s, 2);
188 1.12 kent f |= pcm2adpcm_step(mc, ss) << 4;
189 1.12 kent *d = f;
190 1.12 kent d = audio_stream_add_inp(dst, d, 1);
191 1.17.8.1 jdolecek }
192 1.17.8.1 jdolecek } else {
193 1.17.8.1 jdolecek #if defined(DIAGNOSTIC)
194 1.17.8.1 jdolecek panic("msm6258_slinear16_to_adpcm: unsupported enc_src(%d)", enc_src);
195 1.17.8.1 jdolecek #endif
196 1.17.8.1 jdolecek /* dummy run */
197 1.17.8.1 jdolecek while (dst->used < m && this->src->used >= 4) {
198 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 2);
199 1.12 kent s = audio_stream_add_outp(this->src, s, 2);
200 1.17.8.1 jdolecek *d = buzzer++;
201 1.17.8.1 jdolecek d = audio_stream_add_inp(dst, d, 1);
202 1.12 kent }
203 1.12 kent }
204 1.12 kent dst->inp = d;
205 1.12 kent this->src->outp = s;
206 1.12 kent return 0;
207 1.9 isaki }
208 1.1 minoura
209 1.12 kent DEFINE_FILTER(msm6258_linear8_to_adpcm)
210 1.9 isaki {
211 1.12 kent stream_filter_t *this;
212 1.12 kent struct msm6258_codecvar *mc;
213 1.12 kent uint8_t *d;
214 1.12 kent const uint8_t *s;
215 1.12 kent int m, err, enc_src;
216 1.12 kent
217 1.12 kent this = (stream_filter_t *)self;
218 1.12 kent mc = (struct msm6258_codecvar *)self;
219 1.17 jmcneill if ((err = this->prev->fetch_to(asc, this->prev, this->src, max_used * 2)))
220 1.12 kent return err;
221 1.12 kent m = dst->end - dst->start;
222 1.12 kent m = min(m, max_used);
223 1.12 kent d = dst->inp;
224 1.12 kent s = this->src->outp;
225 1.12 kent enc_src = this->src->param.encoding;
226 1.17.8.1 jdolecek if (enc_src == AUDIO_ENCODING_SLINEAR_LE
227 1.17.8.1 jdolecek || enc_src == AUDIO_ENCODING_SLINEAR_BE) {
228 1.12 kent while (dst->used < m && this->src->used >= 4) {
229 1.12 kent uint8_t f;
230 1.12 kent int16_t ss;
231 1.12 kent ss = ((int16_t)s[0]) * 256;
232 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
233 1.12 kent f = pcm2adpcm_step(mc, ss);
234 1.12 kent ss = ((int16_t)s[0]) * 256;
235 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
236 1.12 kent f |= pcm2adpcm_step(mc, ss) << 4;
237 1.12 kent *d = f;
238 1.12 kent d = audio_stream_add_inp(dst, d, 1);
239 1.12 kent }
240 1.17.8.1 jdolecek } else if (enc_src == AUDIO_ENCODING_ULINEAR_LE
241 1.17.8.1 jdolecek || enc_src == AUDIO_ENCODING_ULINEAR_BE) {
242 1.12 kent while (dst->used < m && this->src->used >= 4) {
243 1.12 kent uint8_t f;
244 1.12 kent int16_t ss;
245 1.12 kent ss = ((int16_t)(s[0] ^ 0x80)) * 256;
246 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
247 1.12 kent f = pcm2adpcm_step(mc, ss);
248 1.12 kent ss = ((int16_t)(s[0] ^ 0x80)) * 256;
249 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
250 1.12 kent f |= pcm2adpcm_step(mc, ss) << 4;
251 1.12 kent *d = f;
252 1.12 kent d = audio_stream_add_inp(dst, d, 1);
253 1.17.8.1 jdolecek }
254 1.17.8.1 jdolecek } else {
255 1.17.8.1 jdolecek #if defined(DIAGNOSTIC)
256 1.17.8.1 jdolecek panic("msm6258_linear8_to_adpcm: unsupported enc_src(%d)", enc_src);
257 1.17.8.1 jdolecek #endif
258 1.17.8.1 jdolecek /* dummy run */
259 1.17.8.1 jdolecek while (dst->used < m && this->src->used >= 4) {
260 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
261 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
262 1.17.8.1 jdolecek *d = buzzer++;
263 1.17.8.1 jdolecek d = audio_stream_add_inp(dst, d, 1);
264 1.12 kent }
265 1.1 minoura }
266 1.12 kent dst->inp = d;
267 1.12 kent this->src->outp = s;
268 1.12 kent return 0;
269 1.1 minoura }
270 1.1 minoura
271 1.9 isaki /*
272 1.9 isaki * OkiADPCM -> signed 16bit linear PCM
273 1.9 isaki */
274 1.15 perry static inline int16_t
275 1.12 kent adpcm2pcm_step(struct msm6258_codecvar *mc, uint8_t b)
276 1.1 minoura {
277 1.9 isaki int estim = (int)mc->mc_estim;
278 1.7 isaki
279 1.9 isaki mc->mc_amp += adpcm_estim[estim] * adpcm_estimindex[b];
280 1.9 isaki estim += adpcm_estimstep[b];
281 1.7 isaki
282 1.7 isaki if (estim < 0)
283 1.7 isaki estim = 0;
284 1.9 isaki else if (estim > 48)
285 1.7 isaki estim = 48;
286 1.9 isaki
287 1.9 isaki mc->mc_estim = estim;
288 1.9 isaki
289 1.9 isaki return mc->mc_amp;
290 1.1 minoura }
291 1.1 minoura
292 1.12 kent DEFINE_FILTER(msm6258_adpcm_to_slinear16)
293 1.9 isaki {
294 1.12 kent stream_filter_t *this;
295 1.12 kent struct msm6258_codecvar *mc;
296 1.12 kent uint8_t *d;
297 1.12 kent const uint8_t *s;
298 1.12 kent int m, err, enc_dst;
299 1.12 kent
300 1.12 kent this = (stream_filter_t *)self;
301 1.12 kent mc = (struct msm6258_codecvar *)self;
302 1.12 kent max_used = (max_used + 3) & ~3; /* round up multiple of 4 */
303 1.17 jmcneill if ((err = this->prev->fetch_to(asc, this->prev, this->src, max_used / 4)))
304 1.12 kent return err;
305 1.12 kent m = (dst->end - dst->start) & ~3;
306 1.12 kent m = min(m, max_used);
307 1.12 kent d = dst->inp;
308 1.12 kent s = this->src->outp;
309 1.12 kent enc_dst = dst->param.encoding;
310 1.12 kent if (enc_dst == AUDIO_ENCODING_SLINEAR_LE) {
311 1.12 kent while (dst->used < m && this->src->used >= 1) {
312 1.12 kent uint8_t a;
313 1.12 kent int16_t s1, s2;
314 1.12 kent a = s[0];
315 1.12 kent s1 = adpcm2pcm_step(mc, a & 0x0f);
316 1.12 kent s2 = adpcm2pcm_step(mc, a >> 4);
317 1.17.8.1 jdolecek *(int16_t*)d = htole16(s1);
318 1.12 kent d = audio_stream_add_inp(dst, d, 2);
319 1.17.8.1 jdolecek *(int16_t*)d = htole16(s2);
320 1.12 kent d = audio_stream_add_inp(dst, d, 2);
321 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
322 1.12 kent }
323 1.17.8.1 jdolecek } else if (enc_dst == AUDIO_ENCODING_SLINEAR_BE) {
324 1.12 kent while (dst->used < m && this->src->used >= 1) {
325 1.12 kent uint8_t a;
326 1.12 kent int16_t s1, s2;
327 1.12 kent a = s[0];
328 1.12 kent s1 = adpcm2pcm_step(mc, a & 0x0f);
329 1.12 kent s2 = adpcm2pcm_step(mc, a >> 4);
330 1.17.8.1 jdolecek *(int16_t*)d = htobe16(s1);
331 1.12 kent d = audio_stream_add_inp(dst, d, 2);
332 1.17.8.1 jdolecek *(int16_t*)d = htobe16(s2);
333 1.12 kent d = audio_stream_add_inp(dst, d, 2);
334 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
335 1.17.8.1 jdolecek }
336 1.17.8.1 jdolecek } else {
337 1.17.8.1 jdolecek #if defined(DIAGNOSTIC)
338 1.17.8.1 jdolecek panic("msm6258_adpcm_to_slinear16: unsupported enc_dst(%d)", enc_dst);
339 1.9 isaki #endif
340 1.17.8.1 jdolecek /* dummy run */
341 1.17.8.1 jdolecek while (dst->used < m && this->src->used >= 1) {
342 1.17.8.1 jdolecek *d = buzzer++;
343 1.17.8.1 jdolecek d = audio_stream_add_inp(dst, d, 2);
344 1.17.8.1 jdolecek *d = buzzer++;
345 1.12 kent d = audio_stream_add_inp(dst, d, 2);
346 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
347 1.12 kent }
348 1.12 kent }
349 1.12 kent dst->inp = d;
350 1.12 kent this->src->outp = s;
351 1.12 kent return 0;
352 1.9 isaki }
353 1.9 isaki
354 1.12 kent DEFINE_FILTER(msm6258_adpcm_to_linear8)
355 1.9 isaki {
356 1.12 kent stream_filter_t *this;
357 1.12 kent struct msm6258_codecvar *mc;
358 1.12 kent uint8_t *d;
359 1.12 kent const uint8_t *s;
360 1.12 kent int m, err, enc_dst;
361 1.12 kent
362 1.12 kent this = (stream_filter_t *)self;
363 1.12 kent mc = (struct msm6258_codecvar *)self;
364 1.12 kent max_used = (max_used + 1) & ~1; /* round up multiple of 4 */
365 1.17 jmcneill if ((err = this->prev->fetch_to(asc, this->prev, this->src, max_used / 2)))
366 1.12 kent return err;
367 1.12 kent m = (dst->end - dst->start) & ~1;
368 1.12 kent m = min(m, max_used);
369 1.12 kent d = dst->inp;
370 1.12 kent s = this->src->outp;
371 1.12 kent enc_dst = dst->param.encoding;
372 1.12 kent if (enc_dst == AUDIO_ENCODING_SLINEAR_LE) {
373 1.12 kent while (dst->used < m && this->src->used >= 1) {
374 1.12 kent uint8_t a;
375 1.12 kent int16_t s1, s2;
376 1.12 kent a = s[0];
377 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
378 1.12 kent s1 = adpcm2pcm_step(mc, a & 0x0f);
379 1.12 kent s2 = adpcm2pcm_step(mc, a >> 4);
380 1.17.8.1 jdolecek d[0] = s1 / 256;
381 1.12 kent d = audio_stream_add_inp(dst, d, 1);
382 1.17.8.1 jdolecek d[0] = s2 / 256;
383 1.12 kent d = audio_stream_add_inp(dst, d, 1);
384 1.12 kent }
385 1.17.8.1 jdolecek } else if (enc_dst == AUDIO_ENCODING_ULINEAR_LE) {
386 1.12 kent while (dst->used < m && this->src->used >= 1) {
387 1.12 kent uint8_t a;
388 1.12 kent int16_t s1, s2;
389 1.12 kent a = s[0];
390 1.17.8.1 jdolecek s = audio_stream_add_outp(this->src, s, 1);
391 1.12 kent s1 = adpcm2pcm_step(mc, a & 0x0f);
392 1.12 kent s2 = adpcm2pcm_step(mc, a >> 4);
393 1.17.8.1 jdolecek d[0] = (s1 / 256) ^ 0x80;
394 1.17.8.1 jdolecek d = audio_stream_add_inp(dst, d, 1);
395 1.17.8.1 jdolecek d[0] = (s2 / 256) ^ 0x80;
396 1.17.8.1 jdolecek d = audio_stream_add_inp(dst, d, 1);
397 1.17.8.1 jdolecek }
398 1.17.8.1 jdolecek } else {
399 1.17.8.1 jdolecek #if defined(DIAGNOSTIC)
400 1.17.8.1 jdolecek panic("msm6258_adpcm_to_linear8: unsupported enc_dst(%d)", enc_dst);
401 1.17.8.1 jdolecek #endif
402 1.17.8.1 jdolecek /* dummy run */
403 1.17.8.1 jdolecek while (dst->used < m && this->src->used >= 1) {
404 1.17.8.1 jdolecek *d = buzzer++;
405 1.12 kent d = audio_stream_add_inp(dst, d, 1);
406 1.17.8.1 jdolecek *d = buzzer++;
407 1.12 kent d = audio_stream_add_inp(dst, d, 1);
408 1.12 kent s = audio_stream_add_outp(this->src, s, 1);
409 1.12 kent }
410 1.1 minoura }
411 1.12 kent dst->inp = d;
412 1.12 kent this->src->outp = s;
413 1.12 kent return 0;
414 1.1 minoura }
415