diff options
author | Daniel Mack <daniel@caiaq.de> | 2007-11-26 08:00:56 (GMT) |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 16:29:29 (GMT) |
commit | 7829d0eccbddc7431cc9af662c7cd3442b5598bd (patch) | |
tree | 87ffa944084e528ecb643f5a96591a9b550c3f21 /sound/usb/caiaq/caiaq-device.c | |
parent | 389619f1063ed21cf237e2a8081be42e66d3c9a6 (diff) | |
download | linux-7829d0eccbddc7431cc9af662c7cd3442b5598bd.tar.xz |
[ALSA] usb-caiaq - add support for Kore controller 2
Added support for Native Instrument's Kore controller 2. This device has
no audio but MIDI, input devices and ALSA controllers only.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/usb/caiaq/caiaq-device.c')
-rw-r--r-- | sound/usb/caiaq/caiaq-device.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c index dc2e7f7..48c6bed 100644 --- a/sound/usb/caiaq/caiaq-device.c +++ b/sound/usb/caiaq/caiaq-device.c @@ -43,11 +43,12 @@ #endif MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); -MODULE_DESCRIPTION("caiaq USB audio, version 1.3.0"); +MODULE_DESCRIPTION("caiaq USB audio, version 1.3.1"); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," "{Native Instruments, RigKontrol3}," "{Native Instruments, Kore Controller}," + "{Native Instruments, Kore Controller 2}," "{Native Instruments, Audio Kontrol 1}" "{Native Instruments, Audio 8 DJ}}"); @@ -96,6 +97,11 @@ static struct usb_device_id snd_usb_id_table[] = { .idProduct = USB_PID_KORECONTROLLER }, { + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = USB_VID_NATIVEINSTRUMENTS, + .idProduct = USB_PID_KORECONTROLLER2 + }, + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = USB_VID_NATIVEINSTRUMENTS, .idProduct = USB_PID_AK1 @@ -291,13 +297,21 @@ static void setup_card(struct snd_usb_caiaqdev *dev) break; } - ret = snd_usb_caiaq_audio_init(dev); - if (ret < 0) - log("Unable to set up audio system (ret=%d)\n", ret); + if (dev->spec.num_analog_audio_out + + dev->spec.num_analog_audio_in + + dev->spec.num_digital_audio_out + + dev->spec.num_digital_audio_in > 0) { + ret = snd_usb_caiaq_audio_init(dev); + if (ret < 0) + log("Unable to set up audio system (ret=%d)\n", ret); + } - ret = snd_usb_caiaq_midi_init(dev); - if (ret < 0) - log("Unable to set up MIDI system (ret=%d)\n", ret); + if (dev->spec.num_midi_in + + dev->spec.num_midi_out > 0) { + ret = snd_usb_caiaq_midi_init(dev); + if (ret < 0) + log("Unable to set up MIDI system (ret=%d)\n", ret); + } #ifdef CONFIG_SND_USB_CAIAQ_INPUT ret = snd_usb_caiaq_input_init(dev); |