aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-05-03 03:25:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:22 -0400
commit4223871357a2b64248b3c41c8d89fbf03c2531ea (patch)
tree04e04b8a80bd6d36f3db1599f59531a3177c37dd
parent9d5164da8d8dd63bfb4e3070a5e27d79af0f1654 (diff)
V4L/DVB: Fix color format with tm6010
The values for the fourcc format were correct, but applied to the wrong register. With this change, video is now barely working again with tm6000. While here, let's remove, for now, the memset. This way, people can have some image when testing this device. Yet to be fixed: parts of the image frame are missed. As we don't clean the buffers anymore, this is "recovered" by repeating the values from a previous frame. The quality is bad, since the image pixels will contain data from some previous frames, generating weird delay artifacts. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/tm6000/tm6000-core.c7
-rw-r--r--drivers/staging/tm6000/tm6000-video.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index 860553ff86e..bfbc53bd291 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
@@ -156,10 +156,13 @@ int tm6000_get_reg32 (struct tm6000_core *dev, u8 req, u16 value, u16 index)
156void tm6000_set_fourcc_format(struct tm6000_core *dev) 156void tm6000_set_fourcc_format(struct tm6000_core *dev)
157{ 157{
158 if (dev->dev_type == TM6010) { 158 if (dev->dev_type == TM6010) {
159 int val;
160
161 val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0) & 0xfc;
159 if (dev->fourcc == V4L2_PIX_FMT_UYVY) 162 if (dev->fourcc == V4L2_PIX_FMT_UYVY)
160 tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); 163 tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val);
161 else 164 else
162 tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0x90); 165 tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val | 1);
163 } else { 166 } else {
164 if (dev->fourcc == V4L2_PIX_FMT_UYVY) 167 if (dev->fourcc == V4L2_PIX_FMT_UYVY)
165 tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); 168 tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0);
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index bed758fe4c3..f694bb8638e 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -151,8 +151,8 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q,
151 151
152 /* Cleans up buffer - Usefull for testing for frame/URB loss */ 152 /* Cleans up buffer - Usefull for testing for frame/URB loss */
153 outp = videobuf_to_vmalloc(&(*buf)->vb); 153 outp = videobuf_to_vmalloc(&(*buf)->vb);
154 if (outp) 154// if (outp)
155 memset(outp, 0, (*buf)->vb.size); 155// memset(outp, 0, (*buf)->vb.size);
156 156
157 return; 157 return;
158} 158}