summaryrefslogtreecommitdiffstats
path: root/sound/usb/caiaq/caiaq-control.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.org>2009-01-16 11:03:19 +0100
committerTakashi Iwai <tiwai@suse.de>2009-01-16 11:36:47 +0100
commit2165592b837e086f2b94835a2d81e6f3199c1319 (patch)
tree7a349bc69c5600a0dba14bd731c1008d5f1d6782 /sound/usb/caiaq/caiaq-control.c
parent7cb36b6ccdca03bd87e8faca7fd920643dd1aec7 (diff)
downloadop-kernel-dev-2165592b837e086f2b94835a2d81e6f3199c1319.zip
op-kernel-dev-2165592b837e086f2b94835a2d81e6f3199c1319.tar.gz
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/caiaq-control.c')
-rw-r--r--sound/usb/caiaq/caiaq-control.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/usb/caiaq/caiaq-control.c b/sound/usb/caiaq/caiaq-control.c
index ccd763d..6ac5489 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,
struct snd_usb_caiaqdev *dev = caiaqdev(chip->card);
int pos = kcontrol->private_value;
int is_intval = pos & CNT_INTVAL;
+ unsigned int id = dev->chip.usb_id;
uinfo->count = 1;
pos &= ~CNT_INTVAL;
- if (dev->chip.usb_id ==
- USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ)
+ if (((id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ)) ||
+ (id == USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)))
&& (pos == 0)) {
- /* current input mode of A8DJ */
+ /* current input mode of A8DJ and A4DJ */
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 2;
@@ -247,6 +248,10 @@ static struct caiaq_controller a8dj_controller[] = {
{ "Software lock", 40 }
};
+static struct caiaq_controller a4dj_controller[] = {
+ { "Current input mode", 0 | CNT_INTVAL }
+};
+
static int __devinit add_controls(struct caiaq_controller *c, int num,
struct snd_usb_caiaqdev *dev)
{
@@ -295,6 +300,10 @@ int __devinit snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *dev)
ret = add_controls(a8dj_controller,
ARRAY_SIZE(a8dj_controller), dev);
break;
+ case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
+ ret = add_controls(a4dj_controller,
+ ARRAY_SIZE(a4dj_controller), dev);
+ break;
}
return ret;
OpenPOWER on IntegriCloud