summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-04 20:58:44 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 13:46:46 +0100
commit795e6eb3262d3b7247ce450835eea6df6571d103 (patch)
tree558c161d69a04a172f54c1edd38c44b2553bf10e /drivers/media/video/pwc/pwc.h
parent[media] pwc: Remove driver specific ioctls (diff)
downloadlinux-795e6eb3262d3b7247ce450835eea6df6571d103.tar.xz
linux-795e6eb3262d3b7247ce450835eea6df6571d103.zip
[media] pwc: Remove software emulation of arbritary resolutions
The pwc driver claims to support any resolution between 160x120 and 640x480, but emulates this by simply drawing a black border around the image. Userspace can draw its own black border if it really wants one. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc.h')
-rw-r--r--drivers/media/video/pwc/pwc.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 19c692c186fe..5d013851ed2a 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -107,6 +107,9 @@
#define FEATURE_CODEC1 0x0002
#define FEATURE_CODEC2 0x0004
+#define MAX_WIDTH 640
+#define MAX_HEIGHT 480
+
/* Ignore errors in the first N frames, to allow for startup delays */
#define FRAME_LOWMARK 5
@@ -205,12 +208,6 @@ struct pwc_raw_frame {
__u8 rawframe[0]; /* frame_size = H / 4 * vbandlength */
} __packed;
-/* structure for transferring x & y coordinates */
-struct pwc_coord {
- int x, y; /* guess what */
- int size; /* size, or offset */
-};
-
/* intermediate buffers with raw data from the USB cam */
struct pwc_frame_buf
{
@@ -233,7 +230,6 @@ struct pwc_device
int type;
int release; /* release number */
int features; /* feature bits */
- char serial[30]; /* serial number (string) */
/*** Video data ***/
struct file *capt_file; /* file doing video capture */
@@ -286,10 +282,7 @@ struct pwc_device
* a gray or black border. view_min <= image <= view <= view_max;
*/
int image_mask; /* supported sizes */
- struct pwc_coord view_min, view_max; /* minimum and maximum view */
- struct pwc_coord abs_max; /* maximum supported size */
- struct pwc_coord image, view; /* image and viewport size */
- struct pwc_coord offset; /* offset of the viewport */
+ int width, height; /* current resolution */
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
struct input_dev *button_dev; /* webcam snapshot button input */
@@ -364,9 +357,9 @@ int pwc_test_n_set_capt_file(struct pwc_device *pdev, struct file *file);
/** Functions in pwc-misc.c */
/* sizes in pixels */
-extern const struct pwc_coord pwc_image_sizes[PSZ_MAX];
+extern const int pwc_image_sizes[PSZ_MAX][2];
-int pwc_decode_size(struct pwc_device *pdev, int width, int height);
+int pwc_get_size(struct pwc_device *pdev, int width, int height);
void pwc_construct(struct pwc_device *pdev);
/** Functions in pwc-ctrl.c */