1 /* 2 * 3 * mwavepub.h -- PUBLIC declarations for the mwave driver 4 * and applications using it 5 * 6 * 7 * Written By: Mike Sullivan IBM Corporation 8 * 9 * Copyright (C) 1999 IBM Corporation 10 * 11 * This program is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * NO WARRANTY 22 * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR 23 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT 24 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 25 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is 26 * solely responsible for determining the appropriateness of using and 27 * distributing the Program and assumes all risks associated with its 28 * exercise of rights under this Agreement, including but not limited to 29 * the risks and costs of program errors, damage to or loss of data, 30 * programs or equipment, and unavailability or interruption of operations. 31 * 32 * DISCLAIMER OF LIABILITY 33 * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY 34 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 35 * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND 36 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 37 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 38 * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED 39 * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES 40 * 41 * You should have received a copy of the GNU General Public License 42 * along with this program; if not, write to the Free Software 43 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 44 * 45 * 46 * 10/23/2000 - Alpha Release 47 * First release to the public 48 */ 49 50 #ifndef _LINUX_MWAVEPUB_H 51 #define _LINUX_MWAVEPUB_H 52 53 #ifndef MWAVEM_APP_DIST 54 #include <linux/miscdevice.h> 55 #endif 56 57 #ifdef MWAVEM_APP_DIST 58 #define MWAVE_MINOR 219 59 #endif 60 61 typedef struct _MW_ABILITIES { 62 unsigned long instr_per_sec; 63 unsigned long data_size; 64 unsigned long inst_size; 65 unsigned long bus_dma_bw; 66 unsigned short uart_enable; 67 short component_count; 68 unsigned long component_list[7]; 69 char mwave_os_name[16]; 70 char bios_task_name[16]; 71 } MW_ABILITIES, *pMW_ABILITIES; 72 73 74 typedef struct _MW_READWRITE { 75 unsigned short usDspAddress; /* The dsp address */ 76 unsigned long ulDataLength; /* The size in bytes of the data or user buffer */ 77 void *pBuf; /* Input:variable sized buffer */ 78 } MW_READWRITE, *pMW_READWRITE; 79 80 #define IOCTL_MW_RESET _IO(MWAVE_MINOR,1) 81 #define IOCTL_MW_RUN _IO(MWAVE_MINOR,2) 82 #define IOCTL_MW_DSP_ABILITIES _IOR(MWAVE_MINOR,3,MW_ABILITIES) 83 #define IOCTL_MW_READ_DATA _IOR(MWAVE_MINOR,4,MW_READWRITE) 84 #define IOCTL_MW_READCLEAR_DATA _IOR(MWAVE_MINOR,5,MW_READWRITE) 85 #define IOCTL_MW_READ_INST _IOR(MWAVE_MINOR,6,MW_READWRITE) 86 #define IOCTL_MW_WRITE_DATA _IOW(MWAVE_MINOR,7,MW_READWRITE) 87 #define IOCTL_MW_WRITE_INST _IOW(MWAVE_MINOR,8,MW_READWRITE) 88 #define IOCTL_MW_REGISTER_IPC _IOW(MWAVE_MINOR,9,int) 89 #define IOCTL_MW_UNREGISTER_IPC _IOW(MWAVE_MINOR,10,int) 90 #define IOCTL_MW_GET_IPC _IOW(MWAVE_MINOR,11,int) 91 #define IOCTL_MW_TRACE _IOR(MWAVE_MINOR,12,MW_READWRITE) 92 93 94 #endif 95