diff options
Diffstat (limited to 'sound/usb/caiaq/caiaq-control.c')
-rw-r--r-- | sound/usb/caiaq/caiaq-control.c | 15 |
1 files changed, 12 insertions, 3 deletions
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 | ||
251 | static struct caiaq_controller a4dj_controller[] = { | ||
252 | { "Current input mode", 0 | CNT_INTVAL } | ||
253 | }; | ||
254 | |||
250 | static int __devinit add_controls(struct caiaq_controller *c, int num, | 255 | static 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; |