aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-28 11:07:12 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:05:32 -0400
commitf4071b85ea0ca3bd06f63c330562b4cfdffa8473 (patch)
tree8390a1bb512949e9520f65de160e1e7291a4c36f /drivers/media/video/ivtv/ivtv-driver.h
parent3562c43be8cfd6e300508d7c33acebf3369eacd3 (diff)
V4L/DVB (6046): ivtv: always steal full frames if out of buffers.
When there are no more free buffers, then buffers are stolen from the predma queue. Buffers should be stolen from the head of that queue (which is where the most recently added buffers are) and all buffers belonging to a frame should be stolen. Otherwise 'half-frames' would remain in the queue, which leads to ugly playback and complete sync failure for YUV buffers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 0a1c16ad10bb..f5de2fd01b1a 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -356,7 +356,7 @@ struct ivtv_mailbox_data {
356}; 356};
357 357
358/* per-buffer bit flags */ 358/* per-buffer bit flags */
359#define IVTV_F_B_NEED_BUF_SWAP 0 /* this buffer should be byte swapped */ 359#define IVTV_F_B_NEED_BUF_SWAP (1 << 0) /* this buffer should be byte swapped */
360 360
361/* per-stream, s_flags */ 361/* per-stream, s_flags */
362#define IVTV_F_S_DMA_PENDING 0 /* this stream has pending DMA */ 362#define IVTV_F_S_DMA_PENDING 0 /* this stream has pending DMA */
@@ -437,7 +437,8 @@ struct ivtv_dma_page_info {
437struct ivtv_buffer { 437struct ivtv_buffer {
438 struct list_head list; 438 struct list_head list;
439 dma_addr_t dma_handle; 439 dma_addr_t dma_handle;
440 unsigned long b_flags; 440 unsigned short b_flags;
441 unsigned short dma_xfer_cnt;
441 char *buf; 442 char *buf;
442 443
443 u32 bytesused; 444 u32 bytesused;
@@ -487,6 +488,10 @@ struct ivtv_stream {
487 struct ivtv_queue q_dma; /* waiting for DMA */ 488 struct ivtv_queue q_dma; /* waiting for DMA */
488 struct ivtv_queue q_predma; /* waiting for DMA */ 489 struct ivtv_queue q_predma; /* waiting for DMA */
489 490
491 /* DMA xfer counter, buffers belonging to the same DMA
492 xfer will have the same dma_xfer_cnt. */
493 u16 dma_xfer_cnt;
494
490 /* Base Dev SG Array for cx23415/6 */ 495 /* Base Dev SG Array for cx23415/6 */
491 struct ivtv_SG_element *SGarray; 496 struct ivtv_SG_element *SGarray;
492 struct ivtv_SG_element *PIOarray; 497 struct ivtv_SG_element *PIOarray;