All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
@ 2009-12-07 18:08 Tobias Hansen
  2009-12-08 13:09 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Hansen @ 2009-12-07 18:08 UTC (permalink / raw)
  To: alsa-devel, fzu, delaossa

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 <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>>

---

diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c 
alsa-driver/alsa-kernel/usb/usx2y/us122l.c
--- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
00:05:40.000000000 +0100
+++ alsa-driver/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
18:50:27.801975964 +0100
@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct
     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);
     }
@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(stru
     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);
     }
@@ -476,7 +478,8 @@ static bool us122l_create_card(struct sn
     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");
@@ -495,7 +498,8 @@ static bool us122l_create_card(struct sn
     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);
@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_i
     struct snd_card *card;
     int err;
 
-    if (device->descriptor.idProduct == USB_ID_US144
+    if ((device->descriptor.idProduct == USB_ID_US144 ||
+        us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
         && device->speed == USB_SPEED_HIGH) {
         snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
         return -ENODEV;
@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_
 
     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");
@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_u
         .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 */ }
 };
 
diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h 
alsa-driver/alsa-kernel/usb/usx2y/us122l.h
--- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
00:05:40.000000000 +0100
+++ alsa-driver/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
18:44:03.990236199 +0100
@@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  2009-12-07 18:08 [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII Tobias Hansen
@ 2009-12-08 13:09 ` Takashi Iwai
  2009-12-08 14:04   ` Alberto Martinez de la Ossa
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2009-12-08 13:09 UTC (permalink / raw)
  To: Tobias Hansen; +Cc: delaossa, alsa-devel

At Mon, 07 Dec 2009 19:08:19 +0100,
Tobias Hansen wrote:
> 
> 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 <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>>

Thanks, applied now.

But, at the next time, please make sure that the posted patch
is applicable.  Your patch had broken tab spaces, so I had to fix
manually.


Takashi

> 
> ---
> 
> diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c 
> alsa-driver/alsa-kernel/usb/usx2y/us122l.c
> --- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
> 00:05:40.000000000 +0100
> +++ alsa-driver/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
> 18:50:27.801975964 +0100
> @@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct
>      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);
>      }
> @@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(stru
>      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);
>      }
> @@ -476,7 +478,8 @@ static bool us122l_create_card(struct sn
>      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");
> @@ -495,7 +498,8 @@ static bool us122l_create_card(struct sn
>      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);
> @@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_i
>      struct snd_card *card;
>      int err;
>  
> -    if (device->descriptor.idProduct == USB_ID_US144
> +    if ((device->descriptor.idProduct == USB_ID_US144 ||
> +        us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
>          && device->speed == USB_SPEED_HIGH) {
>          snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
>          return -ENODEV;
> @@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_
>  
>      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");
> @@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_u
>          .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 */ }
>  };
>  
> diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h 
> alsa-driver/alsa-kernel/usb/usx2y/us122l.h
> --- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
> 00:05:40.000000000 +0100
> +++ alsa-driver/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
> 18:44:03.990236199 +0100
> @@ -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
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  2009-12-08 13:09 ` Takashi Iwai
@ 2009-12-08 14:04   ` Alberto Martinez de la Ossa
  2009-12-08 14:13     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Alberto Martinez de la Ossa @ 2009-12-08 14:04 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Tobias Hansen, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 5245 bytes --]

Thanks, but..
Applied where? I have checked the new sources at 
http://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/alsa-driver/
And they remain the same with respect to the changes that Tobias made.
Could you please post the fixed patch, please? I also got errors when 
trying to apply it.

Regards,
Alberto

Takashi Iwai wrote:
> At Mon, 07 Dec 2009 19:08:19 +0100,
> Tobias Hansen wrote:
>   
>> 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 <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>>
>>     
>
> Thanks, applied now.
>
> But, at the next time, please make sure that the posted patch
> is applicable.  Your patch had broken tab spaces, so I had to fix
> manually.
>
>
> Takashi
>
>   
>> ---
>>
>> diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c 
>> alsa-driver/alsa-kernel/usb/usx2y/us122l.c
>> --- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
>> 00:05:40.000000000 +0100
>> +++ alsa-driver/alsa-kernel/usb/usx2y/us122l.c    2009-12-07 
>> 18:50:27.801975964 +0100
>> @@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct
>>      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);
>>      }
>> @@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(stru
>>      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);
>>      }
>> @@ -476,7 +478,8 @@ static bool us122l_create_card(struct sn
>>      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");
>> @@ -495,7 +498,8 @@ static bool us122l_create_card(struct sn
>>      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);
>> @@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_i
>>      struct snd_card *card;
>>      int err;
>>  
>> -    if (device->descriptor.idProduct == USB_ID_US144
>> +    if ((device->descriptor.idProduct == USB_ID_US144 ||
>> +        us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
>>          && device->speed == USB_SPEED_HIGH) {
>>          snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
>>          return -ENODEV;
>> @@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_
>>  
>>      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");
>> @@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_u
>>          .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 */ }
>>  };
>>  
>> diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h 
>> alsa-driver/alsa-kernel/usb/usx2y/us122l.h
>> --- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
>> 00:05:40.000000000 +0100
>> +++ alsa-driver/alsa-kernel/usb/usx2y/us122l.h    2009-12-07 
>> 18:44:03.990236199 +0100
>> @@ -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
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
>>     

[-- Attachment #2: delaossa.vcf --]
[-- Type: text/x-vcard, Size: 337 bytes --]

begin:vcard
fn;quoted-printable:Alberto Mart=C3=ADnez de la Ossa
n;quoted-printable:Mart=C3=ADnez de la Ossa;Alberto
org:@ DESY;University of Colorado
adr:;;Notkestrasse 85;Hamburg;;22607;Germany
email;internet:delaossa@mail.desy.de
title:Member, HERMES Collaboration
tel;work:+49-40-8998-4789
x-mozilla-html:TRUE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  2009-12-08 14:04   ` Alberto Martinez de la Ossa
@ 2009-12-08 14:13     ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-12-08 14:13 UTC (permalink / raw)
  To: Alberto Martinez de la Ossa; +Cc: Tobias Hansen, alsa-devel

At Tue, 08 Dec 2009 15:04:36 +0100,
Alberto Martinez de la Ossa wrote:
> 
> Thanks, but..
> Applied where? I have checked the new sources at 
> http://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/alsa-driver/

This GIT tree contains only the build-stub for external module builds.
The real code is found in sound-2.6.git tree.

The snapshot tarball is being update, and will be uploaded soon later.
Wait for a while, and check the URL below:
  ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz


Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
@ 2009-12-10 11:58 Tobias Hansen
  0 siblings, 0 replies; 5+ messages in thread
From: Tobias Hansen @ 2009-12-10 11:58 UTC (permalink / raw)
  To: alsa-devel, delaossa

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

Alberto Martinez de la Ossa wrote:
> Thanks, but..
> Applied where? I have checked the new sources at 
> http://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/alsa-driver/
> And they remain the same with respect to the changes that Tobias made.
> Could you please post the fixed patch, please? I also got errors when 
> trying to apply it.
> 
> Regards,
> Alberto

Sorry, it somehow broke when I copied it into the mail. I'll better attach it now. Several people already reported that, for both US-122MKII and US-144MKII, adding the Product IDs doesn't make them work. But you can give it a try nevertheless and report back whether you had more luck.

Regards, Tobias Hansen


[-- Attachment #2: snd-usb-us122l-MKII-ids.patch --]
[-- Type: text/x-patch, Size: 3457 bytes --]

diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c alsa-driver/alsa-kernel/usb/usx2y/us122l.c
--- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.c	2009-12-07 00:05:40.000000000 +0100
+++ alsa-driver/alsa-kernel/usb/usx2y/us122l.c	2009-12-07 18:50:27.801975964 +0100
@@ -194,7 +194,8 @@ static int usb_stream_hwdep_open(struct 
 	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);
 	}
@@ -209,7 +210,8 @@ static int usb_stream_hwdep_release(stru
 	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);
 	}
@@ -476,7 +478,8 @@ static bool us122l_create_card(struct sn
 	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");
@@ -495,7 +498,8 @@ static bool us122l_create_card(struct sn
 	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);
@@ -597,7 +601,8 @@ static int snd_us122l_probe(struct usb_i
 	struct snd_card *card;
 	int err;
 
-	if (device->descriptor.idProduct == USB_ID_US144
+	if ((device->descriptor.idProduct == USB_ID_US144 ||
+		us122l->dev->descriptor.idProduct == USB_ID_US144MKII)
 		&& device->speed == USB_SPEED_HIGH) {
 		snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n");
 		return -ENODEV;
@@ -692,7 +697,8 @@ static int snd_us122l_resume(struct usb_
 
 	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");
@@ -737,6 +743,16 @@ static struct usb_device_id snd_us122l_u
 		.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 */ }
 };
 
diff -upr alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h alsa-driver/alsa-kernel/usb/usx2y/us122l.h
--- alsa-driver.orig/alsa-kernel/usb/usx2y/us122l.h	2009-12-07 00:05:40.000000000 +0100
+++ alsa-driver/alsa-kernel/usb/usx2y/us122l.h	2009-12-07 18:44:03.990236199 +0100
@@ -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

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-10 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 18:08 [PATCH] snd-usb-us122l: add product IDs of US-122MKII and US-144MKII Tobias Hansen
2009-12-08 13:09 ` Takashi Iwai
2009-12-08 14:04   ` Alberto Martinez de la Ossa
2009-12-08 14:13     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2009-12-10 11:58 Tobias Hansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.