Hi Guennadi, On Friday 07 January 2011 15:37:35 Guennadi Liakhovetski wrote: > On Fri, 7 Jan 2011, Qing Xu wrote: > > pass VIDIOC_ENUM_FRAMESIZES down to sub device drivers. So far no > > special handling in soc-camera core. > > Hm, no, guess what? I don't think this can work. The parameter, that this > routine gets from the user struct v4l2_frmsizeenum contains a member > pixel_format, which is a fourcc code. Whereas subdevices don't deal with > them, they deal with mediabus codes. It is the same problem as with old > s/g/try/enum_fmt, which we replaced with respective mbus variants. So, we > either have to add our own .enum_mbus_framesizes video subdevice > operation, or we abuse this one, but interpret the pixel_format field as a > media-bus code. > > Currently I only see one subdev driver, that implements this API: > ov7670.c, and it just happily ignores the pixel_format altogether... > > Hans, Laurent, what do you think? Use the pad-level subdev operations, they take a media bus code as argument ;-) > In the soc-camera case you will have to use soc_camera_xlate_by_fourcc() > to convert to media-bus code from fourcc. A nit-pick: please, follow the > style of the file, that you patch and don't add double empty lines between > functions. > > A side question: why do you need this format at all? Is it for some custom > application? What is your use-case, that makes try_fmt / s_fmt > insufficient for you and how does enum_framesizes help you? -- Regards, Laurent Pinchart -- 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