1*936e7d03SDaniel Mack /* 2*936e7d03SDaniel Mack * Copyright (c) 2007 Daniel Mack 3*936e7d03SDaniel Mack * friendly supported by NI. 4*936e7d03SDaniel Mack * 5*936e7d03SDaniel Mack * This program is free software; you can redistribute it and/or modify 6*936e7d03SDaniel Mack * it under the terms of the GNU General Public License as published by 7*936e7d03SDaniel Mack * the Free Software Foundation; either version 2 of the License, or 8*936e7d03SDaniel Mack * (at your option) any later version. 9*936e7d03SDaniel Mack * 10*936e7d03SDaniel Mack * This program is distributed in the hope that it will be useful, 11*936e7d03SDaniel Mack * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*936e7d03SDaniel Mack * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*936e7d03SDaniel Mack * GNU General Public License for more details. 14*936e7d03SDaniel Mack * 15*936e7d03SDaniel Mack * You should have received a copy of the GNU General Public License 16*936e7d03SDaniel Mack * along with this program; if not, write to the Free Software 17*936e7d03SDaniel Mack * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18*936e7d03SDaniel Mack */ 19*936e7d03SDaniel Mack 20*936e7d03SDaniel Mack #include <linux/init.h> 21*936e7d03SDaniel Mack #include <linux/usb.h> 22*936e7d03SDaniel Mack #include <sound/control.h> 23*936e7d03SDaniel Mack #include <sound/core.h> 24*936e7d03SDaniel Mack #include <sound/pcm.h> 25*936e7d03SDaniel Mack 26*936e7d03SDaniel Mack #include "device.h" 27*936e7d03SDaniel Mack #include "control.h" 28*936e7d03SDaniel Mack 29*936e7d03SDaniel Mack #define CNT_INTVAL 0x10000 30*936e7d03SDaniel Mack 31*936e7d03SDaniel Mack static int control_info(struct snd_kcontrol *kcontrol, 32*936e7d03SDaniel Mack struct snd_ctl_elem_info *uinfo) 33*936e7d03SDaniel Mack { 34*936e7d03SDaniel Mack struct snd_usb_audio *chip = snd_kcontrol_chip(kcontrol); 35*936e7d03SDaniel Mack struct snd_usb_caiaqdev *dev = caiaqdev(chip->card); 36*936e7d03SDaniel Mack int pos = kcontrol->private_value; 37*936e7d03SDaniel Mack int is_intval = pos & CNT_INTVAL; 38*936e7d03SDaniel Mack unsigned int id = dev->chip.usb_id; 39*936e7d03SDaniel Mack 40*936e7d03SDaniel Mack uinfo->count = 1; 41*936e7d03SDaniel Mack pos &= ~CNT_INTVAL; 42*936e7d03SDaniel Mack 43*936e7d03SDaniel Mack if (id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ) 44*936e7d03SDaniel Mack && (pos == 0)) { 45*936e7d03SDaniel Mack /* current input mode of A8DJ */ 46*936e7d03SDaniel Mack uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 47*936e7d03SDaniel Mack uinfo->value.integer.min = 0; 48*936e7d03SDaniel Mack uinfo->value.integer.max = 2; 49*936e7d03SDaniel Mack return 0; 50*936e7d03SDaniel Mack } 51*936e7d03SDaniel Mack 52*936e7d03SDaniel Mack if (id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ) 53*936e7d03SDaniel Mack && (pos == 0)) { 54*936e7d03SDaniel Mack /* current input mode of A4DJ */ 55*936e7d03SDaniel Mack uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 56*936e7d03SDaniel Mack uinfo->value.integer.min = 0; 57*936e7d03SDaniel Mack uinfo->value.integer.max = 1; 58*936e7d03SDaniel Mack return 0; 59*936e7d03SDaniel Mack } 60*936e7d03SDaniel Mack 61*936e7d03SDaniel Mack if (is_intval) { 62*936e7d03SDaniel Mack uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 63*936e7d03SDaniel Mack uinfo->value.integer.min = 0; 64*936e7d03SDaniel Mack uinfo->value.integer.max = 64; 65*936e7d03SDaniel Mack } else { 66*936e7d03SDaniel Mack uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 67*936e7d03SDaniel Mack uinfo->value.integer.min = 0; 68*936e7d03SDaniel Mack uinfo->value.integer.max = 1; 69*936e7d03SDaniel Mack } 70*936e7d03SDaniel Mack 71*936e7d03SDaniel Mack return 0; 72*936e7d03SDaniel Mack } 73*936e7d03SDaniel Mack 74*936e7d03SDaniel Mack static int control_get(struct snd_kcontrol *kcontrol, 75*936e7d03SDaniel Mack struct snd_ctl_elem_value *ucontrol) 76*936e7d03SDaniel Mack { 77*936e7d03SDaniel Mack struct snd_usb_audio *chip = snd_kcontrol_chip(kcontrol); 78*936e7d03SDaniel Mack struct snd_usb_caiaqdev *dev = caiaqdev(chip->card); 79*936e7d03SDaniel Mack int pos = kcontrol->private_value; 80*936e7d03SDaniel Mack 81*936e7d03SDaniel Mack if (dev->chip.usb_id == 82*936e7d03SDaniel Mack USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)) { 83*936e7d03SDaniel Mack /* A4DJ has only one control */ 84*936e7d03SDaniel Mack /* do not expose hardware input mode 0 */ 85*936e7d03SDaniel Mack ucontrol->value.integer.value[0] = dev->control_state[0] - 1; 86*936e7d03SDaniel Mack return 0; 87*936e7d03SDaniel Mack } 88*936e7d03SDaniel Mack 89*936e7d03SDaniel Mack if (pos & CNT_INTVAL) 90*936e7d03SDaniel Mack ucontrol->value.integer.value[0] 91*936e7d03SDaniel Mack = dev->control_state[pos & ~CNT_INTVAL]; 92*936e7d03SDaniel Mack else 93*936e7d03SDaniel Mack ucontrol->value.integer.value[0] 94*936e7d03SDaniel Mack = !!(dev->control_state[pos / 8] & (1 << pos % 8)); 95*936e7d03SDaniel Mack 96*936e7d03SDaniel Mack return 0; 97*936e7d03SDaniel Mack } 98*936e7d03SDaniel Mack 99*936e7d03SDaniel Mack static int control_put(struct snd_kcontrol *kcontrol, 100*936e7d03SDaniel Mack struct snd_ctl_elem_value *ucontrol) 101*936e7d03SDaniel Mack { 102*936e7d03SDaniel Mack struct snd_usb_audio *chip = snd_kcontrol_chip(kcontrol); 103*936e7d03SDaniel Mack struct snd_usb_caiaqdev *dev = caiaqdev(chip->card); 104*936e7d03SDaniel Mack int pos = kcontrol->private_value; 105*936e7d03SDaniel Mack 106*936e7d03SDaniel Mack if (dev->chip.usb_id == 107*936e7d03SDaniel Mack USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)) { 108*936e7d03SDaniel Mack /* A4DJ has only one control */ 109*936e7d03SDaniel Mack /* do not expose hardware input mode 0 */ 110*936e7d03SDaniel Mack dev->control_state[0] = ucontrol->value.integer.value[0] + 1; 111*936e7d03SDaniel Mack snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO, 112*936e7d03SDaniel Mack dev->control_state, sizeof(dev->control_state)); 113*936e7d03SDaniel Mack return 1; 114*936e7d03SDaniel Mack } 115*936e7d03SDaniel Mack 116*936e7d03SDaniel Mack if (pos & CNT_INTVAL) { 117*936e7d03SDaniel Mack dev->control_state[pos & ~CNT_INTVAL] 118*936e7d03SDaniel Mack = ucontrol->value.integer.value[0]; 119*936e7d03SDaniel Mack snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO, 120*936e7d03SDaniel Mack dev->control_state, sizeof(dev->control_state)); 121*936e7d03SDaniel Mack } else { 122*936e7d03SDaniel Mack if (ucontrol->value.integer.value[0]) 123*936e7d03SDaniel Mack dev->control_state[pos / 8] |= 1 << (pos % 8); 124*936e7d03SDaniel Mack else 125*936e7d03SDaniel Mack dev->control_state[pos / 8] &= ~(1 << (pos % 8)); 126*936e7d03SDaniel Mack 127*936e7d03SDaniel Mack snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO, 128*936e7d03SDaniel Mack dev->control_state, sizeof(dev->control_state)); 129*936e7d03SDaniel Mack } 130*936e7d03SDaniel Mack 131*936e7d03SDaniel Mack return 1; 132*936e7d03SDaniel Mack } 133*936e7d03SDaniel Mack 134*936e7d03SDaniel Mack static struct snd_kcontrol_new kcontrol_template __devinitdata = { 135*936e7d03SDaniel Mack .iface = SNDRV_CTL_ELEM_IFACE_HWDEP, 136*936e7d03SDaniel Mack .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 137*936e7d03SDaniel Mack .index = 0, 138*936e7d03SDaniel Mack .info = control_info, 139*936e7d03SDaniel Mack .get = control_get, 140*936e7d03SDaniel Mack .put = control_put, 141*936e7d03SDaniel Mack /* name and private_value filled later */ 142*936e7d03SDaniel Mack }; 143*936e7d03SDaniel Mack 144*936e7d03SDaniel Mack struct caiaq_controller { 145*936e7d03SDaniel Mack char *name; 146*936e7d03SDaniel Mack int index; 147*936e7d03SDaniel Mack }; 148*936e7d03SDaniel Mack 149*936e7d03SDaniel Mack static struct caiaq_controller ak1_controller[] = { 150*936e7d03SDaniel Mack { "LED left", 2 }, 151*936e7d03SDaniel Mack { "LED middle", 1 }, 152*936e7d03SDaniel Mack { "LED right", 0 }, 153*936e7d03SDaniel Mack { "LED ring", 3 } 154*936e7d03SDaniel Mack }; 155*936e7d03SDaniel Mack 156*936e7d03SDaniel Mack static struct caiaq_controller rk2_controller[] = { 157*936e7d03SDaniel Mack { "LED 1", 5 }, 158*936e7d03SDaniel Mack { "LED 2", 4 }, 159*936e7d03SDaniel Mack { "LED 3", 3 }, 160*936e7d03SDaniel Mack { "LED 4", 2 }, 161*936e7d03SDaniel Mack { "LED 5", 1 }, 162*936e7d03SDaniel Mack { "LED 6", 0 }, 163*936e7d03SDaniel Mack { "LED pedal", 6 }, 164*936e7d03SDaniel Mack { "LED 7seg_1b", 8 }, 165*936e7d03SDaniel Mack { "LED 7seg_1c", 9 }, 166*936e7d03SDaniel Mack { "LED 7seg_2a", 10 }, 167*936e7d03SDaniel Mack { "LED 7seg_2b", 11 }, 168*936e7d03SDaniel Mack { "LED 7seg_2c", 12 }, 169*936e7d03SDaniel Mack { "LED 7seg_2d", 13 }, 170*936e7d03SDaniel Mack { "LED 7seg_2e", 14 }, 171*936e7d03SDaniel Mack { "LED 7seg_2f", 15 }, 172*936e7d03SDaniel Mack { "LED 7seg_2g", 16 }, 173*936e7d03SDaniel Mack { "LED 7seg_3a", 17 }, 174*936e7d03SDaniel Mack { "LED 7seg_3b", 18 }, 175*936e7d03SDaniel Mack { "LED 7seg_3c", 19 }, 176*936e7d03SDaniel Mack { "LED 7seg_3d", 20 }, 177*936e7d03SDaniel Mack { "LED 7seg_3e", 21 }, 178*936e7d03SDaniel Mack { "LED 7seg_3f", 22 }, 179*936e7d03SDaniel Mack { "LED 7seg_3g", 23 } 180*936e7d03SDaniel Mack }; 181*936e7d03SDaniel Mack 182*936e7d03SDaniel Mack static struct caiaq_controller rk3_controller[] = { 183*936e7d03SDaniel Mack { "LED 7seg_1a", 0 + 0 }, 184*936e7d03SDaniel Mack { "LED 7seg_1b", 0 + 1 }, 185*936e7d03SDaniel Mack { "LED 7seg_1c", 0 + 2 }, 186*936e7d03SDaniel Mack { "LED 7seg_1d", 0 + 3 }, 187*936e7d03SDaniel Mack { "LED 7seg_1e", 0 + 4 }, 188*936e7d03SDaniel Mack { "LED 7seg_1f", 0 + 5 }, 189*936e7d03SDaniel Mack { "LED 7seg_1g", 0 + 6 }, 190*936e7d03SDaniel Mack { "LED 7seg_1p", 0 + 7 }, 191*936e7d03SDaniel Mack 192*936e7d03SDaniel Mack { "LED 7seg_2a", 8 + 0 }, 193*936e7d03SDaniel Mack { "LED 7seg_2b", 8 + 1 }, 194*936e7d03SDaniel Mack { "LED 7seg_2c", 8 + 2 }, 195*936e7d03SDaniel Mack { "LED 7seg_2d", 8 + 3 }, 196*936e7d03SDaniel Mack { "LED 7seg_2e", 8 + 4 }, 197*936e7d03SDaniel Mack { "LED 7seg_2f", 8 + 5 }, 198*936e7d03SDaniel Mack { "LED 7seg_2g", 8 + 6 }, 199*936e7d03SDaniel Mack { "LED 7seg_2p", 8 + 7 }, 200*936e7d03SDaniel Mack 201*936e7d03SDaniel Mack { "LED 7seg_3a", 16 + 0 }, 202*936e7d03SDaniel Mack { "LED 7seg_3b", 16 + 1 }, 203*936e7d03SDaniel Mack { "LED 7seg_3c", 16 + 2 }, 204*936e7d03SDaniel Mack { "LED 7seg_3d", 16 + 3 }, 205*936e7d03SDaniel Mack { "LED 7seg_3e", 16 + 4 }, 206*936e7d03SDaniel Mack { "LED 7seg_3f", 16 + 5 }, 207*936e7d03SDaniel Mack { "LED 7seg_3g", 16 + 6 }, 208*936e7d03SDaniel Mack { "LED 7seg_3p", 16 + 7 }, 209*936e7d03SDaniel Mack 210*936e7d03SDaniel Mack { "LED 7seg_4a", 24 + 0 }, 211*936e7d03SDaniel Mack { "LED 7seg_4b", 24 + 1 }, 212*936e7d03SDaniel Mack { "LED 7seg_4c", 24 + 2 }, 213*936e7d03SDaniel Mack { "LED 7seg_4d", 24 + 3 }, 214*936e7d03SDaniel Mack { "LED 7seg_4e", 24 + 4 }, 215*936e7d03SDaniel Mack { "LED 7seg_4f", 24 + 5 }, 216*936e7d03SDaniel Mack { "LED 7seg_4g", 24 + 6 }, 217*936e7d03SDaniel Mack { "LED 7seg_4p", 24 + 7 }, 218*936e7d03SDaniel Mack 219*936e7d03SDaniel Mack { "LED 1", 32 + 0 }, 220*936e7d03SDaniel Mack { "LED 2", 32 + 1 }, 221*936e7d03SDaniel Mack { "LED 3", 32 + 2 }, 222*936e7d03SDaniel Mack { "LED 4", 32 + 3 }, 223*936e7d03SDaniel Mack { "LED 5", 32 + 4 }, 224*936e7d03SDaniel Mack { "LED 6", 32 + 5 }, 225*936e7d03SDaniel Mack { "LED 7", 32 + 6 }, 226*936e7d03SDaniel Mack { "LED 8", 32 + 7 }, 227*936e7d03SDaniel Mack { "LED pedal", 32 + 8 } 228*936e7d03SDaniel Mack }; 229*936e7d03SDaniel Mack 230*936e7d03SDaniel Mack static struct caiaq_controller kore_controller[] = { 231*936e7d03SDaniel Mack { "LED F1", 8 | CNT_INTVAL }, 232*936e7d03SDaniel Mack { "LED F2", 12 | CNT_INTVAL }, 233*936e7d03SDaniel Mack { "LED F3", 0 | CNT_INTVAL }, 234*936e7d03SDaniel Mack { "LED F4", 4 | CNT_INTVAL }, 235*936e7d03SDaniel Mack { "LED F5", 11 | CNT_INTVAL }, 236*936e7d03SDaniel Mack { "LED F6", 15 | CNT_INTVAL }, 237*936e7d03SDaniel Mack { "LED F7", 3 | CNT_INTVAL }, 238*936e7d03SDaniel Mack { "LED F8", 7 | CNT_INTVAL }, 239*936e7d03SDaniel Mack { "LED touch1", 10 | CNT_INTVAL }, 240*936e7d03SDaniel Mack { "LED touch2", 14 | CNT_INTVAL }, 241*936e7d03SDaniel Mack { "LED touch3", 2 | CNT_INTVAL }, 242*936e7d03SDaniel Mack { "LED touch4", 6 | CNT_INTVAL }, 243*936e7d03SDaniel Mack { "LED touch5", 9 | CNT_INTVAL }, 244*936e7d03SDaniel Mack { "LED touch6", 13 | CNT_INTVAL }, 245*936e7d03SDaniel Mack { "LED touch7", 1 | CNT_INTVAL }, 246*936e7d03SDaniel Mack { "LED touch8", 5 | CNT_INTVAL }, 247*936e7d03SDaniel Mack { "LED left", 18 | CNT_INTVAL }, 248*936e7d03SDaniel Mack { "LED right", 22 | CNT_INTVAL }, 249*936e7d03SDaniel Mack { "LED up", 16 | CNT_INTVAL }, 250*936e7d03SDaniel Mack { "LED down", 20 | CNT_INTVAL }, 251*936e7d03SDaniel Mack { "LED stop", 23 | CNT_INTVAL }, 252*936e7d03SDaniel Mack { "LED play", 21 | CNT_INTVAL }, 253*936e7d03SDaniel Mack { "LED record", 19 | CNT_INTVAL }, 254*936e7d03SDaniel Mack { "LED listen", 17 | CNT_INTVAL }, 255*936e7d03SDaniel Mack { "LED lcd", 30 | CNT_INTVAL }, 256*936e7d03SDaniel Mack { "LED menu", 28 | CNT_INTVAL }, 257*936e7d03SDaniel Mack { "LED sound", 31 | CNT_INTVAL }, 258*936e7d03SDaniel Mack { "LED esc", 29 | CNT_INTVAL }, 259*936e7d03SDaniel Mack { "LED view", 27 | CNT_INTVAL }, 260*936e7d03SDaniel Mack { "LED enter", 24 | CNT_INTVAL }, 261*936e7d03SDaniel Mack { "LED control", 26 | CNT_INTVAL } 262*936e7d03SDaniel Mack }; 263*936e7d03SDaniel Mack 264*936e7d03SDaniel Mack static struct caiaq_controller a8dj_controller[] = { 265*936e7d03SDaniel Mack { "Current input mode", 0 | CNT_INTVAL }, 266*936e7d03SDaniel Mack { "GND lift for TC Vinyl mode", 24 + 0 }, 267*936e7d03SDaniel Mack { "GND lift for TC CD/Line mode", 24 + 1 }, 268*936e7d03SDaniel Mack { "GND lift for phono mode", 24 + 2 }, 269*936e7d03SDaniel Mack { "Software lock", 40 } 270*936e7d03SDaniel Mack }; 271*936e7d03SDaniel Mack 272*936e7d03SDaniel Mack static struct caiaq_controller a4dj_controller[] = { 273*936e7d03SDaniel Mack { "Current input mode", 0 | CNT_INTVAL } 274*936e7d03SDaniel Mack }; 275*936e7d03SDaniel Mack 276*936e7d03SDaniel Mack static int __devinit add_controls(struct caiaq_controller *c, int num, 277*936e7d03SDaniel Mack struct snd_usb_caiaqdev *dev) 278*936e7d03SDaniel Mack { 279*936e7d03SDaniel Mack int i, ret; 280*936e7d03SDaniel Mack struct snd_kcontrol *kc; 281*936e7d03SDaniel Mack 282*936e7d03SDaniel Mack for (i = 0; i < num; i++, c++) { 283*936e7d03SDaniel Mack kcontrol_template.name = c->name; 284*936e7d03SDaniel Mack kcontrol_template.private_value = c->index; 285*936e7d03SDaniel Mack kc = snd_ctl_new1(&kcontrol_template, dev); 286*936e7d03SDaniel Mack ret = snd_ctl_add(dev->chip.card, kc); 287*936e7d03SDaniel Mack if (ret < 0) 288*936e7d03SDaniel Mack return ret; 289*936e7d03SDaniel Mack } 290*936e7d03SDaniel Mack 291*936e7d03SDaniel Mack return 0; 292*936e7d03SDaniel Mack } 293*936e7d03SDaniel Mack 294*936e7d03SDaniel Mack int __devinit snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *dev) 295*936e7d03SDaniel Mack { 296*936e7d03SDaniel Mack int ret = 0; 297*936e7d03SDaniel Mack 298*936e7d03SDaniel Mack switch (dev->chip.usb_id) { 299*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AK1): 300*936e7d03SDaniel Mack ret = add_controls(ak1_controller, 301*936e7d03SDaniel Mack ARRAY_SIZE(ak1_controller), dev); 302*936e7d03SDaniel Mack break; 303*936e7d03SDaniel Mack 304*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL2): 305*936e7d03SDaniel Mack ret = add_controls(rk2_controller, 306*936e7d03SDaniel Mack ARRAY_SIZE(rk2_controller), dev); 307*936e7d03SDaniel Mack break; 308*936e7d03SDaniel Mack 309*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL3): 310*936e7d03SDaniel Mack ret = add_controls(rk3_controller, 311*936e7d03SDaniel Mack ARRAY_SIZE(rk3_controller), dev); 312*936e7d03SDaniel Mack break; 313*936e7d03SDaniel Mack 314*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): 315*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): 316*936e7d03SDaniel Mack ret = add_controls(kore_controller, 317*936e7d03SDaniel Mack ARRAY_SIZE(kore_controller), dev); 318*936e7d03SDaniel Mack break; 319*936e7d03SDaniel Mack 320*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ): 321*936e7d03SDaniel Mack ret = add_controls(a8dj_controller, 322*936e7d03SDaniel Mack ARRAY_SIZE(a8dj_controller), dev); 323*936e7d03SDaniel Mack break; 324*936e7d03SDaniel Mack case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): 325*936e7d03SDaniel Mack ret = add_controls(a4dj_controller, 326*936e7d03SDaniel Mack ARRAY_SIZE(a4dj_controller), dev); 327*936e7d03SDaniel Mack break; 328*936e7d03SDaniel Mack } 329*936e7d03SDaniel Mack 330*936e7d03SDaniel Mack return ret; 331*936e7d03SDaniel Mack } 332*936e7d03SDaniel Mack 333