diff options
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r-- | sound/usb/endpoint.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 647fa054d8b1..a385e85c4650 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -916,8 +916,9 @@ static int endpoint_set_interface(struct snd_usb_audio *chip, ep->iface, altset, ep->ep_num); err = usb_set_interface(chip->dev, ep->iface, altset); if (err < 0) { - usb_audio_err(chip, "%d:%d: usb_set_interface failed (%d)\n", - ep->iface, altset, err); + usb_audio_err_ratelimited( + chip, "%d:%d: usb_set_interface failed (%d)\n", + ep->iface, altset, err); return err; } @@ -1179,22 +1180,8 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep) */ if (usb_pipein(ep->pipe) || ep->implicit_fb_sync) { - urb_packs = packs_per_ms; - /* - * Wireless devices can poll at a max rate of once per 4ms. - * For dataintervals less than 5, increase the packet count to - * allow the host controller to use bursting to fill in the - * gaps. - */ - if (snd_usb_get_speed(chip->dev) == USB_SPEED_WIRELESS) { - int interval = ep->datainterval; - while (interval < 5) { - urb_packs <<= 1; - ++interval; - } - } /* make capture URBs <= 1 ms and smaller than a period */ - urb_packs = min(max_packs_per_urb, urb_packs); + urb_packs = min(max_packs_per_urb, packs_per_ms); while (urb_packs > 1 && urb_packs * maxsize >= ep->cur_period_bytes) urb_packs >>= 1; ep->nurbs = MAX_URBS; |