lkml.org 
[lkml]   [2011]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 1/7] 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>

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)
--
Krzysztof Halasa

Research Institute for Automation and Measurements
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-02-11 13:19    [W:0.509 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site