11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * 31da177e4SLinus Torvalds * Copyright (c) 2003 by Karsten Wiese <annabellesgarden@yahoo.de> 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 61da177e4SLinus Torvalds * it under the terms of the GNU General Public License as published by 71da177e4SLinus Torvalds * the Free Software Foundation; either version 2 of the License, or 81da177e4SLinus Torvalds * (at your option) any later version. 91da177e4SLinus Torvalds * 101da177e4SLinus Torvalds * This program is distributed in the hope that it will be useful, 111da177e4SLinus Torvalds * but WITHOUT ANY WARRANTY; without even the implied warranty of 121da177e4SLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 131da177e4SLinus Torvalds * GNU General Public License for more details. 141da177e4SLinus Torvalds * 151da177e4SLinus Torvalds * You should have received a copy of the GNU General Public License 161da177e4SLinus Torvalds * along with this program; if not, write to the Free Software 171da177e4SLinus Torvalds * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 181da177e4SLinus Torvalds */ 191da177e4SLinus Torvalds 201da177e4SLinus Torvalds enum E_In84{ 211da177e4SLinus Torvalds eFader0 = 0, 221da177e4SLinus Torvalds eFader1, 231da177e4SLinus Torvalds eFader2, 241da177e4SLinus Torvalds eFader3, 251da177e4SLinus Torvalds eFader4, 261da177e4SLinus Torvalds eFader5, 271da177e4SLinus Torvalds eFader6, 281da177e4SLinus Torvalds eFader7, 291da177e4SLinus Torvalds eFaderM, 301da177e4SLinus Torvalds eTransport, 311da177e4SLinus Torvalds eModifier = 10, 321da177e4SLinus Torvalds eFilterSelect, 331da177e4SLinus Torvalds eSelect, 341da177e4SLinus Torvalds eMute, 351da177e4SLinus Torvalds 361da177e4SLinus Torvalds eSwitch = 15, 371da177e4SLinus Torvalds eWheelGain, 381da177e4SLinus Torvalds eWheelFreq, 391da177e4SLinus Torvalds eWheelQ, 401da177e4SLinus Torvalds eWheelPan, 411da177e4SLinus Torvalds eWheel = 20 421da177e4SLinus Torvalds }; 431da177e4SLinus Torvalds 441da177e4SLinus Torvalds #define T_RECORD 1 451da177e4SLinus Torvalds #define T_PLAY 2 461da177e4SLinus Torvalds #define T_STOP 4 471da177e4SLinus Torvalds #define T_F_FWD 8 481da177e4SLinus Torvalds #define T_REW 0x10 491da177e4SLinus Torvalds #define T_SOLO 0x20 501da177e4SLinus Torvalds #define T_REC 0x40 511da177e4SLinus Torvalds #define T_NULL 0x80 521da177e4SLinus Torvalds 531da177e4SLinus Torvalds 541da177e4SLinus Torvalds struct us428_ctls { 551da177e4SLinus Torvalds unsigned char Fader[9]; 561da177e4SLinus Torvalds unsigned char Transport; 571da177e4SLinus Torvalds unsigned char Modifier; 581da177e4SLinus Torvalds unsigned char FilterSelect; 591da177e4SLinus Torvalds unsigned char Select; 601da177e4SLinus Torvalds unsigned char Mute; 611da177e4SLinus Torvalds unsigned char UNKNOWN; 621da177e4SLinus Torvalds unsigned char Switch; 631da177e4SLinus Torvalds unsigned char Wheel[5]; 641da177e4SLinus Torvalds }; 651da177e4SLinus Torvalds 66*bbe85bbdSTakashi Iwai struct us428_setByte { 671da177e4SLinus Torvalds unsigned char Offset, 681da177e4SLinus Torvalds Value; 69*bbe85bbdSTakashi Iwai }; 701da177e4SLinus Torvalds 711da177e4SLinus Torvalds enum { 721da177e4SLinus Torvalds eLT_Volume = 0, 731da177e4SLinus Torvalds eLT_Light 741da177e4SLinus Torvalds }; 751da177e4SLinus Torvalds 76*bbe85bbdSTakashi Iwai struct usX2Y_volume { 771da177e4SLinus Torvalds unsigned char Channel, 781da177e4SLinus Torvalds LH, 791da177e4SLinus Torvalds LL, 801da177e4SLinus Torvalds RH, 811da177e4SLinus Torvalds RL; 82*bbe85bbdSTakashi Iwai }; 831da177e4SLinus Torvalds 841da177e4SLinus Torvalds struct us428_lights { 85*bbe85bbdSTakashi Iwai struct us428_setByte Light[7]; 861da177e4SLinus Torvalds }; 871da177e4SLinus Torvalds 88*bbe85bbdSTakashi Iwai struct us428_p4out { 891da177e4SLinus Torvalds char type; 901da177e4SLinus Torvalds union { 91*bbe85bbdSTakashi Iwai struct usX2Y_volume vol; 92*bbe85bbdSTakashi Iwai struct us428_lights lights; 931da177e4SLinus Torvalds } val; 94*bbe85bbdSTakashi Iwai }; 951da177e4SLinus Torvalds 961da177e4SLinus Torvalds #define N_us428_ctl_BUFS 16 971da177e4SLinus Torvalds #define N_us428_p4out_BUFS 16 981da177e4SLinus Torvalds struct us428ctls_sharedmem{ 99*bbe85bbdSTakashi Iwai struct us428_ctls CtlSnapShot[N_us428_ctl_BUFS]; 1001da177e4SLinus Torvalds int CtlSnapShotDiffersAt[N_us428_ctl_BUFS]; 1011da177e4SLinus Torvalds int CtlSnapShotLast, CtlSnapShotRed; 102*bbe85bbdSTakashi Iwai struct us428_p4out p4out[N_us428_p4out_BUFS]; 1031da177e4SLinus Torvalds int p4outLast, p4outSent; 1041da177e4SLinus Torvalds }; 105