aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/caiaq
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.org>2009-01-16 05:03:19 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-16 05:36:47 -0500
commit2165592b837e086f2b94835a2d81e6f3199c1319 (patch)
tree7a349bc69c5600a0dba14bd731c1008d5f1d6782 /sound/usb/caiaq
parent7cb36b6ccdca03bd87e8faca7fd920643dd1aec7 (diff)
ALSA: snd-usb-caiaq: support for two more audio devices
- Added support for two new audio devices from Native Instuments, 'Audio4DJ' and 'GuitarRig mobile' - Add missing statement about 'Session IO' in Kconfig help text - Version number bumped to 1.3.11 Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/caiaq')
-rw-r--r--sound/usb/caiaq/caiaq-audio.c5
-rw-r--r--sound/usb/caiaq/caiaq-control.c15
-rw-r--r--sound/usb/caiaq/caiaq-device.c16
-rw-r--r--sound/usb/caiaq/caiaq-device.h2
4 files changed, 31 insertions, 7 deletions
diff --git a/sound/usb/caiaq/caiaq-audio.c b/sound/usb/caiaq/caiaq-audio.c
index b3a603325835..fc6d571eeac6 100644
--- a/sound/usb/caiaq/caiaq-audio.c
+++ b/sound/usb/caiaq/caiaq-audio.c
@@ -638,9 +638,10 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
638 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AK1): 638 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AK1):
639 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL3): 639 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL3):
640 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_SESSIONIO): 640 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_SESSIONIO):
641 dev->samplerates |= SNDRV_PCM_RATE_88200; 641 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_GUITARRIGMOBILE):
642 dev->samplerates |= SNDRV_PCM_RATE_192000; 642 dev->samplerates |= SNDRV_PCM_RATE_192000;
643 break; 643 /* fall thru */
644 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
644 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ): 645 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ):
645 dev->samplerates |= SNDRV_PCM_RATE_88200; 646 dev->samplerates |= SNDRV_PCM_RATE_88200;
646 break; 647 break;
diff --git a/sound/usb/caiaq/caiaq-control.c b/sound/usb/caiaq/caiaq-control.c
index ccd763dd7167..6ac5489a0f22 100644
--- a/sound/usb/caiaq/caiaq-control.c
+++ b/sound/usb/caiaq/caiaq-control.c
@@ -39,14 +39,15 @@ static int control_info(struct snd_kcontrol *kcontrol,
39 struct snd_usb_caiaqdev *dev = caiaqdev(chip->card); 39 struct snd_usb_caiaqdev *dev = caiaqdev(chip->card);
40 int pos = kcontrol->private_value; 40 int pos = kcontrol->private_value;
41 int is_intval = pos & CNT_INTVAL; 41 int is_intval = pos & CNT_INTVAL;
42 unsigned int id = dev->chip.usb_id;
42 43
43 uinfo->count = 1; 44 uinfo->count = 1;
44 pos &= ~CNT_INTVAL; 45 pos &= ~CNT_INTVAL;
45 46
46 if (dev->chip.usb_id == 47 if (((id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ)) ||
47 USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ) 48 (id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)))
48 && (pos == 0)) { 49 && (pos == 0)) {
49 /* current input mode of A8DJ */ 50 /* current input mode of A8DJ and A4DJ */
50 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 51 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
51 uinfo->value.integer.min = 0; 52 uinfo->value.integer.min = 0;
52 uinfo->value.integer.max = 2; 53 uinfo->value.integer.max = 2;
@@ -247,6 +248,10 @@ static struct caiaq_controller a8dj_controller[] = {
247 { "Software lock", 40 } 248 { "Software lock", 40 }
248}; 249};
249 250
251static struct caiaq_controller a4dj_controller[] = {
252 { "Current input mode", 0 | CNT_INTVAL }
253};
254
250static int __devinit add_controls(struct caiaq_controller *c, int num, 255static int __devinit add_controls(struct caiaq_controller *c, int num,
251 struct snd_usb_caiaqdev *dev) 256 struct snd_usb_caiaqdev *dev)
252{ 257{
@@ -295,6 +300,10 @@ int __devinit snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *dev)
295 ret = add_controls(a8dj_controller, 300 ret = add_controls(a8dj_controller,
296 ARRAY_SIZE(a8dj_controller), dev); 301 ARRAY_SIZE(a8dj_controller), dev);
297 break; 302 break;
303 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
304 ret = add_controls(a4dj_controller,
305 ARRAY_SIZE(a4dj_controller), dev);
306 break;
298 } 307 }
299 308
300 return ret; 309 return ret;
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c
index 41c36b055f6b..d09fc2a88cf3 100644
--- a/sound/usb/caiaq/caiaq-device.c
+++ b/sound/usb/caiaq/caiaq-device.c
@@ -42,15 +42,17 @@
42#endif 42#endif
43 43
44MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 44MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
45MODULE_DESCRIPTION("caiaq USB audio, version 1.3.10"); 45MODULE_DESCRIPTION("caiaq USB audio, version 1.3.11");
46MODULE_LICENSE("GPL"); 46MODULE_LICENSE("GPL");
47MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," 47MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
48 "{Native Instruments, RigKontrol3}," 48 "{Native Instruments, RigKontrol3},"
49 "{Native Instruments, Kore Controller}," 49 "{Native Instruments, Kore Controller},"
50 "{Native Instruments, Kore Controller 2}," 50 "{Native Instruments, Kore Controller 2},"
51 "{Native Instruments, Audio Kontrol 1}," 51 "{Native Instruments, Audio Kontrol 1},"
52 "{Native Instruments, Audio 4 DJ},"
52 "{Native Instruments, Audio 8 DJ}," 53 "{Native Instruments, Audio 8 DJ},"
53 "{Native Instruments, Session I/O}}"); 54 "{Native Instruments, Session I/O},"
55 "{Native Instruments, GuitarRig mobile}");
54 56
55static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */ 57static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */
56static char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */ 58static char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */
@@ -116,6 +118,16 @@ static struct usb_device_id snd_usb_id_table[] = {
116 .idVendor = USB_VID_NATIVEINSTRUMENTS, 118 .idVendor = USB_VID_NATIVEINSTRUMENTS,
117 .idProduct = USB_PID_SESSIONIO 119 .idProduct = USB_PID_SESSIONIO
118 }, 120 },
121 {
122 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
123 .idVendor = USB_VID_NATIVEINSTRUMENTS,
124 .idProduct = USB_PID_GUITARRIGMOBILE
125 },
126 {
127 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
128 .idVendor = USB_VID_NATIVEINSTRUMENTS,
129 .idProduct = USB_PID_AUDIO4DJ
130 },
119 { /* terminator */ } 131 { /* terminator */ }
120}; 132};
121 133
diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h
index ab56e738c5fc..0560c327d996 100644
--- a/sound/usb/caiaq/caiaq-device.h
+++ b/sound/usb/caiaq/caiaq-device.h
@@ -10,8 +10,10 @@
10#define USB_PID_KORECONTROLLER 0x4711 10#define USB_PID_KORECONTROLLER 0x4711
11#define USB_PID_KORECONTROLLER2 0x4712 11#define USB_PID_KORECONTROLLER2 0x4712
12#define USB_PID_AK1 0x0815 12#define USB_PID_AK1 0x0815
13#define USB_PID_AUDIO4DJ 0x0839
13#define USB_PID_AUDIO8DJ 0x1978 14#define USB_PID_AUDIO8DJ 0x1978
14#define USB_PID_SESSIONIO 0x1915 15#define USB_PID_SESSIONIO 0x1915
16#define USB_PID_GUITARRIGMOBILE 0x0d8d
15 17
16#define EP1_BUFSIZE 64 18#define EP1_BUFSIZE 64
17#define CAIAQ_USB_STR_LEN 0xff 19#define CAIAQ_USB_STR_LEN 0xff