11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * 41da177e4SLinus Torvalds * Copyright (c) 2003 by Karsten Wiese <annabellesgarden@yahoo.de> 51da177e4SLinus Torvalds */ 61da177e4SLinus Torvalds 7bae3ce49STakashi Iwai enum E_IN84 { 8bae3ce49STakashi Iwai E_FADER_0 = 0, 9bae3ce49STakashi Iwai E_FADER_1, 10bae3ce49STakashi Iwai E_FADER_2, 11bae3ce49STakashi Iwai E_FADER_3, 12bae3ce49STakashi Iwai E_FADER_4, 13bae3ce49STakashi Iwai E_FADER_5, 14bae3ce49STakashi Iwai E_FADER_6, 15bae3ce49STakashi Iwai E_FADER_7, 16bae3ce49STakashi Iwai E_FADER_M, 17bae3ce49STakashi Iwai E_TRANSPORT, 18bae3ce49STakashi Iwai E_MODIFIER = 10, 19bae3ce49STakashi Iwai E_FILTER_SELECT, 20bae3ce49STakashi Iwai E_SELECT, 21bae3ce49STakashi Iwai E_MUTE, 221da177e4SLinus Torvalds 23bae3ce49STakashi Iwai E_SWITCH = 15, 24bae3ce49STakashi Iwai E_WHEEL_GAIN, 25bae3ce49STakashi Iwai E_WHEEL_FREQ, 26bae3ce49STakashi Iwai E_WHEEL_Q, 27bae3ce49STakashi Iwai E_WHEEL_PAN, 28bae3ce49STakashi Iwai E_WHEEL = 20 291da177e4SLinus Torvalds }; 301da177e4SLinus Torvalds 311da177e4SLinus Torvalds #define T_RECORD 1 321da177e4SLinus Torvalds #define T_PLAY 2 331da177e4SLinus Torvalds #define T_STOP 4 341da177e4SLinus Torvalds #define T_F_FWD 8 351da177e4SLinus Torvalds #define T_REW 0x10 361da177e4SLinus Torvalds #define T_SOLO 0x20 371da177e4SLinus Torvalds #define T_REC 0x40 381da177e4SLinus Torvalds #define T_NULL 0x80 391da177e4SLinus Torvalds 401da177e4SLinus Torvalds 411da177e4SLinus Torvalds struct us428_ctls { 42bae3ce49STakashi Iwai unsigned char fader[9]; 43bae3ce49STakashi Iwai unsigned char transport; 44bae3ce49STakashi Iwai unsigned char modifier; 45bae3ce49STakashi Iwai unsigned char filters_elect; 46bae3ce49STakashi Iwai unsigned char select; 47bae3ce49STakashi Iwai unsigned char mute; 48bae3ce49STakashi Iwai unsigned char unknown; 49bae3ce49STakashi Iwai unsigned char wswitch; 50bae3ce49STakashi Iwai unsigned char wheel[5]; 511da177e4SLinus Torvalds }; 521da177e4SLinus Torvalds 53bae3ce49STakashi Iwai struct us428_set_byte { 54bae3ce49STakashi Iwai unsigned char offset, 55bae3ce49STakashi Iwai value; 56bbe85bbdSTakashi Iwai }; 571da177e4SLinus Torvalds 581da177e4SLinus Torvalds enum { 59bae3ce49STakashi Iwai ELT_VOLUME = 0, 60bae3ce49STakashi Iwai ELT_LIGHT 611da177e4SLinus Torvalds }; 621da177e4SLinus Torvalds 63bae3ce49STakashi Iwai struct usx2y_volume { 64bae3ce49STakashi Iwai unsigned char channel, 65bae3ce49STakashi Iwai lh, 66bae3ce49STakashi Iwai ll, 67bae3ce49STakashi Iwai rh, 68bae3ce49STakashi Iwai rl; 69bbe85bbdSTakashi Iwai }; 701da177e4SLinus Torvalds 711da177e4SLinus Torvalds struct us428_lights { 72bae3ce49STakashi Iwai struct us428_set_byte light[7]; 731da177e4SLinus Torvalds }; 741da177e4SLinus Torvalds 75bbe85bbdSTakashi Iwai struct us428_p4out { 761da177e4SLinus Torvalds char type; 771da177e4SLinus Torvalds union { 78bae3ce49STakashi Iwai struct usx2y_volume vol; 79bbe85bbdSTakashi Iwai struct us428_lights lights; 801da177e4SLinus Torvalds } val; 81bbe85bbdSTakashi Iwai }; 821da177e4SLinus Torvalds 83bae3ce49STakashi Iwai #define N_US428_CTL_BUFS 16 84bae3ce49STakashi Iwai #define N_US428_P4OUT_BUFS 16 851da177e4SLinus Torvalds struct us428ctls_sharedmem { 86bae3ce49STakashi Iwai struct us428_ctls ctl_snapshot[N_US428_CTL_BUFS]; 87bae3ce49STakashi Iwai int ctl_snapshot_differs_at[N_US428_CTL_BUFS]; 88bae3ce49STakashi Iwai int ctl_snapshot_last, ctl_snapshot_red; 89bae3ce49STakashi Iwai struct us428_p4out p4out[N_US428_P4OUT_BUFS]; 90bae3ce49STakashi Iwai int p4out_last, p4out_sent; 911da177e4SLinus Torvalds }; 92*4e268db7STakashi Iwai 93*4e268db7STakashi Iwai #define US428_SHAREDMEM_PAGES PAGE_ALIGN(sizeof(struct us428ctls_sharedmem)) 94