Commit cc4f2363 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

USB generic driver
- clear unlink_mask bit in the complete callback.
- make sure to deactivate urbs before starting streams.
parent b5dbb54f
......@@ -576,6 +576,7 @@ static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
int err;
clear_bit(ctx->index, &subs->active_mask);
clear_bit(ctx->index, &subs->unlink_mask);
if (subs->running && subs->ops.retire(subs, substream->runtime, urb))
return;
if (! subs->running) /* can be stopped during retire callback */
......@@ -601,6 +602,7 @@ static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs)
int err;
clear_bit(ctx->index + 16, &subs->active_mask);
clear_bit(ctx->index + 16, &subs->unlink_mask);
if (subs->running && subs->ops.retire_sync(subs, substream->runtime, urb))
return;
if (! subs->running) /* can be stopped during retire callback */
......@@ -1281,6 +1283,9 @@ static int snd_usb_pcm_prepare(snd_pcm_substream_t *substream)
subs->maxframesize = bytes_to_frames(runtime, subs->maxpacksize);
subs->curframesize = bytes_to_frames(runtime, subs->curpacksize);
/* deactivate urbs to be sure */
deactivate_urbs(subs, 0, 0);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment