[PATCH V2 12/24] usb/gspca/pac7311.c: use IS_ENABLED() macro

2013-01-19 Thread Peter Senna Tschudin
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab Signed-off-by: Peter Senna Tschudin --- Changes from V1: Updated subject drivers/media/usb/gspca/pac7311

Re: pac7311

2011-10-20 Thread Németh Márton
gt;>> and is sort-of supported by the gspca_pac7311 module. "sort-of" because >>> the image alternates quickly between having a red tint or a green tint >>> (using the gspac driver from kernel 3.0.0, but this problem is present >>> since at least 2.6.31). &

Re: pac7311

2011-10-20 Thread Lars Noschinski
7311 module. "sort-of" because > > the image alternates quickly between having a red tint or a green tint > > (using the gspac driver from kernel 3.0.0, but this problem is present > > since at least 2.6.31). > > The most important source code for your webcam

Re: pac7311

2011-10-18 Thread Németh Márton
ly between having a red tint or a green tint > (using the gspac driver from kernel 3.0.0, but this problem is present > since at least 2.6.31). The most important source code for your webcam is drivers/media/video/gspca/pac7311.c . You can see it online at http://git.kernel.org/?p=linux/kernel/

pac7311

2011-10-16 Thread Lars Noschinski
Hello, I'm using a webcam (Philipps SPC500NC) which identifies itself as 093a:2603 Pixart Imaging, Inc. PAC7312 Camera and is sort-of supported by the gspca_pac7311 module. "sort-of" because the image alternates quickly between having a red tint or a green tint (using the gspac driver from k

[PATCH] gspca pac7311: stop sending URBs on first error

2009-11-08 Thread Németh Márton
From: Márton Németh It is no use to continue sending URBs if one of them already failed. Signed-off-by: Márton Németh --- The patch is based on 13335:3fd924da7091 from http://linuxtv.org/hg/~jfrancois/gspca/ . --- diff -r 3fd924da7091 linux/drivers/media/video/gspca/pac7311.c --- a/linux

[PATCH 1/2] gspca pac7302/pac7311: propagate error to higher level software

2009-11-08 Thread Németh Márton
093a:2626) because of lack of hardware for pac7311. Signed-off-by: Márton Németh --- The patch is based on the 13327:19c0469c02c3 of http://linuxtv.org/hg/v4l-dvb/ . This patch replaces http://linuxtv.org/hg/~jfrancois/v4l-dvb/rev/2dc5e25b76c1 and http://linuxtv.org/hg/~jfrancois/v4l-dvb/rev

Re: [PATCH 3/3] gspca pac7302/pac7311: separate the two subdrivers

2009-11-07 Thread Hans de Goede
stered new interface driver pac7302 [ 4477.453771] pac7302: registered [ 4489.552153] gspca: set alt 8 err -71 I bisected the problem on EeePC 901 and the changeset 13373:99c23949b411 (gspca - pac7302/pac7311: Separate the two subdrivers.) was marked as the first bad commit. On my development compute

[PATCH] gspca pac7311/pac7302: propagate error to higher level software

2009-11-07 Thread Németh Márton
093a:2626) because of lack of hardware for pac7311. Signed-off-by: Márton Németh --- diff -upr a/linux/drivers/media/video/gspca/pac7302.c b/linux/drivers/media/video/gspca/pac7302.c --- a/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 08:57:26.0 +0100 +++ b/linux/drivers/media/video

Re: pac7311

2009-11-06 Thread Lars Noschinski
v4l2, so it probably uses the v4l2 library. I could try another viewer for debugging, if this is of any use, but ekiga is what I care about. > Then, a bug in the pac7311 driver has been found yesterday. Did you > get/try this last one? Tip of my tree is 13436:f353aa2982f2, which seems to be

Re: pac7311

2009-11-05 Thread Jean-Francois Moine
oes it use the v4l2 library? Then, a bug in the pac7311 driver has been found yesterday. Did you get/try this last one? Regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the li

pac7311

2009-11-05 Thread Lars Noschinski
Hello! I'm using a webcam which identifies itself as 093a:2603 Pixart Imaging, Inc. PAC7312 Camera and is sort-of supported by the gspca_pac7311 module. "sort-of" because the image alternates quickly between having a red tint or a green tint (using the gspca driver from http://linuxtv.org/hg

[PATCH] gspca pac7302/pac7311: handle return value of usb_control_msg()

2009-11-04 Thread Németh Márton
if (ret < 0) + PDEBUG(D_ERR, "reg_w_page(): " + "Failed to write register to index 0x%x, " + "value 0x%x, error %i", + index, page[index], ret); } } diff -r e628f4381170 lin

Re: [PATCH 3/3] gspca pac7302/pac7311: separate the two subdrivers

2009-11-03 Thread Németh Márton
:99c23949b411 (gspca - pac7302/pac7311: Separate the two subdrivers.) was marked as the first bad commit. On my development computer the same configuration works correctly: [ 7872.020222] usb 3-1: new full speed USB device using uhci_hcd and address 4 [ 7872.251240] usb 3-1: configuration #1 chosen

Re: [PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-02 Thread Theodore Kilgore
pac7311 specific parts of struct sd. [...] But here is the point. The sn9c2028 cameras have a structure which seems similar to the mr97310a cameras. They use a similar decompression algorithm. They have a similar frame header. Specifically, the sn9c2028 frame header starts with the five bytes

Re: [PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-02 Thread Németh Márton
Theodore Kilgore írta: > > On Mon, 2 Nov 2009, Németh Márton wrote: > >> Theodore Kilgore wrote: >>> On Sun, 1 Nov 2009, Németh Márton wrote: >>>> Remove struct sd dependency from pac_find_sof() function implementation. >>>> This step prepares sep

Re: [PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-02 Thread Theodore Kilgore
On Mon, 2 Nov 2009, Németh Márton wrote: Theodore Kilgore wrote: On Sun, 1 Nov 2009, Németh Márton wrote: Remove struct sd dependency from pac_find_sof() function implementation. This step prepares separation of pac7302 and pac7311 specific parts of struct sd. [...] But here is the point

Re: [PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-01 Thread Németh Márton
Theodore Kilgore wrote: > > On Sun, 1 Nov 2009, Németh Márton wrote: >> Remove struct sd dependency from pac_find_sof() function implementation. >> This step prepares separation of pac7302 and pac7311 specific parts of >> struct sd. > [...] > But here is the poin

Re: [PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-01 Thread Theodore Kilgore
On Sun, 1 Nov 2009, Németh Márton wrote: From: Márton Németh Remove struct sd dependency from pac_find_sof() function implementation. This step prepares separation of pac7302 and pac7311 specific parts of struct sd. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc

[PATCH 3/3] gspca pac7302/pac7311: separate the two subdrivers

2009-11-01 Thread Németh Márton
From: Márton Németh All PAC7311 specific functions remain in pac7311.c. All PAC7302 specific functions are moved to pac7302.c. The USB device table is also divided into two parts. This makes it possible to remove the sensor specific decisions from different functions and also remove sensor

[PATCH 2/3] gspca pac7302/pac7311: extract pac_start_frame

2009-11-01 Thread Németh Márton
From: Márton Németh Creating the start of the frame is done in the same way for pac7302 and for pac7311. Extract this common part to the pac_start_frame() function. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN b/drivers/media/video/gspca

Re: [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers

2009-11-01 Thread Németh Márton
Jean-Francois Moine wrote: > On Sun, 01 Nov 2009 00:13:10 +0100 > Németh Márton wrote: > >> the following patchset refactores the Pixart PAC7311 subdriver. The >> current situation is that the code contains a lot of decisions >> like this: >> >&g

[PATCH 1/3] gspca pac7302/pac7311: simplify pac_find_sof

2009-11-01 Thread Németh Márton
From: Márton Németh Remove struct sd dependency from pac_find_sof() function implementation. This step prepares separation of pac7302 and pac7311 specific parts of struct sd. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN a/drivers/media

Re: [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers

2009-11-01 Thread Jean-Francois Moine
On Sun, 01 Nov 2009 00:13:10 +0100 Németh Márton wrote: > the following patchset refactores the Pixart PAC7311 subdriver. The > current situation is that the code contains a lot of decisions > like this: > > if (sd->sensor == SENSOR_PAC7302) { > ... do

Re: [PATCH 21/21] gspca pac7302/pac7311: remove prefixes

2009-10-31 Thread Németh Márton
sizeof(struct pac7302_sd), THIS_MODULE); + return gspca_dev_probe(intf, id, &sd_desc, + sizeof(struct sd), THIS_MODULE); } static struct usb_driver sd_driver = { diff -uprN u/drivers/media/video/gspca/pac7311.c v/drivers/media/video/gspca/pac7

[PATCH 21/21] gspca pac7302/pac7311: remove prefixes

2009-10-31 Thread Németh Márton
, const struct usb_device_id *id) { - return gspca_dev_probe(intf, id, &pac7302_sd_desc, - sizeof(struct pac7302_sd), THIS_MODULE); + return gspca_dev_probe(intf, id, &sd_desc, + sizeof(struct sd), THIS_MODULE); } s

[PATCH 19/21] gspca pac7302/pac7311: extract pac_start_frame

2009-10-31 Thread Németh Márton
From: Márton Németh Creating the start of the frame is done in the same way for pac7302 and for pac7311. Extract this common part to the pac_start_frame() function. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN s/drivers/media/video/gspca

[PATCH 18/21] gspca pac7302/pac7311: generalize reg_w_var

2009-10-31 Thread Németh Márton
/video/gspca/pac7311.c s/drivers/media/video/gspca/pac7311.c --- r/drivers/media/video/gspca/pac7311.c 2009-10-31 09:07:56.0 +0100 +++ s/drivers/media/video/gspca/pac7311.c 2009-10-31 10:21:55.0 +0100 @@ -602,7 +602,9 @@ static void reg_w_page(struct gspca_dev /* output

[PATCH 17/21] gspca pac7302/pac7311: separate format descriptors

2009-10-31 Thread Németh Márton
From: Márton Németh Separate supported format descriptors and supported resolutions. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN q/drivers/media/video/gspca/pac7311.c r/drivers/media/video/gspca/pac7311.c --- q/drivers/media/video/gspca

[PATCH 16/21] gspca pac7302/pac7311: separate private sd

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the private struct sd where the sensor specific data is stored. The sensor field is no longer needed because we use separate functions. Brightness and color fields are not used in pac7311, so removed. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore

[PATCH 15/21] gspca pac7302/pac7311: simplify pac_find_sof

2009-10-31 Thread Németh Márton
From: Márton Németh Remove struct sd dependency from pac_find_sof() function implementation, This step prepares separation of pac7302 and pac7311 specific parts of struct sd. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN o/drivers/media

[PATCH 14/21] gspca pac7302/pac7311: separate exposure

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the exposure control. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN n/drivers/media/video/gspca/pac7311.c o/drivers/media/video/gspca/pac7311.c

[PATCH 13/21] gspca pac7302/pac7311: separate gain/autogain control

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the gain and autogain controls. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN m/drivers/media/video/gspca/pac7311.c n/drivers/media/video/gspca

[PATCH 12/21] gspca pac7302/pac7311: separate hvflip

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the horizontal and vertical flip control. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN l/drivers/media/video/gspca/pac7311.c m/drivers/media/video

[PATCH 11/21] gspca pac7302/pac7311: separate contrast control

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the contrast control. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN k/drivers/media/video/gspca/pac7311.c l/drivers/media/video/gspca/pac7311.c

[PATCH 10/21] gspca pac7302/pac7311: separate brightness and color controls

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the controls for PAC7302 and for PAC7311. Separate the brightness and color controls. The ctrl_dis setting is no longer necessary because the brightness and saturation controls are only listed among PAC7302 controls. Signed-off-by: Márton Németh Cc: Thomas Kaiser

[PATCH 09/21] gspca pac7302/pac7311: separate dq_callback

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the dq_callback function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN i/drivers/media/video/gspca/pac7311.c j/drivers/media/video/gspca/pac7311.c

[PATCH 08/21] gspca pac7302/pac7311: separate stop0

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the stop0 function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN h/drivers/media/video/gspca/pac7311.c i/drivers/media/video/gspca/pac7311.c --- h

[PATCH 07/21] gspca pac7302/pac7311: separate stopN

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the stopN function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN g/drivers/media/video/gspca/pac7311.c h/drivers/media/video/gspca/pac7311.c --- g

[PATCH 06/21] gspca pac7302/pac7311: separate start

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the start function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN f/drivers/media/video/gspca/pac7311.c g/drivers/media/video/gspca/pac7311.c --- f

[PATCH 05/21] gspca pac7302/pac7311: separate init

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the init function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN e/drivers/media/video/gspca/pac7311.c f/drivers/media/video/gspca/pac7311.c --- e

[PATCH 04/21] gspca pac7302/pac7311: separate config

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the config function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN d/drivers/media/video/gspca/pac7311.c e/drivers/media/video/gspca/pac7311.c

[PATCH 03/21] gspca pac7302/pac7311: separate pkt_scan

2009-10-31 Thread Németh Márton
From: Márton Németh Separate the pkt_scan function. Remove the run-time decision for PAC7302 and PAC7311 sensors. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN c/drivers/media/video/gspca/pac7311.c d/drivers/media/video/gspca/pac7311.c

[PATCH 02/21] gspca pac7302/pac7311: separate sd_desc

2009-10-31 Thread Németh Márton
From: Márton Németh Move the sensor specific decision temporary to sd_probe. Create an sd_desc for PAC7302 and one for PAC7311. Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN b/drivers/media/video/gspca/pac7311.c c/drivers/media/video

[PATCH 01/21] gspca pac7302/pac7311: add prefix for sensor specific functions

2009-10-31 Thread Németh Márton
From: Márton Németh There are some functions which are already sensor specific. Mark them with pac7302_ or pac7311_ prefix Signed-off-by: Márton Németh Cc: Thomas Kaiser Cc: Theodore Kilgore Cc: Kyle Guinn --- diff -uprN a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca

[PATCH 00/21] gspca pac7302/pac7311: separate the two drivers

2009-10-31 Thread Németh Márton
Hi, the following patchset refactores the Pixart PAC7311 subdriver. The current situation is that the code contains a lot of decisions like this: if (sd->sensor == SENSOR_PAC7302) { ... do this ... } else { ... do something else ... } The sensor type is determi

[PATCH] pac7311: add comment about JPEG header

2009-10-03 Thread Németh Márton
From: Márton Németh Add comment about the meaning of the fixed JPEG header bytes used to create each image. The change was tested with Labtec Webcam 2200. Signed-off-by: Márton Németh --- diff -upr e/drivers/media/video/gspca/pac7311.c f/drivers/media/video/gspca/pac7311.c --- e/drivers

[PATCH] pac7311: remove redundant register page switching

2009-10-03 Thread Németh Márton
Hi, do you know any reason (i.e. a special device needs this) why switch to register page 0 is done twice in the setcolors() function of pac7311? I removed the redundant page switch and my Labtec Webcam 2200 still behaves correctly when I change the "Saturation" control

[PATCH 2/3] pac7311: remove magic values for END_OF_SEQUENCE and LOAD_PAGE{3,4}

2009-10-03 Thread Németh Márton
From: Márton Németh Change the magic values 0, 254 and 255 to END_OF_SEQUENCE, LOAD_PAGE4 and LOAD_PAGE3 respectively for better source code readability. The change was tested with Labtec Webcam 2200. Signed-off-by: Márton Németh --- diff -upr b/drivers/media/video/gspca/pac7311.c c/drivers

[PATCH 3/3] pac7311: remove magic value for USB_BUF_SZ

2009-10-03 Thread Németh Márton
The change was tested with Labtec Webcam 2200. Signed-off-by: Márton Németh --- diff -upr c/drivers/media/video/gspca/pac7311.c d/drivers/media/video/gspca/pac7311.c --- c/drivers/media/video/gspca/pac7311.c 2009-10-03 08:47:30.0 +0200 +++ d/drivers/media/video/gspca/pac7311.c 2

[PATCH 1/3] pac7311: remove magic value for SKIP

2009-10-03 Thread Németh Márton
From: Márton Németh Change the magic value 0xaa to SKIP for better understandability. The change was tested with Labtec Webcam 2200. Signed-off-by: Márton Németh --- diff -upr a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c --- a/drivers/media/video/gspca/pac7311