Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174272
b: refs/heads/master
c: 2b6f6c0
h: refs/heads/master
v: v3
  • Loading branch information
Tobias Hansen authored and Takashi Iwai committed Dec 8, 2009
1 parent ec5ddc9 commit 917374f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6960e194a7dfb8197822225e04eca95fbd61a7f
refs/heads/master: 2b6f6c0d11fcf6244b98d2b7490164d92d3e409f
28 changes: 22 additions & 6 deletions trunk/sound/usb/usx2y/us122l.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct snd_hwdep *hw, struct file *file)
if (!us122l->first)
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);
usb_autopm_get_interface(iface);
}
Expand All @@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(struct snd_hwdep *hw, struct file *file)
struct usb_interface *iface;
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);
usb_autopm_put_interface(iface);
}
Expand Down Expand Up @@ -476,7 +478,8 @@ static bool us122l_create_card(struct snd_card *card)
int err;
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);
if (err) {
snd_printk(KERN_ERR "usb_set_interface error \n");
Expand All @@ -495,7 +498,8 @@ static bool us122l_create_card(struct snd_card *card)
if (!us122l_start(us122l, 44100, 256))
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);
else
err = us122l_create_usbmidi(card);
Expand Down Expand Up @@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_interface *intf,
struct snd_card *card;
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) {
snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
return -ENODEV;
Expand Down Expand Up @@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_interface *intf)

mutex_lock(&us122l->mutex);
/* 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);
if (err) {
snd_printk(KERN_ERR "usb_set_interface error \n");
Expand Down Expand Up @@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_usb_id_table[] = {
.idVendor = 0x0644,
.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 */ }
};

Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/usb/usx2y/us122l.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ struct us122l {

#define USB_ID_US122L 0x800E
#define USB_ID_US144 0x800F
#define USB_ID_US122MKII 0x8021
#define USB_ID_US144MKII 0x8020

#endif

0 comments on commit 917374f

Please sign in to comment.