diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
commit | ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch) | |
tree | ad434400f5ecaa33b433c8f830e40792d8d6c05c /drivers/usb/media | |
parent | 90356ac3194bf91a441a5f9c3067af386ef62462 (diff) | |
parent | 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff) |
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'drivers/usb/media')
-rw-r--r-- | drivers/usb/media/ov511.c | 2 | ||||
-rw-r--r-- | drivers/usb/media/pwc/pwc-ctrl.c | 80 | ||||
-rw-r--r-- | drivers/usb/media/pwc/pwc-if.c | 12 | ||||
-rw-r--r-- | drivers/usb/media/pwc/pwc-ioctl.h | 2 | ||||
-rw-r--r-- | drivers/usb/media/pwc/pwc.h | 6 | ||||
-rw-r--r-- | drivers/usb/media/sn9c102_core.c | 4 | ||||
-rw-r--r-- | drivers/usb/media/sn9c102_sensor.h | 2 |
7 files changed, 51 insertions, 57 deletions
diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c index d6051822416e..036c485d1d1e 100644 --- a/drivers/usb/media/ov511.c +++ b/drivers/usb/media/ov511.c | |||
@@ -5041,7 +5041,7 @@ ov6xx0_configure(struct usb_ov511 *ov) | |||
5041 | { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */ | 5041 | { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */ |
5042 | // { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */ | 5042 | // { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */ |
5043 | { OV511_I2C_BUS, 0x2d, 0x99 }, | 5043 | { OV511_I2C_BUS, 0x2d, 0x99 }, |
5044 | { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Procesing Parameter */ | 5044 | { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Processing Parameter */ |
5045 | { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */ | 5045 | { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */ |
5046 | { OV511_I2C_BUS, 0x38, 0x8b }, | 5046 | { OV511_I2C_BUS, 0x38, 0x8b }, |
5047 | { OV511_I2C_BUS, 0x39, 0x40 }, | 5047 | { OV511_I2C_BUS, 0x39, 0x40 }, |
diff --git a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c index 26aa914bc541..42ec468d52d6 100644 --- a/drivers/usb/media/pwc/pwc-ctrl.c +++ b/drivers/usb/media/pwc/pwc-ctrl.c | |||
@@ -418,6 +418,44 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int fr | |||
418 | 418 | ||
419 | 419 | ||
420 | 420 | ||
421 | static void pwc_set_image_buffer_size(struct pwc_device *pdev) | ||
422 | { | ||
423 | int i, factor = 0, filler = 0; | ||
424 | |||
425 | /* for PALETTE_YUV420P */ | ||
426 | switch(pdev->vpalette) | ||
427 | { | ||
428 | case VIDEO_PALETTE_YUV420P: | ||
429 | factor = 6; | ||
430 | filler = 128; | ||
431 | break; | ||
432 | case VIDEO_PALETTE_RAW: | ||
433 | factor = 6; /* can be uncompressed YUV420P */ | ||
434 | filler = 0; | ||
435 | break; | ||
436 | } | ||
437 | |||
438 | /* Set sizes in bytes */ | ||
439 | pdev->image.size = pdev->image.x * pdev->image.y * factor / 4; | ||
440 | pdev->view.size = pdev->view.x * pdev->view.y * factor / 4; | ||
441 | |||
442 | /* Align offset, or you'll get some very weird results in | ||
443 | YUV420 mode... x must be multiple of 4 (to get the Y's in | ||
444 | place), and y even (or you'll mixup U & V). This is less of a | ||
445 | problem for YUV420P. | ||
446 | */ | ||
447 | pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC; | ||
448 | pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE; | ||
449 | |||
450 | /* Fill buffers with gray or black */ | ||
451 | for (i = 0; i < MAX_IMAGES; i++) { | ||
452 | if (pdev->image_ptr[i] != NULL) | ||
453 | memset(pdev->image_ptr[i], filler, pdev->view.size); | ||
454 | } | ||
455 | } | ||
456 | |||
457 | |||
458 | |||
421 | /** | 459 | /** |
422 | @pdev: device structure | 460 | @pdev: device structure |
423 | @width: viewport width | 461 | @width: viewport width |
@@ -475,44 +513,6 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame | |||
475 | } | 513 | } |
476 | 514 | ||
477 | 515 | ||
478 | void pwc_set_image_buffer_size(struct pwc_device *pdev) | ||
479 | { | ||
480 | int i, factor = 0, filler = 0; | ||
481 | |||
482 | /* for PALETTE_YUV420P */ | ||
483 | switch(pdev->vpalette) | ||
484 | { | ||
485 | case VIDEO_PALETTE_YUV420P: | ||
486 | factor = 6; | ||
487 | filler = 128; | ||
488 | break; | ||
489 | case VIDEO_PALETTE_RAW: | ||
490 | factor = 6; /* can be uncompressed YUV420P */ | ||
491 | filler = 0; | ||
492 | break; | ||
493 | } | ||
494 | |||
495 | /* Set sizes in bytes */ | ||
496 | pdev->image.size = pdev->image.x * pdev->image.y * factor / 4; | ||
497 | pdev->view.size = pdev->view.x * pdev->view.y * factor / 4; | ||
498 | |||
499 | /* Align offset, or you'll get some very weird results in | ||
500 | YUV420 mode... x must be multiple of 4 (to get the Y's in | ||
501 | place), and y even (or you'll mixup U & V). This is less of a | ||
502 | problem for YUV420P. | ||
503 | */ | ||
504 | pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC; | ||
505 | pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE; | ||
506 | |||
507 | /* Fill buffers with gray or black */ | ||
508 | for (i = 0; i < MAX_IMAGES; i++) { | ||
509 | if (pdev->image_ptr[i] != NULL) | ||
510 | memset(pdev->image_ptr[i], filler, pdev->view.size); | ||
511 | } | ||
512 | } | ||
513 | |||
514 | |||
515 | |||
516 | /* BRIGHTNESS */ | 516 | /* BRIGHTNESS */ |
517 | 517 | ||
518 | int pwc_get_brightness(struct pwc_device *pdev) | 518 | int pwc_get_brightness(struct pwc_device *pdev) |
@@ -949,7 +949,7 @@ int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value) | |||
949 | return SendControlMsg(SET_STATUS_CTL, LED_FORMATTER, 2); | 949 | return SendControlMsg(SET_STATUS_CTL, LED_FORMATTER, 2); |
950 | } | 950 | } |
951 | 951 | ||
952 | int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value) | 952 | static int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value) |
953 | { | 953 | { |
954 | unsigned char buf[2]; | 954 | unsigned char buf[2]; |
955 | int ret; | 955 | int ret; |
@@ -1100,7 +1100,7 @@ static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) | |||
1100 | unsigned char buf[4]; | 1100 | unsigned char buf[4]; |
1101 | 1101 | ||
1102 | /* set new relative angle; angles are expressed in degrees * 100, | 1102 | /* set new relative angle; angles are expressed in degrees * 100, |
1103 | but cam as .5 degree resolution, hence devide by 200. Also | 1103 | but cam as .5 degree resolution, hence divide by 200. Also |
1104 | the angle must be multiplied by 64 before it's send to | 1104 | the angle must be multiplied by 64 before it's send to |
1105 | the cam (??) | 1105 | the cam (??) |
1106 | */ | 1106 | */ |
diff --git a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c index 100a5a4f03a3..cca47f480a8b 100644 --- a/drivers/usb/media/pwc/pwc-if.c +++ b/drivers/usb/media/pwc/pwc-if.c | |||
@@ -129,7 +129,7 @@ static int default_mbufs = 2; /* Default number of mmap() buffers */ | |||
129 | int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX; | 129 | int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX; |
130 | static int power_save = 0; | 130 | static int power_save = 0; |
131 | static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */ | 131 | static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */ |
132 | int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */ | 132 | static int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */ |
133 | static struct { | 133 | static struct { |
134 | int type; | 134 | int type; |
135 | char serial_number[30]; | 135 | char serial_number[30]; |
@@ -272,7 +272,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev) | |||
272 | return -ENXIO; | 272 | return -ENXIO; |
273 | } | 273 | } |
274 | #endif | 274 | #endif |
275 | /* Allocate Isochronuous pipe buffers */ | 275 | /* Allocate Isochronous pipe buffers */ |
276 | for (i = 0; i < MAX_ISO_BUFS; i++) { | 276 | for (i = 0; i < MAX_ISO_BUFS; i++) { |
277 | if (pdev->sbuf[i].data == NULL) { | 277 | if (pdev->sbuf[i].data == NULL) { |
278 | kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL); | 278 | kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL); |
@@ -322,7 +322,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev) | |||
322 | case 730: | 322 | case 730: |
323 | case 740: | 323 | case 740: |
324 | case 750: | 324 | case 750: |
325 | Trace(TRACE_MEMORY,"private_data(%Zd)\n",sizeof(struct pwc_dec23_private)); | 325 | Trace(TRACE_MEMORY,"private_data(%zu)\n",sizeof(struct pwc_dec23_private)); |
326 | kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ | 326 | kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ |
327 | break; | 327 | break; |
328 | case 645: | 328 | case 645: |
@@ -850,7 +850,7 @@ static int pwc_isoc_init(struct pwc_device *pdev) | |||
850 | 850 | ||
851 | if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { | 851 | if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { |
852 | Err("Failed to find packet size for video endpoint in current alternate setting.\n"); | 852 | Err("Failed to find packet size for video endpoint in current alternate setting.\n"); |
853 | return -ENFILE; /* Odd error, that should be noticable */ | 853 | return -ENFILE; /* Odd error, that should be noticeable */ |
854 | } | 854 | } |
855 | 855 | ||
856 | /* Set alternate interface */ | 856 | /* Set alternate interface */ |
@@ -1179,7 +1179,7 @@ static ssize_t pwc_video_read(struct file *file, char __user * buf, | |||
1179 | DECLARE_WAITQUEUE(wait, current); | 1179 | DECLARE_WAITQUEUE(wait, current); |
1180 | int bytes_to_read; | 1180 | int bytes_to_read; |
1181 | 1181 | ||
1182 | Trace(TRACE_READ, "video_read(0x%p, %p, %Zd) called.\n", vdev, buf, count); | 1182 | Trace(TRACE_READ, "video_read(0x%p, %p, %zu) called.\n", vdev, buf, count); |
1183 | if (vdev == NULL) | 1183 | if (vdev == NULL) |
1184 | return -EFAULT; | 1184 | return -EFAULT; |
1185 | pdev = vdev->priv; | 1185 | pdev = vdev->priv; |
@@ -2128,7 +2128,7 @@ static int __init usb_pwc_init(void) | |||
2128 | if (leds[1] >= 0) | 2128 | if (leds[1] >= 0) |
2129 | led_off = leds[1]; | 2129 | led_off = leds[1]; |
2130 | 2130 | ||
2131 | /* Big device node whoopla. Basicly, it allows you to assign a | 2131 | /* Big device node whoopla. Basically, it allows you to assign a |
2132 | device node (/dev/videoX) to a camera, based on its type | 2132 | device node (/dev/videoX) to a camera, based on its type |
2133 | & serial number. The format is [type[.serialnumber]:]node. | 2133 | & serial number. The format is [type[.serialnumber]:]node. |
2134 | 2134 | ||
diff --git a/drivers/usb/media/pwc/pwc-ioctl.h b/drivers/usb/media/pwc/pwc-ioctl.h index 65805eaa9a1c..5f9cb08bc02e 100644 --- a/drivers/usb/media/pwc/pwc-ioctl.h +++ b/drivers/usb/media/pwc/pwc-ioctl.h | |||
@@ -75,7 +75,7 @@ | |||
75 | #define PWC_FPS_SNAPSHOT 0x00400000 | 75 | #define PWC_FPS_SNAPSHOT 0x00400000 |
76 | 76 | ||
77 | 77 | ||
78 | /* structure for transfering x & y coordinates */ | 78 | /* structure for transferring x & y coordinates */ |
79 | struct pwc_coord | 79 | struct pwc_coord |
80 | { | 80 | { |
81 | int x, y; /* guess what */ | 81 | int x, y; /* guess what */ |
diff --git a/drivers/usb/media/pwc/pwc.h b/drivers/usb/media/pwc/pwc.h index 53b516d29cf5..267869dab185 100644 --- a/drivers/usb/media/pwc/pwc.h +++ b/drivers/usb/media/pwc/pwc.h | |||
@@ -226,9 +226,8 @@ struct pwc_device | |||
226 | extern "C" { | 226 | extern "C" { |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | /* Global variables */ | 229 | /* Global variable */ |
230 | extern int pwc_trace; | 230 | extern int pwc_trace; |
231 | extern int pwc_preferred_compression; | ||
232 | 231 | ||
233 | /** functions in pwc-if.c */ | 232 | /** functions in pwc-if.c */ |
234 | int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot); | 233 | int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot); |
@@ -243,8 +242,6 @@ void pwc_construct(struct pwc_device *pdev); | |||
243 | /** Functions in pwc-ctrl.c */ | 242 | /** Functions in pwc-ctrl.c */ |
244 | /* Request a certain video mode. Returns < 0 if not possible */ | 243 | /* Request a certain video mode. Returns < 0 if not possible */ |
245 | extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot); | 244 | extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot); |
246 | /* Calculate the number of bytes per image (not frame) */ | ||
247 | extern void pwc_set_image_buffer_size(struct pwc_device *pdev); | ||
248 | 245 | ||
249 | /* Various controls; should be obvious. Value 0..65535, or < 0 on error */ | 246 | /* Various controls; should be obvious. Value 0..65535, or < 0 on error */ |
250 | extern int pwc_get_brightness(struct pwc_device *pdev); | 247 | extern int pwc_get_brightness(struct pwc_device *pdev); |
@@ -256,7 +253,6 @@ extern int pwc_set_gamma(struct pwc_device *pdev, int value); | |||
256 | extern int pwc_get_saturation(struct pwc_device *pdev); | 253 | extern int pwc_get_saturation(struct pwc_device *pdev); |
257 | extern int pwc_set_saturation(struct pwc_device *pdev, int value); | 254 | extern int pwc_set_saturation(struct pwc_device *pdev, int value); |
258 | extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value); | 255 | extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value); |
259 | extern int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value); | ||
260 | extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor); | 256 | extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor); |
261 | 257 | ||
262 | /* Power down or up the camera; not supported by all models */ | 258 | /* Power down or up the camera; not supported by all models */ |
diff --git a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c index 898401cf7dcc..31d57400d5be 100644 --- a/drivers/usb/media/sn9c102_core.c +++ b/drivers/usb/media/sn9c102_core.c | |||
@@ -429,7 +429,7 @@ sn9c102_i2c_try_read(struct sn9c102_device* cam, | |||
429 | } | 429 | } |
430 | 430 | ||
431 | 431 | ||
432 | int | 432 | static int |
433 | sn9c102_i2c_try_write(struct sn9c102_device* cam, | 433 | sn9c102_i2c_try_write(struct sn9c102_device* cam, |
434 | struct sn9c102_sensor* sensor, u8 address, u8 value) | 434 | struct sn9c102_sensor* sensor, u8 address, u8 value) |
435 | { | 435 | { |
@@ -785,7 +785,7 @@ static int sn9c102_stop_transfer(struct sn9c102_device* cam) | |||
785 | } | 785 | } |
786 | 786 | ||
787 | 787 | ||
788 | int sn9c102_stream_interrupt(struct sn9c102_device* cam) | 788 | static int sn9c102_stream_interrupt(struct sn9c102_device* cam) |
789 | { | 789 | { |
790 | int err = 0; | 790 | int err = 0; |
791 | 791 | ||
diff --git a/drivers/usb/media/sn9c102_sensor.h b/drivers/usb/media/sn9c102_sensor.h index 16f7483559f0..6a7adebcb4bf 100644 --- a/drivers/usb/media/sn9c102_sensor.h +++ b/drivers/usb/media/sn9c102_sensor.h | |||
@@ -145,8 +145,6 @@ static const struct usb_device_id sn9c102_id_table[] = { \ | |||
145 | */ | 145 | */ |
146 | 146 | ||
147 | /* The "try" I2C I/O versions are used when probing the sensor */ | 147 | /* The "try" I2C I/O versions are used when probing the sensor */ |
148 | extern int sn9c102_i2c_try_write(struct sn9c102_device*,struct sn9c102_sensor*, | ||
149 | u8 address, u8 value); | ||
150 | extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*, | 148 | extern int sn9c102_i2c_try_read(struct sn9c102_device*,struct sn9c102_sensor*, |
151 | u8 address); | 149 | u8 address); |
152 | 150 | ||