Signed-off-by: Volokh Konstantin <volokh84@xxxxxxxxx> --- drivers/staging/media/go7007/go7007-v4l2.c | 76 ++++++++++++++++++++++++++++ 1 files changed, 76 insertions(+), 0 deletions(-) diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 66307ea..4ec9b84 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c @@ -612,6 +612,82 @@ static int vidioc_enum_framesizes(struct file *filp, void *priv, { struct go7007 *go = video_drvdata(filp); + if (go->board_id == GO7007_BOARDID_ADLINK_MPG24) { + switch (go->standard) { + case GO7007_STD_NTSC: + switch (fsize->pixel_format) { + case V4L2_PIX_FMT_MJPEG: + case V4L2_PIX_FMT_MPEG: + case V4L2_PIX_FMT_H263: + switch (fsize->index) { + case 0: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 720; + fsize->discrete.height = 480; + break; + case 1: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 640; + fsize->discrete.height = 480; + break; + case 2: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 352; + fsize->discrete.height = 240; + break; + case 3: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 320; + fsize->discrete.height = 240; + break; + case 4: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 176; + fsize->discrete.height = 112; + break; + default: + return -EINVAL; + } + break; + default: + return -EINVAL; + } + break; + case GO7007_STD_PAL: + switch (fsize->pixel_format) { + case V4L2_PIX_FMT_MJPEG: + case V4L2_PIX_FMT_MPEG: + case V4L2_PIX_FMT_H263: + switch (fsize->index) { + case 0: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 720; + fsize->discrete.height = 576; + break; + case 1: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 352; + fsize->discrete.height = 288; + break; + case 2: + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; + fsize->discrete.width = 176; + fsize->discrete.height = 144; + break; + default: + return -EINVAL; + } + break; + default: + return -EINVAL; + } + break; + default: + return -EINVAL; + } + return 0; + } + if (fsize->index > 0) return -EINVAL; -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html