Commit 2b6f6c0d authored by Tobias Hansen's avatar Tobias Hansen Committed by Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent e6960e19
...@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file) ...@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file)
if (!us122l->first) if (!us122l->first)
us122l->first = file; us122l->first = file;
if (us122l->dev->descriptor.idProduct == USB_ID_US144) { if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
iface = usb_ifnum_to_if(us122l->dev, 0); iface = usb_ifnum_to_if(us122l->dev, 0);
usb_autopm_get_interface(iface); usb_autopm_get_interface(iface);
} }
...@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file) ...@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file)
struct usb_interface *iface; struct usb_interface *iface;
snd_printdd(KERN_DEBUG "%p %p\n", hw, file); snd_printdd(KERN_DEBUG "%p %p\n", hw, file);
if (us122l->dev->descriptor.idProduct == USB_ID_US144) { if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
iface = usb_ifnum_to_if(us122l->dev, 0); iface = usb_ifnum_to_if(us122l->dev, 0);
usb_autopm_put_interface(iface); usb_autopm_put_interface(iface);
} }
...@@ -476,7 +478,8 @@ static bool us122l_create_card(struct snd_card *card) ...@@ -476,7 +478,8 @@ static bool us122l_create_card(struct snd_card *card)
int err; int err;
struct us122l *us122l = US122L(card); struct us122l *us122l = US122L(card);
if (us122l->dev->descriptor.idProduct == USB_ID_US144) { if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
err = usb_set_interface(us122l->dev, 0, 1); err = usb_set_interface(us122l->dev, 0, 1);
if (err) { if (err) {
snd_printk(KERN_ERR "usb_set_interface error \n"); snd_printk(KERN_ERR "usb_set_interface error \n");
...@@ -495,7 +498,8 @@ static bool us122l_create_card(struct snd_card *card) ...@@ -495,7 +498,8 @@ static bool us122l_create_card(struct snd_card *card)
if (!us122l_start(us122l, 44100, 256)) if (!us122l_start(us122l, 44100, 256))
return false; return false;
if (us122l->dev->descriptor.idProduct == USB_ID_US144) if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
err = us144_create_usbmidi(card); err = us144_create_usbmidi(card);
else else
err = us122l_create_usbmidi(card); err = us122l_create_usbmidi(card);
...@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_interface *intf, ...@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_interface *intf,
struct snd_card *card; struct snd_card *card;
int err; int err;
if (device->descriptor.idProduct == USB_ID_US144 if ((device->descriptor.idProduct == USB_ID_US144 ||
device->descriptor.idProduct == USB_ID_US144MKII)
&& device->speed == USB_SPEED_HIGH) { && device->speed == USB_SPEED_HIGH) {
snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n"); snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
return -ENODEV; return -ENODEV;
...@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_interface *intf) ...@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_interface *intf)
mutex_lock(&us122l->mutex); mutex_lock(&us122l->mutex);
/* needed, doesn't restart without: */ /* needed, doesn't restart without: */
if (us122l->dev->descriptor.idProduct == USB_ID_US144) { if (us122l->dev->descriptor.idProduct == USB_ID_US144 ||
us122l->dev->descriptor.idProduct == USB_ID_US144MKII) {
err = usb_set_interface(us122l->dev, 0, 1); err = usb_set_interface(us122l->dev, 0, 1);
if (err) { if (err) {
snd_printk(KERN_ERR "usb_set_interface error \n"); snd_printk(KERN_ERR "usb_set_interface error \n");
...@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_usb_id_table[] = { ...@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_usb_id_table[] = {
.idVendor = 0x0644, .idVendor = 0x0644,
.idProduct = USB_ID_US144 .idProduct = USB_ID_US144
}, },
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x0644,
.idProduct = USB_ID_US122MKII
},
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x0644,
.idProduct = USB_ID_US144MKII
},
{ /* terminator */ } { /* terminator */ }
}; };
......
...@@ -25,5 +25,7 @@ struct us122l { ...@@ -25,5 +25,7 @@ struct us122l {
#define USB_ID_US122L 0x800E #define USB_ID_US122L 0x800E
#define USB_ID_US144 0x800F #define USB_ID_US144 0x800F
#define USB_ID_US122MKII 0x8021
#define USB_ID_US144MKII 0x8020
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment