Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1539
b: refs/heads/master
c: 1149a64
h: refs/heads/master
i:
  1537: 50fc2dc
  1535: 4587caf
v: v3
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed May 29, 2005
1 parent 3c950f1 commit 1677d40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dc40a3cc4778ebcb6212bdb71b48690a153be07
refs/heads/master: 1149a64fe4916fe6fdc8938043a0dc9a6551ab63
12 changes: 7 additions & 5 deletions trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
u->urb->pipe = subs->syncpipe;
u->urb->transfer_flags = URB_ISO_ASAP;
u->urb->number_of_packets = u->packets;
if (snd_usb_get_speed(subs->dev) == USB_SPEED_HIGH)
u->urb->interval = 8;
else
u->urb->interval = 1;
u->urb->interval = 1 << subs->syncinterval;
u->urb->context = u;
u->urb->complete = snd_usb_complete_callback(snd_complete_sync_urb);
}
Expand Down Expand Up @@ -1272,7 +1269,12 @@ static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt)
subs->syncpipe = usb_rcvisocpipe(dev, ep);
else
subs->syncpipe = usb_sndisocpipe(dev, ep);
subs->syncinterval = get_endpoint(alts, 1)->bRefresh;
if (get_endpoint(alts, 1)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
get_endpoint(alts, 1)->bRefresh >= 1 &&
get_endpoint(alts, 1)->bRefresh <= 9)
subs->syncinterval = get_endpoint(alts, 1)->bRefresh;
else
subs->syncinterval = 1;
}

/* always fill max packet size */
Expand Down

0 comments on commit 1677d40

Please sign in to comment.