aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-09-21 17:55:38 -0400
committerTakashi Iwai <tiwai@suse.de>2014-09-22 02:52:14 -0400
commite76bf634870e3c5e3a767ad575f1d404c9f1cab8 (patch)
treee9cb8f6133adf2a8309916e59f24587f08e241f4 /sound
parenta9960e6a293e6fc3ed414643bb4e4106272e4d0a (diff)
ALSA: snd-usb-caiaq: Fix LED commands for Kore controller
KoreController and KoreController2 need an EP1_CMD_DIMM_LEDS command to set their LEDs, not EP1_CMD_WRITE_IO. Signed-off-by: Daniel Mack <daniel@zonque.org> Reported-and-tested-by: Brad Wilson <brad.wilson.00@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/caiaq/control.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c
index f65fc0987cfb..b7a7c805d63f 100644
--- a/sound/usb/caiaq/control.c
+++ b/sound/usb/caiaq/control.c
@@ -100,15 +100,19 @@ static int control_put(struct snd_kcontrol *kcontrol,
100 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); 100 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card);
101 int pos = kcontrol->private_value; 101 int pos = kcontrol->private_value;
102 int v = ucontrol->value.integer.value[0]; 102 int v = ucontrol->value.integer.value[0];
103 unsigned char cmd = EP1_CMD_WRITE_IO; 103 unsigned char cmd;
104 104
105 if (cdev->chip.usb_id == 105 switch (cdev->chip.usb_id) {
106 USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1)) 106 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER):
107 cmd = EP1_CMD_DIMM_LEDS; 107 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
108 108 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2):
109 if (cdev->chip.usb_id == 109 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER):
110 USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER))
111 cmd = EP1_CMD_DIMM_LEDS; 110 cmd = EP1_CMD_DIMM_LEDS;
111 break;
112 default:
113 cmd = EP1_CMD_WRITE_IO;
114 break;
115 }
112 116
113 if (pos & CNT_INTVAL) { 117 if (pos & CNT_INTVAL) {
114 int i = pos & ~CNT_INTVAL; 118 int i = pos & ~CNT_INTVAL;