Dear Guennadi > Have you tested with v4l-dvb/v4l2-apps/test/capture_example.c? I think it > wouldn't work, because it first calls S_CROP, and then S_FMT, and even > with this your patch you'd fail S_CROP if S_FMT hadn't been called before > (priv->fmt == NULL). Am I right? hmm.. I would like to ask you about S_CROP on soc_camera. There are a lot of problem for me. at first, sh_mobile_ceu (and pxa_camera too) :: set_fmt is this ----------------------------------------------- xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); if (!xlate) { dev_warn(&ici->dev, "Format %x not found\n", pixfmt); return -EINVAL; } ----------------------------------------------- and soc_camera_xlate_by_fourcc is this ----------------------------------------------- const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc( struct soc_camera_device *icd, unsigned int fourcc) { unsigned int i; for (i = 0; i < icd->num_user_formats; i++) if (icd->user_formats[i].host_fmt->fourcc == fourcc) return icd->user_formats + i; return NULL; } ----------------------------------------------- If pixfmt is 0, it said "Format 0 not found" to me. even if I fixed this problem (and ov772x set_fmt), kernel will run BUG_ON. call trace is this. ------------- soc_camera_qbuf -> videobuf_qbuf -> videobuf_next_field ------------- kernel will run BUG_ON when I use capture_example. ------------------------------------------------- /* Locking: Caller holds q->vb_lock */ enum v4l2_field videobuf_next_field(struct videobuf_queue *q) { enum v4l2_field field = q->field; => BUG_ON(V4L2_FIELD_ANY == field); ------------------------------------------------- If sh_mobile_ceu use V4L2_FIELD_NONE on sh_mobile_ceu_init_videobuf, kernel will not run this BUG_ON. But tw9910 and I want sh_mobile_ceu_init_videobuf to use V4L2_FIELD_ANY. Do you remember this problem ? And capture_example doesn't works even If sh_mobile_ceu_init_videobuf use V4L2_FIELD_NONE. It said "select timeout" to me. I don't know why. what is the best way to us ??? or do I miss understanding ??? > it first calls S_CROP, and then S_FMT In this case, shoud ov772x use defaul color format when S_CROP order ? Best regards -- Kuninori Morimoto -- 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