aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-video.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c28
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 cb9e05f92fe..a182e829c8d 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
82static struct cx23885_fmt formats[] = { 82static 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
136static 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
136static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc) 153static 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,