Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250293
b: refs/heads/master
c: e9ceece
h: refs/heads/master
i:
  250291: c97e962
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent bf20a35 commit 76981e4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 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: 93f116d595e9aa7dca5f6507376d6995f217d420
refs/heads/master: e9ceeced6feb6f072d59b87fe5a47c37e2b50d51
41 changes: 30 additions & 11 deletions trunk/drivers/media/video/omap1_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,63 +990,80 @@ static void omap1_cam_remove_device(struct soc_camera_device *icd)
}

/* Duplicate standard formats based on host capability of byte swapping */
static const struct soc_mbus_pixelfmt omap1_cam_formats[] = {
[V4L2_MBUS_FMT_UYVY8_2X8] = {
static const struct soc_mbus_lookup omap1_cam_formats[] = {
{
.code = V4L2_MBUS_FMT_UYVY8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_YUYV,
.name = "YUYV",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_VYUY8_2X8] = {
}, {
.code = V4L2_MBUS_FMT_VYUY8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_YVYU,
.name = "YVYU",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_YUYV8_2X8] = {
}, {
.code = V4L2_MBUS_FMT_YUYV8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_UYVY,
.name = "UYVY",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_YVYU8_2X8] = {
}, {
.code = V4L2_MBUS_FMT_YVYU8_2X8,
.fmt = {
.fourcc = V4L2_PIX_FMT_VYUY,
.name = "VYUY",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE] = {
}, {
.code = V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB555,
.name = "RGB555",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE] = {
}, {
.code = V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB555X,
.name = "RGB555X",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_RGB565_2X8_BE] = {
}, {
.code = V4L2_MBUS_FMT_RGB565_2X8_BE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB565,
.name = "RGB565",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
[V4L2_MBUS_FMT_RGB565_2X8_LE] = {
}, {
.code = V4L2_MBUS_FMT_RGB565_2X8_LE,
.fmt = {
.fourcc = V4L2_PIX_FMT_RGB565X,
.name = "RGB565X",
.bits_per_sample = 8,
.packing = SOC_MBUS_PACKING_2X8_PADHI,
.order = SOC_MBUS_ORDER_BE,
},
},
};

static int omap1_cam_get_formats(struct soc_camera_device *icd,
Expand Down Expand Up @@ -1085,12 +1102,14 @@ static int omap1_cam_get_formats(struct soc_camera_device *icd,
case V4L2_MBUS_FMT_RGB565_2X8_LE:
formats++;
if (xlate) {
xlate->host_fmt = &omap1_cam_formats[code];
xlate->host_fmt = soc_mbus_find_fmtdesc(code,
omap1_cam_formats,
ARRAY_SIZE(omap1_cam_formats));
xlate->code = code;
xlate++;
dev_dbg(dev,
"%s: providing format %s as byte swapped code #%d\n",
__func__, omap1_cam_formats[code].name, code);
__func__, xlate->host_fmt->name, code);
}
default:
if (xlate)
Expand Down

0 comments on commit 76981e4

Please sign in to comment.