Greetings,
I have read some documents about v4l2 driver, however I am still not clear about how to deal with our following application scenario.
We have a custom design with dm814x/dm816x with a HDMI Rx on the board.
The I2C of HDMI Rx will be taken care of by a microcontroller, so I do not need actually write the sub-driver for the hdmi chip.
My HDMI Rx will give me hsync, vsync, DE signals.
There is a TI wiki shows us how to add external decoders, however after reading it carefully I am still confused about what I should do.
Here are my questions:
1. if I donot need write the registers of our hdmi rx via I2C, what should I change in ti81xx_fb.c to let Davinci Soc can recognize video and sync data ?
Hardik once told me in the other thread that the place where master driver and subdriver hooked up is in ti81xx_fb.c.
And the bold places should be modified if using a different decoder. As far as I undersood, there only give the master driver the I2C address of tvp7002.
This " .platform_data = &tvp7002_pdata" just define the polarities of hsync, vsync, de etc.
struct ti81xxvin_interface tvp7002_pdata = {
.clk_polarity = 0,
.hs_polarity = 0,
.vs_polarity = 1,
.fid_polarity = 0,
.sog_polarity = 0,
};
static struct ti81xxvin_subdev_info hdvpss_capture_sdev_info[] = {
{
.name = TVP7002_INST0,
.board_info = {
/* TODO Find the correct address
of the TVP7002 connected */
I2C_BOARD_INFO("tvp7002", 0x5d),
.platform_data = &tvp7002_pdata,
},
Let's say if i want to support RGB24 bit- discrete sync mode of my hdmi rx, the following codes should be change. Please correct me or remind me if any other changes is required.
ti81xx_fb.c:
hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.ctrlChanSel=VPS_VIP_CTRL_CHAN_DONT_CARE.
hdvpss_capture_sdev_info[ 0].vip_port_cfg.video_capture_mode=VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_DISCRETE_SYNC_HSYNC_VSYNC. hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.video_if_mode=VSP_CAPT_VIDEO_IF_MODE_24BIT.
hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.input_data_format= FVID2_DF_RGB24_888.
2. Where exactly is the place tvp7002.ko used?
To keep the changes of driver minimum, I am going to just empty tvp7002.c to let it serve as a dummy driver. The reason for that is our hdmi rx will be wrote by an external microcontroller. Am I right about this? Any problem with this approach?
I was also wondering which file in the linux kernel used tvp7002.ko? This is the file after recompiling tvp7002.c and should be copied to /targetfs/lib/modules/2.6.37/kernel/drivers/media/video
If later I do need use Davinici to write our HDMI rx registers via I2C, I will have to create v4l2 sub-driver.
Thanks in advance,
Jun