|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: * Copyright (c) 1988 NeXT, Inc.
27: */
28: /*
29: * HISTORY
30: * 01-Mar-93 Mike Minnick (mminnick) at NeXT
31: * Added generic stream format get/set.
32: *
33: * 29-Oct-91 Mike Minnick (mminnick) at NeXT
34: * Added stream owner port to snd_stream_msg_t.
35: *
36: * 23-Aug-90 Gregg Kellogg (gk) at NeXT
37: * Added SND_DSP_PROTO_TXD for 040 TXD interrupt support.
38: *
39: * 23-Aug-90 Gregg Kellogg (gk) at NeXT
40: * Support message passing protocol change so the reply port isn't
41: * used for passing permissions (set_owner, get_stream, dsp_proto,
42: * and get_dsp_cmd_port).
43: *
44: * 21-Aug-90 Julius Smith (jos) at NeXT
45: * Added protocol message type for setting the protocol from the
46: * dsp command queue.
47: *
48: * 10-Dec-88 Gregg Kellogg (gk) at NeXT
49: * Created.
50: *
51: */
52: #ifdef DRIVER_PRIVATE
53:
54: #ifndef _M68K_DEV_SND_MSGS_PRIV_
55: #define _M68K_DEV_SND_MSGS_PRIV_
56:
57: #import <mach/mach_types.h>
58: #import <mach/message.h>
59:
60: /*
61: * Message component type codes on stream port.
62: */
63: typedef struct {
64: msg_type_t typeType;
65: unsigned int type;
66: #define SND_MT_PLAY_DATA 0 // data to be played (with size)
67: #define SND_MT_RECORD_DATA 1 // number of bytes to record
68: #define SND_MT_OPTIONS 2 // high/low water and dma size options
69: #define SND_MT_CONTROL 3 // await/abort/pause/continue
70: #define SND_MT_NDMA 4 // number of dma descs in stream.
71: /* New for 3.1 */
72: #define SND_MT_FORMAT 5 // rate, encoding, chan count
73: } snd_msg_type_t;
74:
75: /*
76: * Interface message formats
77: */
78:
79: /*
80: * Messages sent from the kernel
81: */
82: typedef struct {
83: msg_header_t header;
84: msg_type_t data_tagType;
85: int data_tag;
86: msg_type_long_t dataType;
87: pointer_t recorded_data;
88: } snd_recorded_data_t;
89:
90: typedef struct {
91: msg_header_t header;
92: msg_type_t data_tagType;
93: int data_tag;
94: } snd_taged_reply_t;
95:
96: typedef struct {
97: msg_header_t header;
98: msg_type_t dataType;
99: int nsamples;
100: int timeStamp;
101: } snd_ret_samples_t;
102:
103: typedef struct {
104: msg_header_t header;
105: msg_type_t dataType;
106: unsigned int parms;
107: #define SND_PARM_LOWPASS 0x1
108: #define SND_PARM_SPEAKER 0x2
109: #define SND_PARM_ZEROFILL 0x4
110: } snd_ret_parms_t;
111:
112: typedef struct {
113: msg_header_t header;
114: msg_type_t dataType;
115: unsigned int volume;
116: #define SND_VOLUME_RCHAN_MASK 0xff
117: #define SND_VOLUME_RCHAN_SHIFT 0
118: #define SND_VOLUME_LCHAN_MASK 0xff00
119: #define SND_VOLUME_LCHAN_SHIFT 8
120: } snd_ret_volume_t;
121:
122: /* New for 3.1 */
123: typedef struct {
124: msg_header_t header;
125: msg_type_t Type;
126: unsigned int rate;
127: #define SND_STREAM_FORMAT_RATE_CONTINUOUS (1<<0)
128: #define SND_STREAM_FORMAT_RATE_8000 (1<<1)
129: #define SND_STREAM_FORMAT_RATE_11025 (1<<2)
130: #define SND_STREAM_FORMAT_RATE_16000 (1<<3)
131: #define SND_STREAM_FORMAT_RATE_22050 (1<<4)
132: #define SND_STREAM_FORMAT_RATE_32000 (1<<5)
133: #define SND_STREAM_FORMAT_RATE_44100 (1<<6)
134: #define SND_STREAM_FORMAT_RATE_48000 (1<<7)
135: unsigned int low_rate;
136: unsigned int high_rate;
137: unsigned int encoding;
138: #define SND_STREAM_FORMAT_ENCODING_MULAW_8 (1<<0)
139: #define SND_STREAM_FORMAT_ENCODING_LINEAR_8 (1<<1)
140: #define SND_STREAM_FORMAT_ENCODING_LINEAR_16 (1<<2)
141: unsigned int chan_count;
142: } snd_ret_stream_formats_t;
143:
144: typedef struct {
145: msg_header_t header;
146: msg_type_t dataType;
147: int dsp_regs;
148: } snd_ret_dsp_regs_t;
149:
150: typedef struct {
151: msg_header_t header;
152: msg_type_t dataType;
153: unsigned int ill_msgid; // message id of bad message.
154: unsigned int ill_error; // error returned
155: #define SND_NO_ERROR 100 // non-error ack.
156: #define SND_BAD_PORT 101 // message sent to wrong port
157: #define SND_BAD_MSG 102 // unknown message id
158: #define SND_BAD_PARM 103 // bad parameter list in message
159: #define SND_NO_MEMORY 104 // can't allocate memory (record)
160: #define SND_PORT_BUSY 105 // access req'd to existing excl access port
161: #define SND_NOT_OWNER 106 // must be owner to do this
162: #define SND_BAD_CHAN 107 // dsp channel hasn't been inited
163: #define SND_SEARCH 108 // couldn't find requested resource
164: #define SND_NODATA 109 // can't send data commands to dsp in this mode
165: #define SND_NOPAGER 110 // can't allocate from external pager (record).
166: #define SND_NOTALIGNED 111 // bad data alignment.
167: #define SND_BAD_HOST_PRIV 112 // bad host privilege port passed.
168: #define SND_BAD_PROTO 113 // can't do requested operation given protocol
169: } snd_illegal_msg_t;
170:
171: typedef struct {msg_header_t header;} snd_ret_port_t;
172:
173: typedef struct {
174: msg_header_t header;
175: msg_type_t dataType;
176: unsigned int mask;
177: unsigned int flags;
178: unsigned int value;
179: } snd_dsp_cond_true_t;
180:
181: /*
182: * Messages sent from the user to the device
183: */
184: typedef struct {
185: msg_header_t header;
186: msg_type_t Type;
187: unsigned int stream;
188: msg_type_t ownerType;
189: port_t owner;
190: } snd_get_stream_t;
191:
192: #define SND_GD_CHAN_MASK 0x7f
193: #define SND_GD_CHAN_SHIFT 0
194: #define SND_GD_DEVICE_MASK 0x80
195: #define SND_GD_DEVICE_SHIFT 7
196:
197: #define snd_gd_bitmap(chan, device) \
198: (((chan)<<SND_GD_CHAN_SHIFT) | ((device)<<SND_GD_DEVICE_SHIFT))
199:
200: #define snd_gd_isdevice(bitmap) ((bitmap)&SND_GD_DEVICE_MASK)
201: #define snd_gd_chan(bitmap) ((bitmap)&SND_GD_CHAN_MASK)
202:
203: #define SND_GD_SOUT_44 snd_gd_bitmap(0, TRUE)
204: #define SND_GD_SOUT_22 snd_gd_bitmap(1, TRUE)
205: #define SND_GD_SIN snd_gd_bitmap(2, TRUE)
206: #define SND_GD_DSP_OUT snd_gd_bitmap(DSP_SO_CHAN, FALSE) // sound out from dsp
207: #define SND_GD_DSP_IN snd_gd_bitmap(DSP_SI_CHAN, FALSE) // sound in to dsp
208:
209: typedef struct {
210: msg_header_t header;
211: msg_type_t Type;
212: unsigned int parms;
213: } snd_set_parms_t;
214:
215: typedef struct {
216: msg_header_t header;
217: msg_type_t Type;
218: unsigned int volume;
219: } snd_set_volume_t;
220:
221: typedef struct {
222: msg_header_t header;
223: msg_type_t Type;
224: unsigned int proto;
225: msg_type_t ownerType;
226: port_t owner;
227: } snd_dsp_proto_t;
228:
229: #define SND_DSP_PROTO_DSPERR 0x1 // DSP error messages enabled
230: #define SND_DSP_PROTO_C_DMA 0x2 // complex dma mode
231: #define SND_DSP_PROTO_S_DMA 0x4 // simple dma mode
232: #define SND_DSP_PROTO_LINKOUT 0x8 // link directly to sound out
233: #define SND_DSP_PROTO_LINKIN 0x10 // link directly to sound out
234: #define SND_DSP_PROTO_SOUNDDATA 0x20 // all data to dsp is sound samples
235: #define SND_DSP_PROTO_HIGH 0x40 // 44khz sound out
236: #define SND_DSP_PROTO_HFABORT 0x80 // DSP abort indicated by HF2 & HF3
237: #define SND_DSP_PROTO_DSPMSG 0x100 // DSP messages enabled
238: #define SND_DSP_PROTO_RAW 0x200 // DSP messages enabled
239: #define SND_DSP_PROTO_TXD 0x400 // DSP txd interrupt enable (040 only)
240:
241: typedef msg_header_t snd_get_parms_t;
242: typedef msg_header_t snd_get_volume_t;
243: /* New for 3.1 */
244: typedef msg_header_t snd_get_stream_formats_t;
245:
246: typedef struct {
247: msg_header_t header;
248: msg_type_t ownerType;
249: port_t owner; // owner port
250: } snd_get_dsp_cmd_port_t;
251:
252: typedef struct {
253: msg_header_t header;
254: msg_type_t negType;
255: port_t negotiation; // negotiation port
256: msg_type_t ownerType;
257: port_t owner; // owner port
258: } snd_set_owner_t;
259:
260: typedef struct {
261: msg_header_t header;
262: msg_type_t old_ownerType;
263: port_t old_owner;
264: msg_type_t new_ownerType;
265: port_t new_owner;
266: msg_type_t new_negotiationType;
267: port_t new_negotiation;
268: } snd_reset_owner_t;
269:
270: typedef struct {
271: msg_header_t header;
272: msg_type_t privType;
273: port_t priv;
274: } snd_new_device_t;
275:
276: typedef struct {
277: msg_header_t header;
278: msg_type_long_t dataType;
279: #define DSP_DEF_BUFSIZE 512 // default #words in each buf
280: unsigned int data[DSP_DEF_BUFSIZE];
281: } snd_dsp_msg_t;
282:
283: typedef struct {
284: msg_header_t header;
285: msg_type_long_t dataType;
286: #define DSP_DEF_EBUFSIZE 32 // default #words in each buf
287: unsigned int data[DSP_DEF_EBUFSIZE];
288: } snd_dsp_err_t;
289:
290: /*
291: * Messages sent from the user to a stream port
292: * There's only one message, but it can contain some combination
293: * of several different sub-messages.
294: */
295: typedef struct snd_stream_msg {
296: msg_header_t header;
297: msg_type_t data_tagType;
298: int data_tag; // tag for this request, 0 def
299: msg_type_t ownerType;
300: port_t streamOwner; // stream owner port for 3.0
301: } snd_stream_msg_t;
302:
303: typedef struct {
304: snd_msg_type_t msgtype;
305: msg_type_t optionsType;
306: unsigned int options;
307: #define SND_DM_STARTED_MSG 0x01
308: #define SND_DM_COMPLETED_MSG 0x02
309: #define SND_DM_ABORTED_MSG 0x04
310: #define SND_DM_PAUSED_MSG 0x08
311: #define SND_DM_RESUMED_MSG 0x10
312: #define SND_DM_OVERFLOW_MSG 0x20
313: #define SND_DM_PREEMPT 0x40
314: msg_type_t reg_portType;
315: port_t reg_port; // remote port for region messages
316: msg_type_long_t dataType;
317: pointer_t data;
318: } snd_stream_play_data_t;
319:
320: typedef struct {
321: snd_msg_type_t msgtype;
322: msg_type_t optionsType;
323: unsigned int options;
324: int nbytes;
325: msg_type_t reg_portType;
326: port_t reg_port; // remote port for region messages
327: msg_type_t filenameType; // filename string follows inline
328: } snd_stream_record_data_t;
329:
330: typedef struct {
331: snd_msg_type_t msgtype;
332: msg_type_t controlType;
333: unsigned int snd_control;
334: #define SND_DC_AWAIT 0x1
335: #define SND_DC_ABORT 0x2
336: #define SND_DC_PAUSE 0x4
337: #define SND_DC_RESUME 0x8
338: } snd_stream_control_t;
339:
340: typedef struct {
341: snd_msg_type_t msg_type;
342: msg_type_t optionsType;
343: unsigned int high_water;
344: unsigned int low_water;
345: unsigned int dma_size;
346: } snd_stream_options_t;
347:
348: /* New for 3.1 */
349: typedef struct {
350: snd_msg_type_t msg_type;
351: msg_type_t formatType;
352: unsigned int rate;
353: unsigned int encoding;
354: unsigned int chan_count;
355: } snd_stream_format_t;
356:
357: /*
358: * Number of dma descriptors used in stream.
359: */
360: typedef struct {
361: snd_msg_type_t msg_type;
362: msg_type_t ndmaType;
363: unsigned int ndma;
364: } snd_stream_ndma_t;
365:
366: /*
367: * Nsamples is another message on a stream port.
368: */
369: typedef struct {
370: msg_header_t header;
371: } snd_stream_nsamples_t;
372:
373: /*
374: * Messages sent by user to dsp command port.
375: */
376: typedef struct {
377: msg_header_t header;
378: msg_type_t reg_maskType;
379: unsigned int mask; // mask of flags to inspect
380: unsigned int flags; // set of flags that must be on
381: msg_type_t ret_portType;
382: port_t ret_port; // remote port for ret_msg
383: msg_type_long_t ret_msgType;
384: /*
385: * follows is the body of the (simple) message to send
386: * either to msg_remote_port, or to snd_var.dsp (if PORT_NULL).
387: */
388: msg_header_t ret_msg; // possibly longer than this.
389: } snd_dspcmd_event_t;
390:
391: typedef struct {
392: msg_header_t header;
393: msg_type_t dataType;
394: int addr; // .. of dsp buffer
395: int size; // .. of dsp buffer
396: int skip; // dma skip factor
397: #define DSP_SKIP_0 1
398: #define DSP_SKIP_CONTIG DSP_SKIP_0
399: #define DSP_SKIP_1 2
400: #define DSP_SKIP_2 3
401: #define DSP_SKIP_3 4
402: #define DSP_SKIP_4 5
403: int space; // dsp space of buffer
404: #define DSP_SPACE_X 1
405: #define DSP_SPACE_Y 2
406: #define DSP_SPACE_L 3
407: #define DSP_SPACE_P 4
408: int mode; // mode of dma [1..5]
409: #define DSP_MODE8 1
410: #define DSP_MODE16 2
411: #define DSP_MODE24 3
412: #define DSP_MODE32 4
413: #define DSP_MODE2416 5 /* Pseudo-dma shift 24 to 16 bits */
414: #define SND_MODE_MIN 1 /* Minimum value for mode */
415: #define SND_MODE_MAX 5 /* Maximum value for mode */
416: int chan; // channel for dma
417: #define DSP_USER_REQ_CHAN 0 // for user-requested dma's
418: #define DSP_SO_CHAN 1 // for sound-out dma's.
419: #define DSP_SI_CHAN 2 // for sound-in dma's
420: #define DSP_USER_CHAN 3 // first user chan
421:
422: #define DSP_N_USER_CHAN 16 // 0..15 for user dma.
423: } snd_dspcmd_chandata_t;
424:
425: typedef struct {
426: msg_header_t header;
427: msg_type_t chandataType;
428: int addr; // .. of dsp buffer
429: int size; // .. of dsp buffer
430: int skip; // dma skip factor
431: int space; // dsp space of buffer
432: int mode; // mode of dma [1..5]
433: msg_type_long_t dataType;
434: pointer_t data; // data to output
435: } snd_dspcmd_dma_t;
436:
437: typedef msg_header_t snd_dspcmd_abortdma_t;
438: typedef msg_header_t snd_dspcmd_req_err_t;
439: typedef msg_header_t snd_dspcmd_req_msg_t;
440:
441: /*
442: * Multi-part dspcmd_msg.
443: */
444: /*
445: * Message component type codes on stream port.
446: */
447: typedef struct {
448: msg_type_t typeType;
449: unsigned int type;
450: #define SND_DSP_MT_DATA 1 // 1, 2, or 4 byte data
451: #define SND_DSP_MT_HOST_COMMAND 2 // host command
452: #define SND_DSP_MT_HOST_FLAG 3 // host flag(s) to set
453: #define SND_DSP_MT_RET_MSG 4 // (simple) message to send
454: #define SND_DSP_MT_RESET 5 // hard reset the DSP
455: #define SND_DSP_MT_GET_REGS 6 // return DSP host I/F registers
456: #define SND_DSP_MT_CONDITION 7 // wait for condition (return msg)
457: #define SND_DSP_MT_RDATA 8 // read 1, 2, or 4 byte data
458: #define SND_DSP_MT_PROTO 9 // DSP protocol
459: } snd_dsp_type_t;
460:
461: typedef struct {
462: msg_header_t header;
463: msg_type_t priType;
464: int pri; // Priority of message group
465: #define DSP_MSG_HIGH 0
466: #define DSP_MSG_MED 1
467: #define DSP_MSG_LOW 2
468: boolean_t atomic; // don't preempt this msg with another
469: } snd_dspcmd_msg_t;
470:
471: typedef struct {
472: snd_dsp_type_t msgtype;
473: msg_type_t conditionType;
474: unsigned int mask; // mask of flags to inspect
475: unsigned int flags; // set of flags that must be on
476: msg_type_t reply_portType;
477: port_t reply_port; // were to send device regs to
478: } snd_dsp_condition_t;
479:
480: typedef struct {
481: snd_dsp_type_t msgtype;
482: msg_type_long_t dataType;
483: pointer_t data; // data to send
484: } snd_dsp_data_t;
485:
486: typedef struct {
487: snd_dsp_type_t msgtype;
488: msg_type_t hcType;
489: unsigned int hc; // host command
490: } snd_dsp_host_command_t;
491:
492: typedef struct {
493: snd_dsp_type_t msgtype;
494: msg_type_t protoType; // protocol modification
495: unsigned int proto;
496: } snd_dsp_mt_proto_t;
497:
498: typedef struct {
499: snd_dsp_type_t msgtype;
500: msg_type_t hfType;
501: unsigned int mask; // mask of HF0|HF1
502: unsigned int flags; // flags to set
503: } snd_dsp_host_flag_t;
504:
505: typedef struct {
506: snd_dsp_type_t msgtype;
507: msg_type_t ret_portType;
508: port_t ret_port; // remote port for ret_msg
509: msg_type_long_t ret_msgType;
510: /*
511: * follows is the body of the (simple) message to send
512: * either to msg_remote_port, or to snd_var.dspowner (if PORT_NULL).
513: */
514: msg_header_t ret_msg; // possibly longer than this.
515: } snd_dsp_ret_msg_t;
516:
517: typedef struct {
518: snd_dsp_type_t msgtype;
519: } snd_dsp_reset_t, snd_dsp_get_regs_t;
520:
521: /*
522: * Message Id's
523: */
524: #define SND_MSG_BASE 0
525:
526: /*
527: * User messages on stream port
528: */
529: #define SND_MSG_STREAM_BASE SND_MSG_BASE+0
530: #define SND_MSG_STREAM_MSG SND_MSG_STREAM_BASE+0
531: #define SND_MSG_STREAM_NSAMPLES SND_MSG_STREAM_BASE+1
532:
533: /*
534: * User messages on device port
535: */
536: #define SND_MSG_DEVICE_BASE SND_MSG_BASE+100
537: #define SND_MSG_GET_STREAM SND_MSG_DEVICE_BASE+0
538: #define SND_MSG_SET_PARMS SND_MSG_DEVICE_BASE+1
539: #define SND_MSG_GET_PARMS SND_MSG_DEVICE_BASE+2
540: #define SND_MSG_SET_VOLUME SND_MSG_DEVICE_BASE+3
541: #define SND_MSG_GET_VOLUME SND_MSG_DEVICE_BASE+4
542: #define SND_MSG_SET_DSPOWNER SND_MSG_DEVICE_BASE+5
543: #define SND_MSG_SET_SNDINOWNER SND_MSG_DEVICE_BASE+6
544: #define SND_MSG_SET_SNDOUTOWNER SND_MSG_DEVICE_BASE+7
545: #define SND_MSG_DSP_PROTO SND_MSG_DEVICE_BASE+8
546: #define SND_MSG_GET_DSP_CMD_PORT SND_MSG_DEVICE_BASE+9
547: #define SND_MSG_NEW_DEVICE_PORT SND_MSG_DEVICE_BASE+10
548: #define SND_MSG_RESET_DSPOWNER SND_MSG_DEVICE_BASE+11
549: #define SND_MSG_RESET_SNDINOWNER SND_MSG_DEVICE_BASE+12
550: #define SND_MSG_RESET_SNDOUTOWNER SND_MSG_DEVICE_BASE+13
551: #define SND_MSG_SET_RAMP SND_MSG_DEVICE_BASE+14
552: /*
553: * Set ramp parameter
554: */
555: #define SND_PARM_RAMPUP 0x1 /* Ramp sound up */
556: #define SND_PARM_RAMPDOWN 0x2 /* Ramp sound down */
557:
558: /* New for 3.1 */
559: #define SND_MSG_GET_SNDOUT_FORMATS SND_MSG_DEVICE_BASE+15
560: #define SND_MSG_GET_SNDIN_FORMATS SND_MSG_DEVICE_BASE+16
561:
562: /*
563: * User messages on dsp command port
564: */
565: #define SND_MSG_DSP_BASE SND_MSG_BASE+200
566: #define SND_MSG_DSP_MSG SND_MSG_DSP_BASE+0
567: #define SND_MSG_DSP_EVENT SND_MSG_DSP_BASE+1
568: #define SND_MSG_DSP_CHANDATA SND_MSG_DSP_BASE+2
569: #define SND_MSG_DSP_DMAOUT SND_MSG_DSP_BASE+3
570: #define SND_MSG_DSP_DMAIN SND_MSG_DSP_BASE+4
571: #define SND_MSG_DSP_ABORTDMA SND_MSG_DSP_BASE+5
572: #define SND_MSG_DSP_REQ_MSG SND_MSG_DSP_BASE+6
573: #define SND_MSG_DSP_REQ_ERR SND_MSG_DSP_BASE+7
574:
575: /*
576: * Kernel messages returned.
577: */
578: #define SND_MSG_KERN_BASE SND_MSG_BASE+300
579: #define SND_MSG_RECORDED_DATA SND_MSG_KERN_BASE+0
580: #define SND_MSG_TIMED_OUT SND_MSG_KERN_BASE+1
581: #define SND_MSG_RET_SAMPLES SND_MSG_KERN_BASE+2
582: #define SND_MSG_RET_DEVICE SND_MSG_KERN_BASE+3
583: #define SND_MSG_RET_STREAM SND_MSG_KERN_BASE+4
584: #define SND_MSG_RET_PARMS SND_MSG_KERN_BASE+5
585: #define SND_MSG_RET_VOLUME SND_MSG_KERN_BASE+6
586: #define SND_MSG_OVERFLOW SND_MSG_KERN_BASE+7
587: #define SND_MSG_STARTED SND_MSG_KERN_BASE+9
588: #define SND_MSG_COMPLETED SND_MSG_KERN_BASE+10
589: #define SND_MSG_ABORTED SND_MSG_KERN_BASE+11
590: #define SND_MSG_PAUSED SND_MSG_KERN_BASE+12
591: #define SND_MSG_RESUMED SND_MSG_KERN_BASE+13
592: #define SND_MSG_ILLEGAL_MSG SND_MSG_KERN_BASE+14
593: #define SND_MSG_RET_DSP_ERR SND_MSG_KERN_BASE+15
594: #define SND_MSG_RET_DSP_MSG SND_MSG_KERN_BASE+16
595: #define SND_MSG_RET_CMD SND_MSG_KERN_BASE+17
596: #define SND_MSG_DSP_REGS SND_MSG_KERN_BASE+18
597: #define SND_MSG_DSP_COND_TRUE SND_MSG_KERN_BASE+19
598: /* New for 3.1 */
599: #define SND_MSG_RET_STREAM_FORMATS SND_MSG_KERN_BASE+20
600:
601: /*
602: * Ioctl for retrieving device port.
603: */
604: #ifdef _IO
605: #define SOUNDIOCDEVPORT _IO('A', 8)
606: #endif /* _IO */
607:
608: /*
609: * Routine prototypes
610: */
611: #if KERNEL
612: #ifdef m68k
613: kern_return_t snd_reply_recorded_data (
614: port_t remote_port, // who to reply to
615: int data_tag, // tag from region
616: pointer_t data, // recorded data
617: int nbytes, // number of bytes of data to send
618: int in_line); // "Send data inline" flag.
619: kern_return_t snd_reply_timed_out (
620: port_t remote_port, // who to send it to.
621: int data_tag); // tag from region
622: kern_return_t snd_reply_ret_samples (
623: port_t remote_port, // who to send it to.
624: int nsamples, // number of bytes of data to record
625: int timeStamp);
626: kern_return_t snd_reply_ret_device (
627: port_name_t remote_port, // who to send it to.
628: port_name_t device_port); // returned port.
629: kern_return_t snd_reply_ret_stream (
630: port_t remote_port, // who to send it to.
631: port_t stream_port); // returned port.
632: kern_return_t snd_reply_ret_parms (
633: port_t remote_port, // who to send it to.
634: unsigned int parms);
635: kern_return_t snd_reply_ret_volume (
636: port_t remote_port, // who to send it to.
637: unsigned int volume);
638: /* New for 3.1 */
639: kern_return_t snd_reply_ret_formats (
640: port_name_t remote_port, // who to send it to.
641: u_int rates,
642: u_int low_rate,
643: u_int high_rate,
644: u_int encodings,
645: u_int chan_count);
646: kern_return_t snd_reply_overflow (
647: port_t remote_port, // who to send it to.
648: int data_tag); // from region
649: kern_return_t snd_reply_started (
650: port_t remote_port, // who to send it to.
651: int data_tag); // from region
652: kern_return_t snd_reply_completed (
653: port_t remote_port, // who to send it to.
654: int data_tag); // from region
655: kern_return_t snd_reply_aborted (
656: port_t remote_port, // who to send it to.
657: int data_tag); // from region
658: kern_return_t snd_reply_paused (
659: port_t remote_port, // who to send it to.
660: int data_tag); // from region
661: kern_return_t snd_reply_resumed (
662: port_t remote_port, // who to send it to.
663: int data_tag); // from region
664: kern_return_t snd_reply_illegal_msg (
665: port_t local_port, // returned port of interest
666: port_t remote_port, // who to send it to.
667: int msg_id, // message id with illegal syntax
668: int error); // error code
669: kern_return_t snd_reply_dsp_err (
670: port_t remote_port); // who to send it to.
671: kern_return_t snd_reply_dsp_msg (
672: port_t remote_port); // who to send it to.
673: kern_return_t snd_reply_dsp_cmd_port(
674: port_t cmd_port, // port to return.
675: port_t remote_port); // where to return it
676: kern_return_t snd_reply_dsp_regs (
677: int regs); // DSP host I/F registers (not recieve)
678: kern_return_t snd_reply_dsp_cond_true ( // reply indicating condition true
679: vm_address_t ret_cond); // reply_port, status and conditions
680: #endif /* m68k */
681: #endif /* KERNEL */
682:
683: #endif /* _M68K_DEV_SND_MSGS_PRIV_ */
684:
685: #endif /* DRIVER_PRIVATE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.