aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorKassey Li <ygli@marvell.com>2011-05-20 03:08:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 10:57:59 -0400
commit64149deb6a9ec35cc8a3ac3e7b5bc19d4a79ff44 (patch)
treea45d7ba4968944b5b2444d42fa7a5cba865724c7 /drivers/media/video
parent3dac322db63473901ba9484690ee6864bb1292d0 (diff)
[media] V4L: soc-camera: add JPEG support
Signed-off-by: Qing Xu <qingx@marvell.com> Signed-off-by: Kassey Lee <ygli@marvell.com> [g.liakhovetski@gmx.de: fixed compiler warning] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/soc_mediabus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/soc_mediabus.c b/drivers/media/video/soc_mediabus.c
index ed77aa055b63..13e86df78e56 100644
--- a/drivers/media/video/soc_mediabus.c
+++ b/drivers/media/video/soc_mediabus.c
@@ -130,6 +130,13 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = {
130 .packing = SOC_MBUS_PACKING_2X8_PADLO, 130 .packing = SOC_MBUS_PACKING_2X8_PADLO,
131 .order = SOC_MBUS_ORDER_BE, 131 .order = SOC_MBUS_ORDER_BE,
132 }, 132 },
133 [MBUS_IDX(JPEG_1X8)] = {
134 .fourcc = V4L2_PIX_FMT_JPEG,
135 .name = "JPEG",
136 .bits_per_sample = 8,
137 .packing = SOC_MBUS_PACKING_VARIABLE,
138 .order = SOC_MBUS_ORDER_LE,
139 },
133}; 140};
134 141
135int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf) 142int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf)
@@ -141,6 +148,8 @@ int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf)
141 case SOC_MBUS_PACKING_2X8_PADHI: 148 case SOC_MBUS_PACKING_2X8_PADHI:
142 case SOC_MBUS_PACKING_2X8_PADLO: 149 case SOC_MBUS_PACKING_2X8_PADLO:
143 return 2; 150 return 2;
151 case SOC_MBUS_PACKING_VARIABLE:
152 return 0;
144 } 153 }
145 return -EINVAL; 154 return -EINVAL;
146} 155}
@@ -155,6 +164,8 @@ s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf)
155 case SOC_MBUS_PACKING_2X8_PADLO: 164 case SOC_MBUS_PACKING_2X8_PADLO:
156 case SOC_MBUS_PACKING_EXTEND16: 165 case SOC_MBUS_PACKING_EXTEND16:
157 return width * 2; 166 return width * 2;
167 case SOC_MBUS_PACKING_VARIABLE:
168 return 0;
158 } 169 }
159 return -EINVAL; 170 return -EINVAL;
160} 171}