[alsa-devel] [PATCH] 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 --- This bug is acutally ancient, but given that nobody actually noticed it for so long makes me believe it's not worth flagging the patch for stable@. Still, it would be good to have it for 3.17.
Thanks, Daniel
sound/usb/caiaq/control.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c index f65fc09..b7a7c80 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, struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); int pos = kcontrol->private_value; int v = ucontrol->value.integer.value[0]; - unsigned char cmd = EP1_CMD_WRITE_IO; + unsigned char cmd;
- if (cdev->chip.usb_id == - USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1)) - cmd = EP1_CMD_DIMM_LEDS; - - if (cdev->chip.usb_id == - USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER)) + switch (cdev->chip.usb_id) { + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): cmd = EP1_CMD_DIMM_LEDS; + break; + default: + cmd = EP1_CMD_WRITE_IO; + break; + }
if (pos & CNT_INTVAL) { int i = pos & ~CNT_INTVAL;
At Sun, 21 Sep 2014 23:55:38 +0200, Daniel Mack wrote:
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
This bug is acutally ancient, but given that nobody actually noticed it for so long makes me believe it's not worth flagging the patch for stable@. Still, it would be good to have it for 3.17.
OK, applied to for-linus branch now.
thanks,
Takashi
Thanks, Daniel
sound/usb/caiaq/control.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c index f65fc09..b7a7c80 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, struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); int pos = kcontrol->private_value; int v = ucontrol->value.integer.value[0];
- unsigned char cmd = EP1_CMD_WRITE_IO;
- unsigned char cmd;
- if (cdev->chip.usb_id ==
USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1))
cmd = EP1_CMD_DIMM_LEDS;
- if (cdev->chip.usb_id ==
USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER))
switch (cdev->chip.usb_id) {
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER):
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2):
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): cmd = EP1_CMD_DIMM_LEDS;
break;
default:
cmd = EP1_CMD_WRITE_IO;
break;
}
if (pos & CNT_INTVAL) { int i = pos & ~CNT_INTVAL;
-- 2.1.0
participants (2)
-
Daniel Mack
-
Takashi Iwai