aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y/us122l.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/usx2y/us122l.c')
-rw-r--r--sound/usb/usx2y/us122l.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index f71cd28eca6b..91bb29666d26 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file)
194 if (!us122l->first) 194 if (!us122l->first)
195 us122l->first = file; 195 us122l->first = file;
196 196
197 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 197 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
198 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
198 iface = usb_ifnum_to_if(us122l->dev, 0); 199 iface = usb_ifnum_to_if(us122l->dev, 0);
199 usb_autopm_get_interface(iface); 200 usb_autopm_get_interface(iface);
200 } 201 }
@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file)
209 struct usb_interface *iface; 210 struct usb_interface *iface;
210 snd_printdd(KERN_DEBUG "%p %p\n", hw, file); 211 snd_printdd(KERN_DEBUG "%p %p\n", hw, file);
211 212
212 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 213 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
214 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
213 iface = usb_ifnum_to_if(us122l->dev, 0); 215 iface = usb_ifnum_to_if(us122l->dev, 0);
214 usb_autopm_put_interface(iface); 216 usb_autopm_put_interface(iface);
215 } 217 }
@@ -476,7 +478,8 @@ static bool us122l_create_card(struct snd_card *card)
476 int err; 478 int err;
477 struct us122l *us122l = US122L(card); 479 struct us122l *us122l = US122L(card);
478 480
479 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 481 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
482 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
480 err = usb_set_interface(us122l->dev, 0, 1); 483 err = usb_set_interface(us122l->dev, 0, 1);
481 if (err) { 484 if (err) {
482 snd_printk(KERN_ERR "usb_set_interface error \n"); 485 snd_printk(KERN_ERR "usb_set_interface error \n");
@@ -495,7 +498,8 @@ static bool us122l_create_card(struct snd_card *card)
495 if (!us122l_start(us122l, 44100, 256)) 498 if (!us122l_start(us122l, 44100, 256))
496 return false; 499 return false;
497 500
498 if (us122l->dev->descriptor.idProduct == USB_ID_US144) 501 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
502 us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
499 err = us144_create_usbmidi(card); 503 err = us144_create_usbmidi(card);
500 else 504 else
501 err = us122l_create_usbmidi(card); 505 err = us122l_create_usbmidi(card);
@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_interface *intf,
597 struct snd_card *card; 601 struct snd_card *card;
598 int err; 602 int err;
599 603
600 if (device->descriptor.idProduct == USB_ID_US144 604 if ((device->descriptor.idProduct == USB_ID_US144 ||
605 device->descriptor.idProduct == USB_ID_US144MKII)
601 && device->speed == USB_SPEED_HIGH) { 606 && device->speed == USB_SPEED_HIGH) {
602 snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n"); 607 snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
603 return -ENODEV; 608 return -ENODEV;
@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_interface *intf)
692 697
693 mutex_lock(&us122l->mutex); 698 mutex_lock(&us122l->mutex);
694 /* needed, doesn't restart without: */ 699 /* needed, doesn't restart without: */
695 if (us122l->dev->descriptor.idProduct == USB_ID_US144) { 700 if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
701 us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
696 err = usb_set_interface(us122l->dev, 0, 1); 702 err = usb_set_interface(us122l->dev, 0, 1);
697 if (err) { 703 if (err) {
698 snd_printk(KERN_ERR "usb_set_interface error \n"); 704 snd_printk(KERN_ERR "usb_set_interface error \n");
@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_usb_id_table[] = {
737 .idVendor = 0x0644, 743 .idVendor = 0x0644,
738 .idProduct = USB_ID_US144 744 .idProduct = USB_ID_US144
739 }, 745 },
746 {
747 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
748 .idVendor = 0x0644,
749 .idProduct = USB_ID_US122MKII
750 },
751 {
752 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
753 .idVendor = 0x0644,
754 .idProduct = USB_ID_US144MKII
755 },
740 { /* terminator */ } 756 { /* terminator */ }
741}; 757};
742 758