On Wednesday 11 November 2009 22:45:15 Karicheri, Muralidharan wrote:
> Hans,
> 
> >> [MK] Could you explain this to me? In my prototype, I had tvp5146 that
> >> implements S_STD and tvp7002 that implements S_PRESET. Since bridge
> >driver
> >> has all the knowledge about the sub devices and their capabilities, it
> >can
> >> set the flag for each of the input that it supports (currently I am
> >> setting this flag in the board setup file that describes all the inputs
> >using v4l2_input structure). So it is a matter of setting relevant cap flag
> >in this file for each of the input based on what the sub device supports. I
> >am not sure how core can figure this out?
> >
> >The problem is that we don't want to go through all drivers in order to set
> >the input/output capability flags. However, v4l2_ioctl.c can easily check
> >whether the v4l2_ioctl_ops struct has set vidioc_s_std, vidioc_s_dv_preset
> >and/or vidioc_s_dv_timings and fill in the caps accordingly. If this is
> >done
> >before the vidioc_enum_input/output is called, then the driver can override
> >what v4l2_ioctl.c did if that is needed.
> >
> 
> Why do we need to do that? Why not leave it to the bridge driver to set that
> flag since it knows all encoder/decoder connected to it and whether current 
> encoder/decoder has support for S_STD or S_PRESET looking at the sub dev ops.
> If we set them at the core, as you explained, then bridge driver needs to
> override it. That is not clean IMO.

Actually, the bridge driver only needs to override if it has multiple inputs
where the capability flags differ (i.e. some inputs only support S_STD and
others only support S_DV_PRESET).

In all other cases the core will fill it in correctly.

Doing it in the core ensures that the capability flags will be filled in so
drivers don't need to remember doing this. The alternative is that you have to
go through ALL existing drivers and add the new SUPPORTS_STD capability flag.

But even then I am pretty certain that people will forget to set this flag
for new upcoming drivers.

So I prefer to have this set in the core and only drivers that have mixed
inputs/outputs need to do a bit more work.

Regards,

        Hans

> 
> Murali
> 
> >Regards,
> >
> >     Hans
> >
> >--
> >Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
> 
> 
> 



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to