Commit 83d25e2d authored by Jean-Paul Saman's avatar Jean-Paul Saman

VPFE capture device with TV5150

parent f9d5ef79
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/clk.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/tvp514x.h> #include <media/tvp5150.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -181,14 +181,9 @@ static struct platform_device ntosd2_leds_dev = { ...@@ -181,14 +181,9 @@ static struct platform_device ntosd2_leds_dev = {
}, },
}; };
static struct tvp514x_platform_data tvp5146_pdata = { /* Inputs available at the TVP5150 */
.clk_polarity = 0, #ifdef CONFIG_VIDEO_TVP5150
.hs_polarity = 1, static struct v4l2_input tvp5150_inputs[] = {
.vs_polarity = 1
};
/* Inputs available at the TVP5146 */
static struct v4l2_input tvp5146_inputs[] = {
{ {
.index = 0, .index = 0,
.name = "Composite-rear", .name = "Composite-rear",
...@@ -207,6 +202,19 @@ static struct v4l2_input tvp5146_inputs[] = { ...@@ -207,6 +202,19 @@ static struct v4l2_input tvp5146_inputs[] = {
}, },
{ {
.index = 2, .index = 2,
.name = "S-Video",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 2,
.tuner = 0,
.std = V4L2_STD_ALL,
},
};
#endif
#ifdef CONFIG_VIDEO_TVP7000
static struct v4l2_input tvp7000_inputs[] = {
{
.index = 0,
.name = "Component", .name = "Component",
.type = V4L2_INPUT_TYPE_CAMERA, .type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 2, .audioset = 2,
...@@ -214,30 +222,47 @@ static struct v4l2_input tvp5146_inputs[] = { ...@@ -214,30 +222,47 @@ static struct v4l2_input tvp5146_inputs[] = {
.std = V4L2_STD_ALL, .std = V4L2_STD_ALL,
}, },
}; };
#endif
/* /*
* this is the route info for connecting each input to decoder * this is the route info for connecting each input to decoder
* ouput that goes to vpfe. There is a one to one correspondence * ouput that goes to vpfe. There is a one to one correspondence
* with ntosd2_vpfe_inputs * with tvp5150_inputs
*/ */
static struct vpfe_route tvp5146_routes[] = { #ifdef CONFIG_VIDEO_TVP5150
static struct vpfe_route tvp5150_routes[] = {
{ {
.input = INPUT_CVBS_VI2B, .input = TVP5150_COMPOSITE0,
.output = OUTPUT_10BIT_422_EMBEDDED_SYNC, .output = TVP5150_NORMAL,
}, },
{ {
.input = INPUT_SVIDEO_VI2C_VI1C, .input = TVP5150_COMPOSITE1,
.output = OUTPUT_10BIT_422_EMBEDDED_SYNC, .output = TVP5150_NORMAL,
},
{
.input = TVP5150_SVIDEO,
.output = TVP5150_NORMAL,
}, },
}; };
#endif
#ifdef CONFIG_VIDEO_TVP7000
static struct vpfe_route tvp7000_routes[] = {
{
.input = TVP7000_COMPONENT,
.output = TVP7000_NORMAL_SCREEN,
},
};
#endif
static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = { static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
#ifdef CONFIG_VIDEO_TVP5150
{ {
.name = "tvp5146", .name = "tvp5150",
.grp_id = 0, .grp_id = 0,
.num_inputs = ARRAY_SIZE(tvp5146_inputs), .num_inputs = ARRAY_SIZE(tvp5150_inputs),
.inputs = tvp5146_inputs, .inputs = tvp5150_inputs,
.routes = tvp5146_routes, .routes = tvp5150_routes,
.can_route = 1, .can_route = 1,
.ccdc_if_params = { .ccdc_if_params = {
.if_type = VPFE_BT656, .if_type = VPFE_BT656,
...@@ -245,10 +270,30 @@ static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = { ...@@ -245,10 +270,30 @@ static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
.vdpol = VPFE_PINPOL_POSITIVE, .vdpol = VPFE_PINPOL_POSITIVE,
}, },
.board_info = { .board_info = {
I2C_BOARD_INFO("tvp5146", 0x5d), I2C_BOARD_INFO("tvp5150", 0x5d), // 0x4c
.platform_data = &tvp5146_pdata, .platform_data = NULL,
}, },
}, },
#endif
#ifdef CONFIG_VIDEO_TVP7000
{
.name = "tvp7000",
.grp_id = 0,
.num_inputs = ARRAY_SIZE(tvp7000_inputs),
.inputs = tvp7000_inputs,
.routes = tvp7000_routes,
.can_route = 1,
.ccdc_if_params = {
.if_type = VPFE_BT656,
.hdpol = VPFE_PINPOL_POSITIVE,
.vdpol = VPFE_PINPOL_POSITIVE,
},
.board_info = {
I2C_BOARD_INFO("tvp7000", 0x5c), // 0xfa
.platform_data = NULL, // &tvp7000_pdata,
},
},
#endif
}; };
static struct vpfe_config ntosd2_vpfe_cfg = { static struct vpfe_config ntosd2_vpfe_cfg = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment