aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hansen <Tobias.Hansen@physik.uni-hamburg.de>2009-12-07 13:08:19 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-08 06:56:50 -0500
commit2b6f6c0d11fcf6244b98d2b7490164d92d3e409f (patch)
treeb0a04798e5633a1e23e1242a09673d126855f429
parente6960e194a7dfb8197822225e04eca95fbd61a7f (diff)
ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
I added the product IDs of the new revisions of the devices, so owners can test whether this suffices to make them work. Patched against ALSA snapshot 20091207. Signed-off-by: Tobias Hansen <Tobias.Hansen at physik.uni-hamburg.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/usb/usx2y/us122l.c28
-rw-r--r--sound/usb/usx2y/us122l.h2
2 files changed, 24 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
diff --git a/sound/usb/usx2y/us122l.h b/sound/usb/usx2y/us122l.h
index 4daf1982e821..f263b3f96c86 100644
--- a/sound/usb/usx2y/us122l.h
+++ b/sound/usb/usx2y/us122l.h
@@ -25,5 +25,7 @@ struct us122l {
25 25
26#define USB_ID_US122L 0x800E 26#define USB_ID_US122L 0x800E
27#define USB_ID_US144 0x800F 27#define USB_ID_US144 0x800F
28#define USB_ID_US122MKII 0x8021
29#define USB_ID_US144MKII 0x8020
28 30
29#endif 31#endif