aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>2010-08-13 15:42:07 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-14 04:30:08 -0400
commit4f4e8f69895c8696a4bcc751817d4b186023ac44 (patch)
tree602ca69d763218a50cfab862169e8194be191b5e /sound/usb/pcm.c
parent31cbd97726207b483a1731562559fabd4e2efdd0 (diff)
ALSA: usb: USB3 SuperSpeed sound support
This is V2 of the patch, after feedback from Clemens and Daniel. This patch adds SuperSpeed support to the USB drivers under sound/. It adds tests for USB_SPEED_SUPER to the appropriate places that check for the USB speed. This patch has been tested with our SS USB3 device emulating a set of Yamaha speakers and a Logitech microphone, but with the descriptors modified to add USB3 support. It has also been tested with the real speakers and microphone, to make sure that USB2 devices still work. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 456829882f40..ebd09acd186e 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -467,7 +467,7 @@ static int hw_check_valid_format(struct snd_usb_substream *subs,
467 return 0; 467 return 0;
468 } 468 }
469 /* check whether the period time is >= the data packet interval */ 469 /* check whether the period time is >= the data packet interval */
470 if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH) { 470 if (snd_usb_get_speed(subs->dev) != USB_SPEED_FULL) {
471 ptime = 125 * (1 << fp->datainterval); 471 ptime = 125 * (1 << fp->datainterval);
472 if (ptime > pt->max || (ptime == pt->max && pt->openmax)) { 472 if (ptime > pt->max || (ptime == pt->max && pt->openmax)) {
473 hwc_debug(" > check: ptime %u > max %u\n", ptime, pt->max); 473 hwc_debug(" > check: ptime %u > max %u\n", ptime, pt->max);
@@ -735,7 +735,7 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
735 } 735 }
736 736
737 param_period_time_if_needed = SNDRV_PCM_HW_PARAM_PERIOD_TIME; 737 param_period_time_if_needed = SNDRV_PCM_HW_PARAM_PERIOD_TIME;
738 if (snd_usb_get_speed(subs->dev) != USB_SPEED_HIGH) 738 if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL)
739 /* full speed devices have fixed data packet interval */ 739 /* full speed devices have fixed data packet interval */
740 ptmin = 1000; 740 ptmin = 1000;
741 if (ptmin == 1000) 741 if (ptmin == 1000)