Hi Hans, On Friday 31 January 2014 09:43:00 Hans Verkuil wrote: > I think you might want to add a check in uvc_queue_setup to verify the > fmt that create_bufs passes. The spec says that: "Unsupported formats > will result in an error". In this case I guess that the format basically > should match the current selected format. > > I'm unhappy with the current implementations of create_bufs (see also this > patch: > http://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg70796.html). > > Nobody is actually checking the format today, which isn't good. > > The fact that the spec says that the fmt field isn't changed by the driver > isn't helping as it invalidated my patch from above, although that can be > fixed. > > I need to think about this some more, but for this particular case you can > just do a memcmp of the v4l2_pix_format against the currently selected > format and return an error if they differ. Unless you want to support > different buffer sizes as well? Isn't the whole point of VIDIOC_CREATE_BUFS being able to create buffers of different resolutions than the current active resolution ? -- 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