From ef99179710d6ec04d6783afdf8387523c7087920 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Thu, 31 Dec 2009 18:27:13 -0300 Subject: V4L/DVB (13907): cx18: Perform automatic rotation of very old, unread IDX buffers According to the v4l2 spec, very old MPEG index entries needs to be discarded in favor of newer index entries. This change ensures the firmware always has buffers for index entries at the expense of the oldest unread buffers. Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx18/cx18-mailbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/media/video/cx18/cx18-mailbox.c') diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c index f231dd09c72..0ac0e2c993a 100644 --- a/drivers/media/video/cx18/cx18-mailbox.c +++ b/drivers/media/video/cx18/cx18-mailbox.c @@ -223,8 +223,11 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) CX18_DEBUG_HI_DMA("%s recv bytesused = %d\n", s->name, mdl->bytesused); - if (s->type != CX18_ENC_STREAM_TYPE_TS) + if (s->type != CX18_ENC_STREAM_TYPE_TS) { cx18_enqueue(s, mdl, &s->q_full); + if (s->type == CX18_ENC_STREAM_TYPE_IDX) + cx18_stream_rotate_idx_mdls(cx); + } else { cx18_mdl_send_to_dvb(s, mdl); cx18_enqueue(s, mdl, &s->q_free); -- cgit