From: Stefan Hajnoczi <[email protected]>

The playback urb transfer buffer calculation does not factor in
LINE6_ISO_PACKETS.  Buffer memory is organized like this in the driver:

  Buffer 0                 Buffer 1                 ...
  [Packet 0, Packet 1, ...][Packet 0, Packet 1, ...][Packet 0, ...]

However, we're lucky that LINE6_ISO_PACKETS is currently defined as 1 so
this patch does not change any behavior.  It's still worth including
this fix in case the LINE6_ISO_PACKETS value is changed in the future.

Signed-off-by: Stefan Hajnoczi <[email protected]>
---
 playback.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/playback.c b/playback.c
index c39d1f0..f43f55b 100644
--- a/playback.c
+++ b/playback.c
@@ -192,7 +192,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm 
*line6pcm)
        urb_frames = urb_size / bytes_per_frame;
        urb_out->transfer_buffer =
            line6pcm->buffer_out +
-           line6pcm->max_packet_size * line6pcm->index_out;
+           LINE6_ISO_PACKETS * line6pcm->max_packet_size * line6pcm->index_out;
        urb_out->transfer_buffer_length = urb_size;
        urb_out->context = line6pcm;
 
-- 
1.7.7.3


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Line6linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/line6linux-devel

Reply via email to