Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271961
b: refs/heads/master
c: af76e9f
h: refs/heads/master
i:
  271959: 15f694e
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 14, 2011
1 parent 470e91b commit 39dfd34
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ab27e6d31be4a794a44477b94aa56dd625eb0f2
refs/heads/master: af76e9f625b235f46d2a2002c4102f6f1249dcf4
28 changes: 25 additions & 3 deletions trunk/drivers/media/video/cx23885/cx23885-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes");
/* static data */

#define FORMAT_FLAGS_PACKED 0x01

#if 0
static struct cx23885_fmt formats[] = {
{
.name = "8 bpp, gray",
Expand Down Expand Up @@ -132,6 +132,23 @@ static struct cx23885_fmt formats[] = {
.flags = FORMAT_FLAGS_PACKED,
},
};
#else
static struct cx23885_fmt formats[] = {
{
#if 0
.name = "4:2:2, packed, UYVY",
.fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16,
.flags = FORMAT_FLAGS_PACKED,
}, {
#endif
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
.flags = FORMAT_FLAGS_PACKED,
}
};
#endif

static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc)
{
Expand All @@ -141,7 +158,12 @@ static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc)
if (formats[i].fourcc == fourcc)
return formats+i;

printk(KERN_ERR "%s(0x%08x) NOT FOUND\n", __func__, fourcc);
printk(KERN_ERR "%s(%c%c%c%c) NOT FOUND\n", __func__,
(fourcc & 0xff),
((fourcc >> 8) & 0xff),
((fourcc >> 16) & 0xff),
((fourcc >> 24) & 0xff)
);
return NULL;
}

Expand Down Expand Up @@ -750,7 +772,7 @@ static int video_open(struct file *file)
fh->type = type;
fh->width = 320;
fh->height = 240;
fh->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24);
fh->fmt = format_by_fourcc(V4L2_PIX_FMT_YUYV);

videobuf_queue_sg_init(&fh->vidq, &cx23885_video_qops,
&dev->pci->dev, &dev->slock,
Expand Down

0 comments on commit 39dfd34

Please sign in to comment.