Commit 42238713 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9d5164da
...@@ -156,10 +156,13 @@ int tm6000_get_reg32 (struct tm6000_core *dev, u8 req, u16 value, u16 index) ...@@ -156,10 +156,13 @@ int tm6000_get_reg32 (struct tm6000_core *dev, u8 req, u16 value, u16 index)
void tm6000_set_fourcc_format(struct tm6000_core *dev) void tm6000_set_fourcc_format(struct tm6000_core *dev)
{ {
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
int val;
val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0) & 0xfc;
if (dev->fourcc == V4L2_PIX_FMT_UYVY) if (dev->fourcc == V4L2_PIX_FMT_UYVY)
tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val);
else else
tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0x90); tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val | 1);
} else { } else {
if (dev->fourcc == V4L2_PIX_FMT_UYVY) if (dev->fourcc == V4L2_PIX_FMT_UYVY)
tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0);
......
...@@ -151,8 +151,8 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q, ...@@ -151,8 +151,8 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q,
/* Cleans up buffer - Usefull for testing for frame/URB loss */ /* Cleans up buffer - Usefull for testing for frame/URB loss */
outp = videobuf_to_vmalloc(&(*buf)->vb); outp = videobuf_to_vmalloc(&(*buf)->vb);
if (outp) // if (outp)
memset(outp, 0, (*buf)->vb.size); // memset(outp, 0, (*buf)->vb.size);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment