Hi Guennadi,
> First question: you probably also want to patch soc_camera_g_input() and
> soc_camera_enum_input(). But no, I do not know how. The video subdevice
> operations do not seem to provide a way to query subdevice routing
> capabilities, so, I've got no idea how we're supposed to support
> enum_input(). There is a g_input_status() method, but I'm not sure about
> its semantics. Would it return an error like -EINVAL on an unsupported
> index?
>
static int bcap_enum_input(struct file *file, void *priv,
struct v4l2_input *input)
{
struct bcap_device *bcap_dev = video_drvdata(file);
struct bfin_capture_config *config = bcap_dev->cfg;
int ret;
u32 status;
if (input->index >= config->num_inputs)
return -EINVAL;
*input = config->inputs[input->index];
/* get input status */
ret = v4l2_subdev_call(bcap_dev->sd, video, g_input_status, &status);
if (!ret)
input->status = status;
return 0;
}
How about this implementation? I know it's not for soc, but I post it
to give my idea.
Bridge knows the layout, so it doesn't need to query the subdevice.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html