diff options
author | Mark Brown <broonie@linaro.org> | 2014-01-14 20:41:53 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-14 20:41:53 +0000 |
commit | 64a9aa9cf57dd551a9ae9bf48f5e63be608aae72 (patch) | |
tree | d5776aa6b85c7a0c4fa3565bd3881f9607c293dc /sound/usb/endpoint.c | |
parent | 16d7ea9167839d0b971ab29030886280595dd5fc (diff) | |
parent | 374b105797c3d4f29c685f3be535c35f5689b30e (diff) |
Merge tag 'v3.13-rc3' into asoc-pcm
Linux 3.13-rc3
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r-- | sound/usb/endpoint.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index b9ba0fcc45d..83aabea259d 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -636,8 +636,22 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep, if (usb_pipein(ep->pipe) || snd_usb_endpoint_implicit_feedback_sink(ep)) { + 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(ep->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, packs_per_ms); + urb_packs = min(max_packs_per_urb, urb_packs); while (urb_packs > 1 && urb_packs * maxsize >= period_bytes) urb_packs >>= 1; ep->nurbs = MAX_URBS; |