From 0336960fd58e328a1a3c7c2806750f2b1fe78ba0 Mon Sep 17 00:00:00 2001 From: ddl Date: Tue, 6 Dec 2011 18:21:55 +0800 Subject: [PATCH] camera: add support query 480p framerate --- arch/arm/mach-rk29/board-rk29-ddr3sdk.c | 2 ++ drivers/media/video/rk29_camera.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c index 4c17cb64c1ad..009ac46536f1 100755 --- a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c +++ b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c @@ -85,6 +85,7 @@ #define CONFIG_SENSOR_QVGA_FPS_FIXED_0 15 #define CONFIG_SENSOR_CIF_FPS_FIXED_0 15 #define CONFIG_SENSOR_VGA_FPS_FIXED_0 15 +#define CONFIG_SENSOR_480P_FPS_FIXED_0 15 #define CONFIG_SENSOR_SVGA_FPS_FIXED_0 15 #define CONFIG_SENSOR_720P_FPS_FIXED_0 30 @@ -105,6 +106,7 @@ #define CONFIG_SENSOR_QVGA_FPS_FIXED_1 15 #define CONFIG_SENSOR_CIF_FPS_FIXED_1 15 #define CONFIG_SENSOR_VGA_FPS_FIXED_1 15 +#define CONFIG_SENSOR_480P_FPS_FIXED_1 15 #define CONFIG_SENSOR_SVGA_FPS_FIXED_1 15 #define CONFIG_SENSOR_720P_FPS_FIXED_1 30 diff --git a/drivers/media/video/rk29_camera.c b/drivers/media/video/rk29_camera.c index 1c957a71687d..ecfca2e59ca3 100755 --- a/drivers/media/video/rk29_camera.c +++ b/drivers/media/video/rk29_camera.c @@ -1382,6 +1382,17 @@ static int rk29_sensor_io_init(void) j++; #endif + #if CONFIG_SENSOR_480P_FPS_FIXED_0 + rk29_camera_platform_data.info[i].fival[j].discrete.denominator = CONFIG_SENSOR_480P_FPS_FIXED_0; + rk29_camera_platform_data.info[i].fival[j].discrete.numerator= 1; + rk29_camera_platform_data.info[i].fival[j].index = 0; + rk29_camera_platform_data.info[i].fival[j].pixel_format = V4L2_PIX_FMT_NV12; + rk29_camera_platform_data.info[i].fival[j].width = 720; + rk29_camera_platform_data.info[i].fival[j].height = 480; + rk29_camera_platform_data.info[i].fival[j].type = V4L2_FRMIVAL_TYPE_DISCRETE; + j++; + #endif + #if CONFIG_SENSOR_SVGA_FPS_FIXED_0 rk29_camera_platform_data.info[i].fival[j].discrete.denominator = CONFIG_SENSOR_SVGA_FPS_FIXED_0; rk29_camera_platform_data.info[i].fival[j].discrete.numerator= 1; @@ -1449,6 +1460,17 @@ static int rk29_sensor_io_init(void) j++; #endif + #if CONFIG_SENSOR_480P_FPS_FIXED_1 + rk29_camera_platform_data.info[i].fival[j].discrete.denominator = CONFIG_SENSOR_480P_FPS_FIXED_1; + rk29_camera_platform_data.info[i].fival[j].discrete.numerator= 1; + rk29_camera_platform_data.info[i].fival[j].index = 0; + rk29_camera_platform_data.info[i].fival[j].pixel_format = V4L2_PIX_FMT_NV12; + rk29_camera_platform_data.info[i].fival[j].width = 720; + rk29_camera_platform_data.info[i].fival[j].height = 480; + rk29_camera_platform_data.info[i].fival[j].type = V4L2_FRMIVAL_TYPE_DISCRETE; + j++; + #endif + #if CONFIG_SENSOR_SVGA_FPS_FIXED_1 rk29_camera_platform_data.info[i].fival[j].discrete.denominator = CONFIG_SENSOR_SVGA_FPS_FIXED_1; rk29_camera_platform_data.info[i].fival[j].discrete.numerator= 1; -- 2.34.1