Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199301
b: refs/heads/master
c: bd4cbf6
h: refs/heads/master
i:
  199299: 515341d
v: v3
  • Loading branch information
Mark Hills authored and Takashi Iwai committed May 29, 2010
1 parent f25e23a commit 644b82c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8d0fee70b66694959eab10c41788b9279d73629
refs/heads/master: bd4cbf6c7689d35d5d1248369d2c350f4711ca0a
30 changes: 2 additions & 28 deletions trunk/sound/usb/caiaq/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,12 @@ static int control_info(struct snd_kcontrol *kcontrol,

switch (dev->chip.usb_id) {
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ):
if (pos == 0) {
/* current input mode of A8DJ */
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 2;
return 0;
}
break;

case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
if (pos == 0) {
/* current input mode of A4DJ */
/* current input mode of A8DJ and A4DJ */
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 1;
uinfo->value.integer.max = 2;
return 0;
}
break;
Expand Down Expand Up @@ -86,14 +77,6 @@ static int control_get(struct snd_kcontrol *kcontrol,
struct snd_usb_caiaqdev *dev = caiaqdev(chip->card);
int pos = kcontrol->private_value;

if (dev->chip.usb_id ==
USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)) {
/* A4DJ has only one control */
/* do not expose hardware input mode 0 */
ucontrol->value.integer.value[0] = dev->control_state[0] - 1;
return 0;
}

if (pos & CNT_INTVAL)
ucontrol->value.integer.value[0]
= dev->control_state[pos & ~CNT_INTVAL];
Expand All @@ -113,15 +96,6 @@ static int control_put(struct snd_kcontrol *kcontrol,
unsigned char cmd = EP1_CMD_WRITE_IO;

switch (dev->chip.usb_id) {
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): {
/* A4DJ has only one control */
/* do not expose hardware input mode 0 */
dev->control_state[0] = ucontrol->value.integer.value[0] + 1;
snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO,
dev->control_state, sizeof(dev->control_state));
return 1;
}

case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
cmd = EP1_CMD_DIMM_LEDS;
break;
Expand Down

0 comments on commit 644b82c

Please sign in to comment.