ALSA: USB: adjust for changed 3.8 USB API

The recent changes in the USB API ("implement new semantics for
URB_ISO_ASAP") made the former meaning of the URB_ISO_ASAP flag the
default, and changed this flag to mean that URBs can be delayed.
This is not the behaviour wanted by any of the audio drivers because
it leads to discontinuous playback with very small period sizes.
Therefore, our URBs need to be submitted without this flag.

Reported-by: Joe Rayhawk <jrayhawk@fairlystable.org>
Cc: <stable@vger.kernel.org> # 3.8 only
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
此提交包含在:
Clemens Ladisch
2013-04-27 12:10:32 +02:00
提交者 Takashi Iwai
父節點 fa92dd77ec
當前提交 c75c5ab575
共有 7 個檔案被更改,包括 3 行新增12 行删除

查看文件

@@ -683,7 +683,6 @@ static void read_completed(struct urb *urb)
if (send_it) {
out->number_of_packets = outframe;
out->transfer_flags = URB_ISO_ASAP;
usb_submit_urb(out, GFP_ATOMIC);
} else {
struct snd_usb_caiaq_cb_info *oinfo = out->context;
@@ -699,7 +698,6 @@ requeue:
}
urb->number_of_packets = FRAMES_PER_URB;
urb->transfer_flags = URB_ISO_ASAP;
usb_submit_urb(urb, GFP_ATOMIC);
}
@@ -765,7 +763,6 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret)
* BYTES_PER_FRAME;
urbs[i]->context = &cdev->data_cb_info[i];
urbs[i]->interval = 1;
urbs[i]->transfer_flags = URB_ISO_ASAP;
urbs[i]->number_of_packets = FRAMES_PER_URB;
urbs[i]->complete = (dir == SNDRV_PCM_STREAM_CAPTURE) ?
read_completed : write_completed;