aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2007-10-16 02:21:46 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:09 -0500
commitc240ad00af78228726e6301ad6ffc54d3adce2a0 (patch)
tree5dbb5b9336a2ed515987f30f9618101a720caa56 /drivers/media/video/ivtv/ivtv-driver.c
parent9de982d3117a3f83e4e7b14016a1df25b4a693d6 (diff)
V4L/DVB (6712): ivtv: ivtv yuv stream handling change
Currently the yuv output stream buffer is divided into blocks whose size depend on the broadcast standard selected during the driver init phase. However, the standard can be changed after the init phase. This effectively breaks the yuv output stream handler, since it relies on the different yuv planes being block aligned. This patch changes the setup, so that the block size is always the same. The decoder dma function has been modified to cope with the fact that the second yuv plane may no longer be block aligned. The start of the yuv frame must still be at the beginning of a block, so the stream write function has also been modified to ensure this is always true. Also, the stream write function will now initiate a yuv dma transfer as soon as a full frame is ready. It will not wait until the current write request has completed, or the stream buffer becomes full. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> 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.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 04179b7d1af0..48db22cc1bd8 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -970,7 +970,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
970 const struct pci_device_id *pci_id) 970 const struct pci_device_id *pci_id)
971{ 971{
972 int retval = 0; 972 int retval = 0;
973 int yuv_buf_size;
974 int vbi_buf_size; 973 int vbi_buf_size;
975 struct ivtv *itv; 974 struct ivtv *itv;
976 975
@@ -1122,11 +1121,8 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
1122 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_MPG] = 0x08000; 1121 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_MPG] = 0x08000;
1123 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_PCM] = 0x01200; 1122 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_PCM] = 0x01200;
1124 itv->stream_buf_size[IVTV_DEC_STREAM_TYPE_MPG] = 0x10000; 1123 itv->stream_buf_size[IVTV_DEC_STREAM_TYPE_MPG] = 0x10000;
1125 1124 itv->stream_buf_size[IVTV_DEC_STREAM_TYPE_YUV] = 0x10000;
1126 /* 0x15180 == 720 * 480 / 4, 0x19500 == 720 * 576 / 4 */ 1125 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_YUV] = 0x08000;
1127 yuv_buf_size = itv->is_60hz ? 0x15180 : 0x19500;
1128 itv->stream_buf_size[IVTV_DEC_STREAM_TYPE_YUV] = yuv_buf_size / 2;
1129 itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_YUV] = yuv_buf_size / 8;
1130 1126
1131 /* Setup VBI Raw Size. Should be big enough to hold PAL. 1127 /* Setup VBI Raw Size. Should be big enough to hold PAL.
1132 It is possible to switch between PAL and NTSC, so we need to 1128 It is possible to switch between PAL and NTSC, so we need to