summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-encoder.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 15:09:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 07:54:51 -0200
commit66e1d37884eb43214292ed433fcffb72692c4838 (patch)
treead574a2020c064f80f9d10c109b94f67ee9a5ad9 /drivers/media/video/saa7164/saa7164-encoder.c
parent9230acaac461c492ff9dea24bbe6a7f568b62cf6 (diff)
[media] saa7164: allow the number of encoder buffers to be user configurable
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-encoder.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-encoder.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c
index cedeeece3c3..e340a6e39df 100644
--- a/drivers/media/video/saa7164/saa7164-encoder.c
+++ b/drivers/media/video/saa7164/saa7164-encoder.c
@@ -1316,7 +1316,12 @@ int saa7164_encoder_register(struct saa7164_port *port)
len = port->hw_streamingparams.numberoflines *
port->hw_streamingparams.pitch;
- for (i = 0; i < SAA7164_MAX_ENCODER_BUFFERS; i++) {
+ if (encoder_buffers < 16)
+ encoder_buffers = 16;
+ if (encoder_buffers > 512)
+ encoder_buffers = 512;
+
+ for (i = 0; i < encoder_buffers; i++) {
ubuf = saa7164_buffer_alloc_user(dev, len);
if (ubuf) {