Re: [alsa-devel] [PATCH] sound: usb: USB3 Super Speed patch
Paul Zimmerman wrote:
This patch adds Super Speed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to all the places that check for the USB speed.
+++ b/sound/usb/midi.c @@ -834,7 +834,8 @@ static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep, +++ b/sound/usb/misc/ua101.c +++ b/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/usb_stream.c
These devices do not support super speed.
+++ b/sound/usb/pcm.c
- if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH)
- if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH &&
/* full speed devices have fixed data packet interval */ ptmin = 1000;snd_usb_get_speed(subs->dev) != USB_SPEED_SUPER)
In places like this, it would be better to write something like if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL) or if (snd_usb_get_speed(subs->dev) < USB_SPEED_HIGH)
Regards, Clemens
On Wed, Aug 11, 2010 at 08:58:29AM +0200, Clemens Ladisch wrote:
Paul Zimmerman wrote:
This patch adds Super Speed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to all the places that check for the USB speed.
Can we see the full patch on this list, please?
Just curious - did you actually test the driver with a SuperSpeed capable USB audio device? Which device was that?
Thanks, Daniel
At Wed, 11 Aug 2010 09:34:43 +0200, Daniel Mack wrote:
On Wed, Aug 11, 2010 at 08:58:29AM +0200, Clemens Ladisch wrote:
Paul Zimmerman wrote:
This patch adds Super Speed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to all the places that check for the USB speed.
Can we see the full patch on this list, please?
It was sent to linux-usb ML, apparently. I'll forward his post to alsa-devel ML.
Just curious - did you actually test the driver with a SuperSpeed capable USB audio device? Which device was that?
It's described in the patch comment.
Takashi
From: Daniel Mack [mailto:daniel@caiaq.de] On Wed, Aug 11, 2010 at 08:58:29AM +0200, Clemens Ladisch wrote:
Paul Zimmerman wrote:
This patch adds Super Speed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to all the places that check for the USB speed.
Can we see the full patch on this list, please?
OK, when I resend the patch I will copy alsa-devel.
Just curious - did you actually test the driver with a SuperSpeed capable USB audio device? Which device was that?
It's the Synopsys SuperSpeed USB3 device core, on an FPGA PCI development board. The audio device implementation is not a real product, just a test platform. To implement it, we used the audio gadget driver with some mods to support USB3.
Thanks, Daniel
On Wed, Aug 11, 2010 at 08:58:29AM +0200, Clemens Ladisch wrote:
Paul Zimmerman wrote:
This patch adds Super Speed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to all the places that check for the USB speed.
+++ b/sound/usb/midi.c @@ -834,7 +834,8 @@ static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep, +++ b/sound/usb/misc/ua101.c +++ b/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/usb_stream.c
These devices do not support super speed.
+++ b/sound/usb/pcm.c
- if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH)
- if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH &&
/* full speed devices have fixed data packet interval */ ptmin = 1000;snd_usb_get_speed(subs->dev) != USB_SPEED_SUPER)
In places like this, it would be better to write something like if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL) or if (snd_usb_get_speed(subs->dev) < USB_SPEED_HIGH)
Yep, or reconstruct the code to use switch-case statements.
Other than that, the patch looks fine to me.
Thanks, Daniel
OK, I will respin the patch.
participants (4)
-
Clemens Ladisch
-
Daniel Mack
-
Paul Zimmerman
-
Takashi Iwai