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