Hi,

when you try to set a format in the pipeline, the sensor gets asked if
he can support this solution.

static int xxx_get_format(struct v4l2_subdev *subdev,
                              struct v4l2_subdev_fh *fh,
                              struct v4l2_subdev_format *fmt)
{

struct v4l2_mbus_framefmt format;

format.code = V4L2_MBUS_FMT_SGRBG10_1X10;
format.width = MT9P031_MAX_WIDTH;
format.height = MT9P031_MAX_HEIGHT;
format.field = V4L2_FIELD_NONE;
format.colorspace = V4L2_COLORSPACE_SRGB;

fmt->format = format;
}


This is a simplified version of what you might need. Look the
mechanisms up in other code samples.
The function must be registered in
static struct v4l2_subdev_pad_ops framix_subdev_pad_ops = {
        .enum_mbus_code = mt9t001_enum_mbus_code,
        .enum_frame_size = mt9t001_enum_frame_size,
        .get_fmt = xxx_get_format,   <========================
        .set_fmt = mt9t001_set_format,
        .get_crop = mt9t001_get_crop,
        .set_crop = mt9t001_set_crop,
};


cheers,

 Bastian


2011/2/28 Loïc Akue <akue.l...@gmail.com>:
> Hi,
>
> Thank you for your reply,
>
> I finally solved my problem. My saa7113 driver code wasn't fully adapted to
> work with the new media framework.
> I tried to use the media-ctl and yavta programs for testing. Here are my
> logs :
>
> ************************************************************************************
> ./media-ctl -r -l '"saa7115 3-0024":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP
> CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> Resetting all links to inactive
> Setting up link 16:0 -> 5:0 [1]
> Setting up link 5:1 -> 6:0 [1]
>
> root@cm-t35:~# ./media-ctl -f '"saa7115 3-0024":0[UYVY 720x480], "OMAP3 ISP
> CCDC":2[UYVY 720x480]'
> Setting up format UYVY 720x480 on pad saa7115 3-0024/0
> Unable to set format: Invalid argument (-22)
>
> ************************************************************************************
> Could it be due to a lack of information provided by my saa7113 driver, or
> is it due to a bad understanding of the media-ctl app.
>
> Regards
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to