aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/solo6x10
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khalasa@piap.pl>2011-02-11 13:10:30 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 12:37:02 -0800
commit98ab1c9978f706c0ee081335f75636db22723307 (patch)
treeebc838483c1291e217454914c94cdaef395e3bcc /drivers/staging/solo6x10
parent97a6688aa240e8b72aa5bf6c4a7c2b09bb117342 (diff)
downloadkernel_samsung_smdk4412-98ab1c9978f706c0ee081335f75636db22723307.zip
kernel_samsung_smdk4412-98ab1c9978f706c0ee081335f75636db22723307.tar.gz
kernel_samsung_smdk4412-98ab1c9978f706c0ee081335f75636db22723307.tar.bz2
staging: Solo6x10: accept WxH >= screen dimentions.
This makes it possible to request full resolution (704x576 or 704x480) independently of the color system used (PAL or NTSC). Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/solo6x10')
-rw-r--r--drivers/staging/solo6x10/solo6010-v4l2-enc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/solo6x10/solo6010-v4l2-enc.c b/drivers/staging/solo6x10/solo6010-v4l2-enc.c
index 7bbb940..2b3d30b 100644
--- a/drivers/staging/solo6x10/solo6010-v4l2-enc.c
+++ b/drivers/staging/solo6x10/solo6010-v4l2-enc.c
@@ -1034,13 +1034,17 @@ static int solo_enc_try_fmt_cap(struct file *file, void *priv,
if (pix->width != solo_enc->width ||
pix->height != solo_enc->height)
return -EBUSY;
- } else if (!(pix->width == solo_dev->video_hsize &&
- pix->height == solo_dev->video_vsize << 1) &&
- !(pix->width == solo_dev->video_hsize >> 1 &&
- pix->height == solo_dev->video_vsize)) {
+ }
+
+ if (pix->width < solo_dev->video_hsize ||
+ pix->height < solo_dev->video_vsize << 1) {
/* Default to CIF 1/2 size */
pix->width = solo_dev->video_hsize >> 1;
pix->height = solo_dev->video_vsize;
+ } else {
+ /* Full frame */
+ pix->width = solo_dev->video_hsize;
+ pix->height = solo_dev->video_vsize << 1;
}
if (pix->field == V4L2_FIELD_ANY)