Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219370
b: refs/heads/master
c: 66e1d37
h: refs/heads/master
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent c4d70f6 commit 40c0371
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9230acaac461c492ff9dea24bbe6a7f568b62cf6
refs/heads/master: 66e1d37884eb43214292ed433fcffb72692c4838
10 changes: 7 additions & 3 deletions trunk/drivers/media/video/saa7164/saa7164-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,21 @@ unsigned int saa_debug;
module_param_named(debug, saa_debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages");

unsigned int encoder_buffers = SAA7164_MAX_ENCODER_BUFFERS;
module_param(encoder_buffers, int, 0644);
MODULE_PARM_DESC(encoder_buffers, "Total buffers in read queue 16-512 def:64");

unsigned int waitsecs = 10;
module_param(waitsecs, int, 0644);
MODULE_PARM_DESC(debug, "timeout on firmware messages");
MODULE_PARM_DESC(waitsecs, "timeout on firmware messages");

static unsigned int card[] = {[0 ... (SAA7164_MAXBOARDS - 1)] = UNSET };
module_param_array(card, int, NULL, 0444);
MODULE_PARM_DESC(card, "card type");

unsigned int print_histogram = 64;
module_param(print_histogram, int, 0644);
MODULE_PARM_DESC(debug, "print histogram values once");
MODULE_PARM_DESC(print_histogram, "print histogram values once");

static unsigned int saa7164_devcount;

Expand Down Expand Up @@ -264,7 +268,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
wake_up_interruptible(&port->wait_read);

} else
printk(KERN_ERR "encirq no free buffers\n");
printk(KERN_ERR "encirq no free buffers, increase param encoder_buffers\n");

/* Ensure offset into buffer remains 0, fill buffer
* with known bad data. */
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/media/video/saa7164/saa7164-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/saa7164/saa7164.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#define SAA7164_MAX_UNITS 8
#define SAA7164_TS_NUMBER_OF_LINES 312
#define SAA7164_PT_ENTRIES 16 /* (312 * 188) / 4096 */
#define SAA7164_MAX_ENCODER_BUFFERS 16
#define SAA7164_MAX_ENCODER_BUFFERS 64 /* max 5secs of latency at 6Mbps */

/* Port related defines */
#define SAA7164_PORT_TS1 (0)
Expand Down Expand Up @@ -433,6 +433,7 @@ struct saa7164_dev {

extern struct list_head saa7164_devlist;
extern unsigned int waitsecs;
extern unsigned int encoder_buffers;

/* ----------------------------------------------------------- */
/* saa7164-core.c */
Expand Down

0 comments on commit 40c0371

Please sign in to comment.