aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixj.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] Make nchg variable signed because the code compares this variable ↵Hans Petter Selasky2011-06-011-1/+1
| | | | | | | | | | | | | against negative values The sonixj driver compares the value for nchg with: if (sd->nchg < -6 || sd->nchg >= 12) { With u8, negative values won't work. Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: The pin S_PWR_DN is inverted for sensor mi0360Jean-François Moine2011-03-211-1/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj, zc3xx: Let some bandwidth for audio when USB 1.1Jean-François Moine2011-03-211-0/+4
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Set both pins for infrared of mt9v111 webcamsJean-François Moine2011-03-211-14/+5
| | | | | | | This avoids to define the webcam model. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Same init for all bridges but the sn9c102pJean-François Moine2011-03-211-7/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Simplify GPIO setting when audio presentJean-François Moine2011-03-211-2/+3
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Adjust autogain for sensor mt9v111Jean-François Moine2011-03-211-6/+9
| | | | | | | The gain/expo adjustment was too long. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Fix start sequence of sensor mt9v111Jean-François Moine2011-03-211-19/+4
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Update the JPEG quality for best image transferJean-François Moine2011-03-211-23/+86
| | | | | | | | | During image capture, the filling rate of the isoc packets is computed. It is then used by a work queue to update the current JPEG quality. Tested-by: Franck Bourdonnec <fbourdonnec@chez.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Have the same JPEG quality for encoding and decodingJean-François Moine2011-03-211-15/+4
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Better scanning of isochronous packetsJean-François Moine2011-03-211-26/+93
| | | | | | | | | A marker 'ff ff 00 c4 c4 96' indicates an end of frame. It is 62 bytes long and may be splitted on 2 packets. It contains a flag 'USB full' which indicates that the frame is truncated. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Move the avg lum computation to a separate functionJean-François Moine2011-03-211-18/+26
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Add LED (illuminator) control to the webcam 0c45:614aJean-François Moine2011-01-191-9/+17
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Infrared bug fix and enhancementJean-François Moine2011-01-191-42/+38
| | | | | | | | | | The infrared was set by sensor write instead of bridge GPIO. It is now settable by the standard control ILLUMINATOR_1. A module parameter permits to set the right GPIO bit according to the StarCam model. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca: Remove __devinit, __devinitconst and __devinitdataJean-François Moine2011-01-191-1/+1
| | | | | | | __devinit* must not be used in USB drivers. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca_sonixj: Add one more commented out usb-idHans de Goede2011-01-191-0/+1
| | | | | | | | | While going through windows inf file I found more usb-id, add a comment with this id for future reference. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca_sonixj: Probe sensor type independent of bridge typeHans de Goede2011-01-191-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Looking at the windows inf file, for usb ids with a sensor type where probing is needed to determine the type (for example ov7630 or soi768), this is needed for all bridge variants with a usb id indicating this sensor type. So do the probing to determine the actual sensor type for types where the usb-id info is not 100% deterministic, independent of the bridge type. If you look through the list of currently active usb ids in sonixj, this effectively only changes the code path for 0c45:60fe (sn9c105 + ov7630) and 0c45:612e (sn9c110 + ov7630), which according to the inf file can have a soi768 instead of a ov7630 just like the sn9c120 + ov7630 models where we already probe for a soi7630. The main reason for this code change is to keep the code paths as bridge variant independent as possible, so that we don't need a lot of special per bridge cases, as we enable more usb-ids in the future. This change makes the 0c45:60fe code path identical to the successfully tested 0c45:613e, so also make sonixj the default driver for 0c45:60fe. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca_sonixj: Enable more usb ids when sn9c102 gets compiled tooHans de Goede2011-01-191-5/+1
| | | | | | | | | | | | | | Both we and the windows driver make no sensor specific differences (with some exceptions) for different sonixj bridge types. Thus if a sn9c105 bridge has been successfully tested with a sensor, the same sensor can be successfully used with a sn9c120 bridge too. Using this knowledge we can move over most usb-ids too the sonixj driver when both are compiled. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Bad clock for om6802 in 640x480Jean-François Moine2010-12-291-1/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Simplify and clarify the hv7131r probe functionJean-François Moine2010-12-291-9/+9
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Better handling of the bridge registers 0x01 and 0x17Jean-Francois Moine2010-12-171-163/+100
| | | | | | | | | | | | | | The initial values of the registers 0x01 and 0x17 are taken from the sensor table at capture start and updated according to the flag PDN_INV. Their values are updated at each step of the capture initialization and memorized for reuse in capture stop. This patch also fixed automatically some bad hardcoded values of these registers. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Add the bit definitions of the bridge reg 0x01 and 0x17Jean-Francois Moine2010-12-171-0/+13
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Set the flag for some devicesJean-Francois Moine2010-12-171-2/+5
| | | | | | | | | The flag PDN_INV indicates that the sensor pin S_PWR_DN has not the same value as other webcams with the same sensor. For now, only two webcams have been so detected: the Microsoft's VX1000 and VX3000. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Add a flag in the driver_info tableJean-Francois Moine2010-12-171-2/+8
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Fix a bad probe exchangeJean-Francois Moine2010-12-171-2/+2
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Move bridge init to sd startJean-Francois Moine2010-12-171-136/+129
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca: Fix coding style issuesJean-François Moine2010-10-211-2/+1
| | | | | | | | | | | The errors were found by checkpatch.pl. Most fixes are: - remove spaces followed by TAB(s), - split lines greater than 80 characters, - move most '{'s from start of line to end of previous line. (Some '{'s at start of line remain when the '}'s are on the same line) Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Add horizontal and vertical flip for po2030nNémeth Márton2010-10-211-14/+51
| | | | | | | | The PO2030N sensor chip found in hama AC-150 webcam supports horizontal and vertical flipping the image by hardware. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Remove magic numbers for delayNémeth Márton2010-10-211-20/+23
| | | | | | | | The number 0xdd is used for marking delay init sequence steps. Replace 0xdd values only if the meaning is delay. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Fix a regression with sensor hv7131rJean-François Moine2010-10-211-2/+1
| | | | | | | | | | The bug was introduced by commit d5aa3856fd09ad0ea04619d6cba31192dac08e84 removing the probe sequence of hv7131r with bridge sn9c120 and so, letting the sensor inactive. Signed-off-by: Jean-François Moine <moinejf@free.fr> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Fix a regression of sensors hv7131r and mi0360Jean-François Moine2010-10-211-2/+1
| | | | | | | | | The bug was introduced by commit 23a98274cc348880ecb6803307c254448084953a applying values of sensor sp80708 to sensors hv7131r and mi0360. Signed-off-by: Jean-François Moine <moinejf@free.fr> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixj: Use the new video control mechanismJean-François Moine2010-10-211-411/+172
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Have 0c45:6130 handled by sonixj instead of sn9c102Jean-François Moine2010-10-211-2/+0
| | | | | | | The driver sn9c102 does not know about the sensor mi0360b. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Bad detection of the end of imageJean-François Moine2010-10-211-24/+38
| | | | | | | | | The 'end of image' block may be splitted between two ISOC packets. This case was not tested, so, some images could be lost and concatenated to previous one(s), raising 'frame overflow' errors. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Add sensor mi0360bJean-François Moine2010-10-211-2/+112
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=mJean-François Moine2010-10-211-2/+2
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Propagate USB errors to higher levelJean-François Moine2010-10-211-18/+67
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Add webcam 0c45:612bAlexander Goncharov2010-10-211-0/+1
| | | | | | Signed-off-by: Alexander Goncharov <alexzandersss@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Webcam 0c45:6102 addedJean-François Moine2010-10-211-1/+1
| | | | | | Tested-by: Simon Danner <simon@danner-urloffen.de> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - all modules: Display error messages when gspca debug disabledJean-François Moine2010-10-211-2/+2
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - all modules: Remove useless module load/unload messagesJean-François Moine2010-10-211-7/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj / sq930x / t613: Remove unused variable in struct sdJean-François Moine2010-08-081-5/+5
| | | | | | | The sensor enum definition was not at the right place. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Do the audio input work for webcams with a microphoneJean-François Moine2010-08-021-25/+12
| | | | | | | | | | The bit 0x04 of the bridge register 02 (GPIO) is used for audio connection in webcams containing the bridge SN9C105. This patch sets it correctly, according to the presence of an audio device. Tested-by: Kyle Baker <kyleabaker@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca: Remove/move useless inclusions of slab.hJean-François Moine2010-08-021-1/+0
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Add webcam 0c45:60ceWarren Bosworth Focke2010-06-011-1/+1
| | | | | | Signed-off-by: Warren Bosworth Focke <wbfocke@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Add information about some potential JPEG webcamsJean-François Moine2010-06-011-1/+4
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Add sensor soi768Jean-François Moine2010-05-191-1/+94
| | | | | | | | The webcams 0c45:613e may contain the sensors ov7630 or soi768. A sensor probe is done at init time when the sensor is declared ov7630. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Reset the bridge after sensor probeJean-François Moine2010-05-191-22/+19
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the ↵Jean-François Moine2010-05-191-1/+2
| | | | | | | color gains to null at init time - change value of register 0x9a Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - sonixj: Set the colors at startup timeJean-François Moine2010-05-191-0/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>