diff options
author | Steven Toth <stoth@kernellabs.com> | 2011-10-10 10:09:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-14 16:11:42 -0400 |
commit | af76e9f625b235f46d2a2002c4102f6f1249dcf4 (patch) | |
tree | d986cb0fc62bb53bfb4e87884078a977a7a08118 /drivers/media/video/cx23885 | |
parent | 5ab27e6d31be4a794a44477b94aa56dd625eb0f2 (diff) |
[media] cx23885: Ensure the VBI pixel format is established correctly
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index cb9e05f92feb..a182e829c8d0 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -78,7 +78,7 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes"); | |||
78 | /* static data */ | 78 | /* static data */ |
79 | 79 | ||
80 | #define FORMAT_FLAGS_PACKED 0x01 | 80 | #define FORMAT_FLAGS_PACKED 0x01 |
81 | 81 | #if 0 | |
82 | static struct cx23885_fmt formats[] = { | 82 | static struct cx23885_fmt formats[] = { |
83 | { | 83 | { |
84 | .name = "8 bpp, gray", | 84 | .name = "8 bpp, gray", |
@@ -132,6 +132,23 @@ static struct cx23885_fmt formats[] = { | |||
132 | .flags = FORMAT_FLAGS_PACKED, | 132 | .flags = FORMAT_FLAGS_PACKED, |
133 | }, | 133 | }, |
134 | }; | 134 | }; |
135 | #else | ||
136 | static struct cx23885_fmt formats[] = { | ||
137 | { | ||
138 | #if 0 | ||
139 | .name = "4:2:2, packed, UYVY", | ||
140 | .fourcc = V4L2_PIX_FMT_UYVY, | ||
141 | .depth = 16, | ||
142 | .flags = FORMAT_FLAGS_PACKED, | ||
143 | }, { | ||
144 | #endif | ||
145 | .name = "4:2:2, packed, YUYV", | ||
146 | .fourcc = V4L2_PIX_FMT_YUYV, | ||
147 | .depth = 16, | ||
148 | .flags = FORMAT_FLAGS_PACKED, | ||
149 | } | ||
150 | }; | ||
151 | #endif | ||
135 | 152 | ||
136 | static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc) | 153 | static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc) |
137 | { | 154 | { |
@@ -141,7 +158,12 @@ static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc) | |||
141 | if (formats[i].fourcc == fourcc) | 158 | if (formats[i].fourcc == fourcc) |
142 | return formats+i; | 159 | return formats+i; |
143 | 160 | ||
144 | printk(KERN_ERR "%s(0x%08x) NOT FOUND\n", __func__, fourcc); | 161 | printk(KERN_ERR "%s(%c%c%c%c) NOT FOUND\n", __func__, |
162 | (fourcc & 0xff), | ||
163 | ((fourcc >> 8) & 0xff), | ||
164 | ((fourcc >> 16) & 0xff), | ||
165 | ((fourcc >> 24) & 0xff) | ||
166 | ); | ||
145 | return NULL; | 167 | return NULL; |
146 | } | 168 | } |
147 | 169 | ||
@@ -750,7 +772,7 @@ static int video_open(struct file *file) | |||
750 | fh->type = type; | 772 | fh->type = type; |
751 | fh->width = 320; | 773 | fh->width = 320; |
752 | fh->height = 240; | 774 | fh->height = 240; |
753 | fh->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24); | 775 | fh->fmt = format_by_fourcc(V4L2_PIX_FMT_YUYV); |
754 | 776 | ||
755 | videobuf_queue_sg_init(&fh->vidq, &cx23885_video_qops, | 777 | videobuf_queue_sg_init(&fh->vidq, &cx23885_video_qops, |
756 | &dev->pci->dev, &dev->slock, | 778 | &dev->pci->dev, &dev->slock, |