aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/stv680.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-25 07:19:53 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-25 07:29:23 -0500
commitd56410e0a594150c5ca06319da7bc8901c4d455e (patch)
treef1462651ac1bcc5cec48219dbb422ac615231423 /drivers/media/video/stv680.c
parent9f6933be665ce3b049c274c99810ac754edabf19 (diff)
V4L/DVB (3599b): Whitespace cleanups under drivers/media
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/stv680.c')
-rw-r--r--drivers/media/video/stv680.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index 9636da20748d..b38bda83a7c5 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -1,16 +1,16 @@
1/* 1/*
2 * STV0680 USB Camera Driver, by Kevin Sisson (kjsisson@bellsouth.net) 2 * STV0680 USB Camera Driver, by Kevin Sisson (kjsisson@bellsouth.net)
3 * 3 *
4 * Thanks to STMicroelectronics for information on the usb commands, and 4 * Thanks to STMicroelectronics for information on the usb commands, and
5 * to Steve Miller at STM for his help and encouragement while I was 5 * to Steve Miller at STM for his help and encouragement while I was
6 * writing this driver. 6 * writing this driver.
7 * 7 *
8 * This driver is based heavily on the 8 * This driver is based heavily on the
9 * Endpoints (formerly known as AOX) se401 USB Camera Driver 9 * Endpoints (formerly known as AOX) se401 USB Camera Driver
10 * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org) 10 * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
11 * 11 *
12 * Still somewhat based on the Linux ov511 driver. 12 * Still somewhat based on the Linux ov511 driver.
13 * 13 *
14 * This program is free software; you can redistribute it and/or modify it 14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the 15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your 16 * Free Software Foundation; either version 2 of the License, or (at your
@@ -25,18 +25,18 @@
25 * along with this program; if not, write to the Free Software Foundation, 25 * along with this program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 * 27 *
28 * History: 28 * History:
29 * ver 0.1 October, 2001. Initial attempt. 29 * ver 0.1 October, 2001. Initial attempt.
30 * 30 *
31 * ver 0.2 November, 2001. Fixed asbility to resize, added brightness 31 * ver 0.2 November, 2001. Fixed asbility to resize, added brightness
32 * function, made more stable (?) 32 * function, made more stable (?)
33 * 33 *
34 * ver 0.21 Nov, 2001. Added gamma correction and white balance, 34 * ver 0.21 Nov, 2001. Added gamma correction and white balance,
35 * due to Alexander Schwartz. Still trying to 35 * due to Alexander Schwartz. Still trying to
36 * improve stablility. Moved stuff into stv680.h 36 * improve stablility. Moved stuff into stv680.h
37 * 37 *
38 * ver 0.22 Nov, 2001. Added sharpen function (by Michael Sweet, 38 * ver 0.22 Nov, 2001. Added sharpen function (by Michael Sweet,
39 * mike@easysw.com) from GIMP, also used in pencam. 39 * mike@easysw.com) from GIMP, also used in pencam.
40 * Simple, fast, good integer math routine. 40 * Simple, fast, good integer math routine.
41 * 41 *
42 * ver 0.23 Dec, 2001 (gkh) 42 * ver 0.23 Dec, 2001 (gkh)
@@ -44,11 +44,11 @@
44 * Lindent, and did other minor tweaks to get 44 * Lindent, and did other minor tweaks to get
45 * things to work properly with 2.5.1 45 * things to work properly with 2.5.1
46 * 46 *
47 * ver 0.24 Jan, 2002 (kjs) 47 * ver 0.24 Jan, 2002 (kjs)
48 * Fixed the problem with webcam crashing after 48 * Fixed the problem with webcam crashing after
49 * two pictures. Changed the way pic is halved to 49 * two pictures. Changed the way pic is halved to
50 * improve quality. Got rid of green line around 50 * improve quality. Got rid of green line around
51 * frame. Fix brightness reset when changing size 51 * frame. Fix brightness reset when changing size
52 * bug. Adjusted gamma filters slightly. 52 * bug. Adjusted gamma filters slightly.
53 * 53 *
54 * ver 0.25 Jan, 2002 (kjs) 54 * ver 0.25 Jan, 2002 (kjs)
@@ -484,7 +484,7 @@ exit:
484 PDEBUG (1, "STV(i): swapRGB is (forced) ON"); 484 PDEBUG (1, "STV(i): swapRGB is (forced) ON");
485 else if (swapRGB_on == -1) 485 else if (swapRGB_on == -1)
486 PDEBUG (1, "STV(i): swapRGB is (forced) OFF"); 486 PDEBUG (1, "STV(i): swapRGB is (forced) OFF");
487 487
488 if (stv_set_video_mode (stv680) < 0) { 488 if (stv_set_video_mode (stv680) < 0) {
489 PDEBUG (0, "STV(e): Could not set video mode in stv_init"); 489 PDEBUG (0, "STV(e): Could not set video mode in stv_init");
490 return -1; 490 return -1;
@@ -570,7 +570,7 @@ static int stv680_set_pict (struct usb_stv *stv680, struct video_picture *p)
570 if (stv680->brightness != p->brightness) { 570 if (stv680->brightness != p->brightness) {
571 stv680->chgbright = 1; 571 stv680->chgbright = 1;
572 stv680->brightness = p->brightness; 572 stv680->brightness = p->brightness;
573 } 573 }
574 574
575 stv680->whiteness = p->whiteness; /* greyscale */ 575 stv680->whiteness = p->whiteness; /* greyscale */
576 stv680->colour = p->colour; 576 stv680->colour = p->colour;
@@ -612,7 +612,7 @@ static void stv680_video_irq (struct urb *urb, struct pt_regs *regs)
612 612
613 case BUFFER_UNUSED: 613 case BUFFER_UNUSED:
614 memcpy (stv680->scratch[stv680->scratch_next].data, 614 memcpy (stv680->scratch[stv680->scratch_next].data,
615 (unsigned char *) urb->transfer_buffer, length); 615 (unsigned char *) urb->transfer_buffer, length);
616 stv680->scratch[stv680->scratch_next].state = BUFFER_READY; 616 stv680->scratch[stv680->scratch_next].state = BUFFER_READY;
617 stv680->scratch[stv680->scratch_next].length = length; 617 stv680->scratch[stv680->scratch_next].length = length;
618 if (waitqueue_active (&stv680->wq)) { 618 if (waitqueue_active (&stv680->wq)) {
@@ -752,7 +752,7 @@ static int stv680_set_size (struct usb_stv *stv680, int width, int height)
752 PDEBUG (1, "STV(e): request for non-supported size: request: v.width = %i, v.height = %i actual: stv.width = %i, stv.height = %i", width, height, stv680->vwidth, stv680->vheight); 752 PDEBUG (1, "STV(e): request for non-supported size: request: v.width = %i, v.height = %i actual: stv.width = %i, stv.height = %i", width, height, stv680->vwidth, stv680->vheight);
753 return 1; 753 return 1;
754 } 754 }
755 755
756 /* Stop a current stream and start it again at the new size */ 756 /* Stop a current stream and start it again at the new size */
757 if (wasstreaming) 757 if (wasstreaming)
758 stv680_stop_stream (stv680); 758 stv680_stop_stream (stv680);
@@ -773,7 +773,7 @@ static int stv680_set_size (struct usb_stv *stv680, int width, int height)
773 773
774/* 774/*
775 * STV0680 Vision Camera Chipset Driver 775 * STV0680 Vision Camera Chipset Driver
776 * Copyright (C) 2000 Adam Harrison <adam@antispin.org> 776 * Copyright (C) 2000 Adam Harrison <adam@antispin.org>
777*/ 777*/
778 778
779#define RED 0 779#define RED 0
@@ -842,7 +842,7 @@ static void bayer_unshuffle (struct usb_stv *stv680, struct stv680_scratch *buff
842 colour = 2; 842 colour = 2;
843 break; 843 break;
844 } 844 }
845 i = (y * vw + x) * 3; 845 i = (y * vw + x) * 3;
846 *(output + i + colour) = (unsigned char) p; 846 *(output + i + colour) = (unsigned char) p;
847 } /* for x */ 847 } /* for x */
848 848
@@ -850,9 +850,9 @@ static void bayer_unshuffle (struct usb_stv *stv680, struct stv680_scratch *buff
850 850
851 /****** gamma correction plus hardcoded white balance */ 851 /****** gamma correction plus hardcoded white balance */
852 /* Thanks to Alexander Schwartx <alexander.schwartx@gmx.net> for this code. 852 /* Thanks to Alexander Schwartx <alexander.schwartx@gmx.net> for this code.
853 Correction values red[], green[], blue[], are generated by 853 Correction values red[], green[], blue[], are generated by
854 (pow(i/256.0, GAMMA)*255.0)*white balanceRGB where GAMMA=0.55, 1<i<255. 854 (pow(i/256.0, GAMMA)*255.0)*white balanceRGB where GAMMA=0.55, 1<i<255.
855 White balance (RGB)= 1.0, 1.17, 1.48. Values are calculated as double float and 855 White balance (RGB)= 1.0, 1.17, 1.48. Values are calculated as double float and
856 converted to unsigned char. Values are in stv680.h */ 856 converted to unsigned char. Values are in stv680.h */
857 857
858 for (y = 0; y < vh; y++) { 858 for (y = 0; y < vh; y++) {