diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2014-03-22 10:01:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 12:11:34 -0300 |
commit | 25c61e4cfc2fc69d62cc07befc075a2883b047a1 (patch) | |
tree | 60d8c4a083fd8f729f8e83d702984feb635ce336 /drivers/media/usb/em28xx/em28xx-video.c | |
parent | cba8e9b32d0dbe206c4ba60581f7e9a0981214b2 (diff) | |
download | blackbird-op-linux-25c61e4cfc2fc69d62cc07befc075a2883b047a1.tar.gz blackbird-op-linux-25c61e4cfc2fc69d62cc07befc075a2883b047a1.zip |
[media] em28xx: move norm_maxw() and norm_maxh() from em28xx.h to em28xx-video.c
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 4f66bd360c3c..9090a460f51d 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -141,6 +141,29 @@ static struct em28xx_fmt format[] = { }, }; +/*FIXME: maxw should be dependent of alt mode */ +static inline unsigned int norm_maxw(struct em28xx *dev) +{ + if (dev->board.is_webcam) + return dev->sensor_xres; + + if (dev->board.max_range_640_480) + return 640; + + return 720; +} + +static inline unsigned int norm_maxh(struct em28xx *dev) +{ + if (dev->board.is_webcam) + return dev->sensor_yres; + + if (dev->board.max_range_640_480) + return 480; + + return (dev->norm & V4L2_STD_625_50) ? 576 : 480; +} + static int em28xx_vbi_supported(struct em28xx *dev) { /* Modprobe option to manually disable */ |