diff options
author | Antti Palosaari <crope@iki.fi> | 2013-09-15 12:21:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-09-24 12:30:35 -0400 |
commit | c0c7203640ffed8837fc4484795760eb19814ce8 (patch) | |
tree | eea50dda9775a08e8faa4add3ed2b1fef859086e | |
parent | 4964c9c82878c492f42d5763ec8e98766717a980 (diff) |
[media] msi3101: correct max videobuf2 alloc
There was too small buffers requested in worst case.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/staging/media/msi3101/sdr-msi3101.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 7715c85064d7..4c3bf776bb20 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c | |||
@@ -1131,7 +1131,13 @@ static int msi3101_queue_setup(struct vb2_queue *vq, | |||
1131 | /* Absolute min and max number of buffers available for mmap() */ | 1131 | /* Absolute min and max number of buffers available for mmap() */ |
1132 | *nbuffers = 32; | 1132 | *nbuffers = 32; |
1133 | *nplanes = 1; | 1133 | *nplanes = 1; |
1134 | sizes[0] = PAGE_ALIGN(3 * 3072); /* 3 * 768 * 4 */ | 1134 | /* |
1135 | * 3, wMaxPacketSize 3x 1024 bytes | ||
1136 | * 504, max IQ sample pairs per 1024 frame | ||
1137 | * 2, two samples, I and Q | ||
1138 | * 4, 32-bit float | ||
1139 | */ | ||
1140 | sizes[0] = PAGE_ALIGN(3 * 504 * 2 * 4); /* = 12096 */ | ||
1135 | dev_dbg(&s->udev->dev, "%s: nbuffers=%d sizes[0]=%d\n", | 1141 | dev_dbg(&s->udev->dev, "%s: nbuffers=%d sizes[0]=%d\n", |
1136 | __func__, *nbuffers, sizes[0]); | 1142 | __func__, *nbuffers, sizes[0]); |
1137 | return 0; | 1143 | return 0; |