1*1da177e4SLinus Torvalds /* 2*1da177e4SLinus Torvalds * 3*1da177e4SLinus Torvalds * Copyright (c) 2003 by Karsten Wiese <annabellesgarden@yahoo.de> 4*1da177e4SLinus Torvalds * 5*1da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 6*1da177e4SLinus Torvalds * it under the terms of the GNU General Public License as published by 7*1da177e4SLinus Torvalds * the Free Software Foundation; either version 2 of the License, or 8*1da177e4SLinus Torvalds * (at your option) any later version. 9*1da177e4SLinus Torvalds * 10*1da177e4SLinus Torvalds * This program is distributed in the hope that it will be useful, 11*1da177e4SLinus Torvalds * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*1da177e4SLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*1da177e4SLinus Torvalds * GNU General Public License for more details. 14*1da177e4SLinus Torvalds * 15*1da177e4SLinus Torvalds * You should have received a copy of the GNU General Public License 16*1da177e4SLinus Torvalds * along with this program; if not, write to the Free Software 17*1da177e4SLinus Torvalds * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18*1da177e4SLinus Torvalds */ 19*1da177e4SLinus Torvalds 20*1da177e4SLinus Torvalds enum E_In84{ 21*1da177e4SLinus Torvalds eFader0 = 0, 22*1da177e4SLinus Torvalds eFader1, 23*1da177e4SLinus Torvalds eFader2, 24*1da177e4SLinus Torvalds eFader3, 25*1da177e4SLinus Torvalds eFader4, 26*1da177e4SLinus Torvalds eFader5, 27*1da177e4SLinus Torvalds eFader6, 28*1da177e4SLinus Torvalds eFader7, 29*1da177e4SLinus Torvalds eFaderM, 30*1da177e4SLinus Torvalds eTransport, 31*1da177e4SLinus Torvalds eModifier = 10, 32*1da177e4SLinus Torvalds eFilterSelect, 33*1da177e4SLinus Torvalds eSelect, 34*1da177e4SLinus Torvalds eMute, 35*1da177e4SLinus Torvalds 36*1da177e4SLinus Torvalds eSwitch = 15, 37*1da177e4SLinus Torvalds eWheelGain, 38*1da177e4SLinus Torvalds eWheelFreq, 39*1da177e4SLinus Torvalds eWheelQ, 40*1da177e4SLinus Torvalds eWheelPan, 41*1da177e4SLinus Torvalds eWheel = 20 42*1da177e4SLinus Torvalds }; 43*1da177e4SLinus Torvalds 44*1da177e4SLinus Torvalds #define T_RECORD 1 45*1da177e4SLinus Torvalds #define T_PLAY 2 46*1da177e4SLinus Torvalds #define T_STOP 4 47*1da177e4SLinus Torvalds #define T_F_FWD 8 48*1da177e4SLinus Torvalds #define T_REW 0x10 49*1da177e4SLinus Torvalds #define T_SOLO 0x20 50*1da177e4SLinus Torvalds #define T_REC 0x40 51*1da177e4SLinus Torvalds #define T_NULL 0x80 52*1da177e4SLinus Torvalds 53*1da177e4SLinus Torvalds 54*1da177e4SLinus Torvalds struct us428_ctls{ 55*1da177e4SLinus Torvalds unsigned char Fader[9]; 56*1da177e4SLinus Torvalds unsigned char Transport; 57*1da177e4SLinus Torvalds unsigned char Modifier; 58*1da177e4SLinus Torvalds unsigned char FilterSelect; 59*1da177e4SLinus Torvalds unsigned char Select; 60*1da177e4SLinus Torvalds unsigned char Mute; 61*1da177e4SLinus Torvalds unsigned char UNKNOWN; 62*1da177e4SLinus Torvalds unsigned char Switch; 63*1da177e4SLinus Torvalds unsigned char Wheel[5]; 64*1da177e4SLinus Torvalds }; 65*1da177e4SLinus Torvalds 66*1da177e4SLinus Torvalds typedef struct us428_ctls us428_ctls_t; 67*1da177e4SLinus Torvalds 68*1da177e4SLinus Torvalds typedef struct us428_setByte{ 69*1da177e4SLinus Torvalds unsigned char Offset, 70*1da177e4SLinus Torvalds Value; 71*1da177e4SLinus Torvalds }us428_setByte_t; 72*1da177e4SLinus Torvalds 73*1da177e4SLinus Torvalds enum { 74*1da177e4SLinus Torvalds eLT_Volume = 0, 75*1da177e4SLinus Torvalds eLT_Light 76*1da177e4SLinus Torvalds }; 77*1da177e4SLinus Torvalds 78*1da177e4SLinus Torvalds typedef struct usX2Y_volume { 79*1da177e4SLinus Torvalds unsigned char Channel, 80*1da177e4SLinus Torvalds LH, 81*1da177e4SLinus Torvalds LL, 82*1da177e4SLinus Torvalds RH, 83*1da177e4SLinus Torvalds RL; 84*1da177e4SLinus Torvalds } usX2Y_volume_t; 85*1da177e4SLinus Torvalds 86*1da177e4SLinus Torvalds struct us428_lights{ 87*1da177e4SLinus Torvalds us428_setByte_t Light[7]; 88*1da177e4SLinus Torvalds }; 89*1da177e4SLinus Torvalds typedef struct us428_lights us428_lights_t; 90*1da177e4SLinus Torvalds 91*1da177e4SLinus Torvalds typedef struct { 92*1da177e4SLinus Torvalds char type; 93*1da177e4SLinus Torvalds union { 94*1da177e4SLinus Torvalds usX2Y_volume_t vol; 95*1da177e4SLinus Torvalds us428_lights_t lights; 96*1da177e4SLinus Torvalds } val; 97*1da177e4SLinus Torvalds } us428_p4out_t; 98*1da177e4SLinus Torvalds 99*1da177e4SLinus Torvalds #define N_us428_ctl_BUFS 16 100*1da177e4SLinus Torvalds #define N_us428_p4out_BUFS 16 101*1da177e4SLinus Torvalds struct us428ctls_sharedmem{ 102*1da177e4SLinus Torvalds us428_ctls_t CtlSnapShot[N_us428_ctl_BUFS]; 103*1da177e4SLinus Torvalds int CtlSnapShotDiffersAt[N_us428_ctl_BUFS]; 104*1da177e4SLinus Torvalds int CtlSnapShotLast, CtlSnapShotRed; 105*1da177e4SLinus Torvalds us428_p4out_t p4out[N_us428_p4out_BUFS]; 106*1da177e4SLinus Torvalds int p4outLast, p4outSent; 107*1da177e4SLinus Torvalds }; 108*1da177e4SLinus Torvalds typedef struct us428ctls_sharedmem us428ctls_sharedmem_t; 109