00001 #ifndef __MK__DSPMach_H___
00002 #define __MK__DSPMach_H___
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #import <mach/mach.h>
00015
00016 #if !m68k && (defined(NeXT) || (defined(__APPLE__) && defined(__MACH__)) || defined(WIN32))
00017 #import "dspdriverAccess.h"
00018
00019 extern msg_header_t *_DSP_data_request_msg (
00020 msg_header_t *msg,
00021 mach_port_t stream_port,
00022 mach_port_t reply_port,
00023 int data_tag,
00024 int chan,
00025 int msgID);
00026
00027 extern msg_header_t *_DSP_simple_request_msg (
00028 mach_port_t cmd_port,
00029 mach_port_t reply_port,
00030 int messageType);
00031
00032 extern void _DSP_free_simple_request_msg(msg_header_t **msg);
00033
00034 #endif
00035
00036 #import "_DSPMachAccessMacros.h"
00037
00038
00039
00040 #import "_MachMessages.h"
00041
00042
00043
00044
00045
00046 msg_header_t *_DSP_stream_msg (
00047 msg_header_t *msg,
00048 mach_port_t stream_port,
00049 mach_port_t reply_port,
00050 int data_tag);
00051 msg_header_t *_DSP_stream_play_data (
00052 msg_header_t *msg,
00053 pointer_t data,
00054 boolean_t started_msg,
00055 boolean_t completed_msg,
00056 boolean_t aborted_msg,
00057 boolean_t paused_msg,
00058 boolean_t resumed_msg,
00059 boolean_t underflow_msg,
00060 boolean_t preempt,
00061 boolean_t deallocate,
00062 mach_port_t reg_port,
00063 int nbytes);
00064 msg_header_t *_DSP_stream_record_data (
00065 msg_header_t *msg,
00066 boolean_t started_msg,
00067 boolean_t completed_msg,
00068 boolean_t aborted_msg,
00069 boolean_t paused_msg,
00070 boolean_t resumed_msg,
00071 boolean_t overflow_msg,
00072 int nbytes,
00073 mach_port_t reg_port,
00074 char *filename);
00075 msg_header_t *_DSP_stream_control (
00076 msg_header_t *msg,
00077 int control);
00078 kern_return_t _DSP_stream_nsamples (
00079 mach_port_t stream_port,
00080 int *nsamples);
00081 kern_return_t _DSP_get_stream (
00082 mach_port_t device_port,
00083 mach_port_t owner_port,
00084 mach_port_t *stream_port,
00085 u_int stream);
00086 kern_return_t _DSP_set_dsp_owner_port (
00087 mach_port_t device_port,
00088 mach_port_t owner_port,
00089 mach_port_t *neg_port);
00090 kern_return_t _DSP_set_sndin_owner_port (
00091 mach_port_t device_port,
00092 mach_port_t owner_port,
00093 mach_port_t *neg_port);
00094 kern_return_t _DSP_set_sndout_owner_port (
00095 mach_port_t device_port,
00096 mach_port_t owner_port,
00097 mach_port_t *neg_port);
00098 kern_return_t _DSP_get_dsp_cmd_port (
00099 mach_port_t device_port,
00100 mach_port_t owner_port,
00101 mach_port_t *cmd_port);
00102 kern_return_t _DSP_dsp_proto (
00103 mach_port_t device_port,
00104 mach_port_t owner_port,
00105 int proto);
00106 kern_return_t _DSP_dspcmd_event (
00107 mach_port_t cmd_port,
00108 u_int mask,
00109 u_int flags,
00110 msg_header_t *msg);
00111 kern_return_t _DSP_dspcmd_chandata (
00112 mach_port_t cmd_port,
00113 int addr,
00114 int size,
00115 int skip,
00116 int space,
00117 int mode,
00118 int chan);
00119 kern_return_t _DSP_dspcmd_dmaout (
00120 mach_port_t cmd_port,
00121 int addr,
00122 int size,
00123 int skip,
00124 int space,
00125 int mode,
00126 pointer_t data);
00127 kern_return_t _DSP_dspcmd_dmain (
00128 mach_port_t cmd_port,
00129 int addr,
00130 int size,
00131 int skip,
00132 int space,
00133 int mode,
00134 pointer_t *data);
00135 kern_return_t _DSP_dspcmd_abortdma (
00136 mach_port_t cmd_port,
00137 int *dma_state,
00138 vm_address_t *start,
00139 vm_address_t *stop,
00140 vm_address_t *next);
00141 kern_return_t _DSP_dspcmd_req_msg (
00142 mach_port_t cmd_port,
00143 mach_port_t reply_port);
00144 kern_return_t _DSP_dspcmd_req_err (
00145 mach_port_t cmd_port,
00146 mach_port_t reply_port);
00147 void _DSP_dspcmd_msg_data (
00148 snd_dsp_msg_t *msg,
00149 int **buf_addr,
00150 int *buf_size);
00151
00152 msg_header_t *_DSP_dspcmd_msg (
00153 mach_port_t cmd_port,
00154 mach_port_t reply_port,
00155 int priority,
00156 int atomic);
00157
00158 void _DSP_free_dspcmd_msg(msg_header_t **msg);
00159
00160 msg_header_t *_DSP_dspcmd_msg_reset (
00161 msg_header_t *msg,
00162 mach_port_t cmd_port,
00163 mach_port_t reply_port,
00164 int priority,
00165 int atomic);
00166
00167 msg_header_t *_DSP_dsprcv_msg (
00168 mach_port_t cmd_port,
00169 mach_port_t reply_port);
00170
00171 msg_header_t *_DSP_dsprcv_msg_reset (
00172 msg_header_t *msg,
00173 mach_port_t cmd_port,
00174 mach_port_t reply_port);
00175
00176 msg_header_t *_DSP_dspreply_msg (
00177 mach_port_t reply_port);
00178
00179 msg_header_t *_DSP_dspreply_msg_reset (
00180 msg_header_t *msg,
00181 mach_port_t reply_port);
00182
00183 msg_header_t *_DSP_dsp_condition (
00184 msg_header_t *msg,
00185 u_int mask,
00186 u_int flags);
00187 msg_header_t *_DSP_dsp_data (
00188 msg_header_t *msg,
00189 pointer_t data,
00190 int eltsize,
00191 int nelts);
00192 msg_header_t *_DSP_dsp_host_command (
00193 msg_header_t *msg,
00194 u_int host_command);
00195 msg_header_t *_DSP_dsp_host_flag (
00196 msg_header_t *msg,
00197 u_int mask,
00198 u_int flags);
00199 msg_header_t *_DSP_dsp_ret_msg (
00200 msg_header_t *msg,
00201 msg_header_t *ret_msg);
00202 msg_header_t *_DSP_dspreset (
00203 msg_header_t *msg);
00204 msg_header_t *_DSP_dspregs (
00205 msg_header_t *msg);
00206 msg_header_t *_DSP_stream_options (
00207 msg_header_t *msg,
00208 int high_water,
00209 int low_water,
00210 int dma_size);
00211 msg_header_t *_DSP_dsp_protocol (
00212 msg_header_t *msg,
00213 mach_port_t device_port,
00214 mach_port_t owner_port,
00215 int protocol);
00216 msg_header_t *_DSP_dsp_read_data(
00217 msg_header_t *msg,
00218 int eltsize,
00219 int nelts);
00220
00221 #endif