2011/9/15 Guennadi Liakhovetski <g.liakhovetski@xxxxxx>: > On Thu, 15 Sep 2011, Scott Jiang wrote: > >> accually this array is to convert mbus to pixformat. ppi supports any formats. > > You mean, it doesn't distinguish formats? It just packs bytes in RAM > exactly as it ready them from the bus, and doesn't support any formats > natively, i.e., doesn't offer any data processing? > yes, ppi means Parallel Peripheral Interface. >> Ideally it should contain all formats in v4l2, but it is enough at >> present for our platform. >> If I find someone needs more, I will add it. >> So return -EINVAL means this format is out of range, it can't be supported now. > > You might consider using > > drivers/media/video/soc_mediabus.c > > If your driver were using soc-camera, it could benefit from the > dynamically built pixel translation table, see > > drivers/media/video/soc_camera.c::soc_camera_init_user_formats() > > and simpler examples like mx1_camera.c or more complex ones like > sh_mobile_ceu_camera.c, pxa_camera.c or mx3_camera.c and the use of the > soc_camera_xlate_by_fourcc() function in them. > I have considered using soc, but it can't support decoder when I began to write this driver in 2.6.38. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html