usX2Y_error_urb_status(usX2Y, subs, urb);
return;
}
- if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame))
+ if (likely(urb->start_frame == usX2Y->wait_iso_frame))
subs->completed_urb = urb;
else {
usX2Y_error_sequence(usX2Y, subs, urb);
atomic_read(&capsubs->state) >= state_PREPARED &&
(playbacksubs->completed_urb ||
atomic_read(&playbacksubs->state) < state_PREPARED)) {
- if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) {
- if (nr_of_packs() <= urb->start_frame &&
- urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci
- usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs();
- else
- usX2Y->wait_iso_frame += nr_of_packs();
- } else {
+ if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame))
+ usX2Y->wait_iso_frame += nr_of_packs();
+ else {
snd_printdd("\n");
usX2Y_clients_stop(usX2Y);
}
if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
goto start;
}
- usX2Y->wait_iso_frame = -1;
start:
usX2Y_subs_startup(subs);
snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err);
err = -EPIPE;
goto cleanup;
- } else {
- if (0 > usX2Y->wait_iso_frame)
+ } else
+ if (i == 0)
usX2Y->wait_iso_frame = urb->start_frame;
- }
urb->transfer_flags = 0;
} else {
atomic_set(&subs->state, state_STARTING1);
usX2Y_error_urb_status(usX2Y, subs, urb);
return;
}
- if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame))
+ if (likely(urb->start_frame == usX2Y->wait_iso_frame))
subs->completed_urb = urb;
else {
usX2Y_error_sequence(usX2Y, subs, urb);
if (capsubs->completed_urb && atomic_read(&capsubs->state) >= state_PREPARED &&
(NULL == capsubs2 || capsubs2->completed_urb) &&
(playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) {
- if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) {
- if (nr_of_packs() <= urb->start_frame &&
- urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci
- usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs();
- else
- usX2Y->wait_iso_frame += nr_of_packs();
- } else {
+ if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame))
+ usX2Y->wait_iso_frame += nr_of_packs();
+ else {
snd_printdd("\n");
usX2Y_clients_stop(usX2Y);
}
if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED)
goto start;
}
- usX2Y->wait_iso_frame = -1;
start:
usX2Y_usbpcm_subs_startup(subs);
goto cleanup;
} else {
snd_printdd("%i\n", urb->start_frame);
- if (0 > usX2Y->wait_iso_frame)
+ if (u == 0)
usX2Y->wait_iso_frame = urb->start_frame;
}
urb->transfer_flags = 0;