aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-mailbox.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-12-31 16:27:13 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:30 -0500
commitef99179710d6ec04d6783afdf8387523c7087920 (patch)
tree5ebfa7487b704b598195021902239917269c57d0 /drivers/media/video/cx18/cx18-mailbox.c
parent79f3e96018dc55ff7819a6a1ac3740a1d7103589 (diff)
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 <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-mailbox.c')
-rw-r--r--drivers/media/video/cx18/cx18-mailbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c
index f231dd09c720..0ac0e2c993a5 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)
223 CX18_DEBUG_HI_DMA("%s recv bytesused = %d\n", 223 CX18_DEBUG_HI_DMA("%s recv bytesused = %d\n",
224 s->name, mdl->bytesused); 224 s->name, mdl->bytesused);
225 225
226 if (s->type != CX18_ENC_STREAM_TYPE_TS) 226 if (s->type != CX18_ENC_STREAM_TYPE_TS) {
227 cx18_enqueue(s, mdl, &s->q_full); 227 cx18_enqueue(s, mdl, &s->q_full);
228 if (s->type == CX18_ENC_STREAM_TYPE_IDX)
229 cx18_stream_rotate_idx_mdls(cx);
230 }
228 else { 231 else {
229 cx18_mdl_send_to_dvb(s, mdl); 232 cx18_mdl_send_to_dvb(s, mdl);
230 cx18_enqueue(s, mdl, &s->q_free); 233 cx18_enqueue(s, mdl, &s->q_free);