]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/usb/caiaq/caiaq-device.c
Merge branch 'topic/usb-caiaq' into for-linus
[mv-sheeva.git] / sound / usb / caiaq / caiaq-device.c
index 09aed2363cc94f466aca559730f64f03f5e0ac08..cf573a982fdc542b71e4fe6f3cd891f44f018ba2 100644 (file)
 #endif
 
 MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
-MODULE_DESCRIPTION("caiaq USB audio, version 1.3.10");
+MODULE_DESCRIPTION("caiaq USB audio, version 1.3.13");
 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 4 DJ},"
                         "{Native Instruments, Audio 8 DJ},"
-                        "{Native Instruments, Session I/O}}");
+                        "{Native Instruments, Session I/O},"
+                        "{Native Instruments, GuitarRig mobile}");
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */
 static char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */
@@ -116,6 +118,16 @@ static struct usb_device_id snd_usb_id_table[] = {
                .idVendor =     USB_VID_NATIVEINSTRUMENTS,
                .idProduct =    USB_PID_SESSIONIO
        },
+       {
+               .match_flags =  USB_DEVICE_ID_MATCH_DEVICE,
+               .idVendor =     USB_VID_NATIVEINSTRUMENTS,
+               .idProduct =    USB_PID_GUITARRIGMOBILE
+       },
+       {
+               .match_flags =  USB_DEVICE_ID_MATCH_DEVICE,
+               .idVendor =     USB_VID_NATIVEINSTRUMENTS,
+               .idProduct =    USB_PID_AUDIO4DJ
+       },
        { /* terminator */ }
 };
 
@@ -239,6 +251,8 @@ int snd_usb_caiaq_set_audio_params (struct snd_usb_caiaqdev *dev,
                
        if (dev->audio_parm_answer != 1) 
                debug("unable to set the device's audio params\n");
+       else
+               dev->bpp = bpp;
 
        return dev->audio_parm_answer == 1 ? 0 : -EINVAL;
 }
@@ -300,6 +314,12 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
                }
 
                break;
+       case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
+               /* Audio 4 DJ - default input mode to phono */
+               dev->control_state[0] = 2;
+               snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO,
+                       dev->control_state, 1);
+               break;
        }
        
        if (dev->spec.num_analog_audio_out +