Commit fa15f5ec authored by Itai Nahshon's avatar Itai Nahshon Committed by Jeff Garzik

Fix via audio recording, when frag size < page size.

parent ec9e8eb6
......@@ -2049,7 +2049,7 @@ static ssize_t via_dsp_do_read (struct via_info *card,
while ((count > 0) && (chan->slop_len < chan->frag_size)) {
size_t slop_left = chan->frag_size - chan->slop_len;
void *base = chan->pgtbl[n / (PAGE_SIZE / chan->frag_size)].cpuaddr;
unsigned ofs = n % (PAGE_SIZE / chan->frag_size);
unsigned ofs = (n % (PAGE_SIZE / chan->frag_size)) * chan->frag_size;
size = (count < slop_left) ? count : slop_left;
if (copy_to_user (userbuf,
......
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