aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/sonixb.c
AgeCommit message (Collapse)Author
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-22[media] gspca - sonixb: Clenup sourceJean-François Moine
- update copyright and module author - set the sensor table as constant Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - sonixb: Update inactive flags to reflect autogain settingHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - sonixb: Use the new control mechanismJean-François Moine
Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19[media] gspca: Remove __devinit, __devinitconst and __devinitdataJean-François Moine
__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>
2011-01-19[media] gspca_sonixb: Fix mirrored image with ov7630Hans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19[media] gspca_sonixb: Add usb ids for known sn9c103 camerasHans de Goede
Now that our bridge code is unified for sn9c101/102 and sn9c103 models, the sn9c103 models should simply work, given that the only difference in the sn9c103 is audio support and a gamma correction table. 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>
2011-01-19[media] gspca_sonixb: TAS5130C brightness control really is a gain controlHans de Goede
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>
2011-01-19[media] gspca_sonixb: Fix TAS5110D sensor gain controlHans de Goede
Also fix the issue of the image being mirrored. 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>
2011-01-19[media] gspca_sonixb: Adjust autoexposure window for vga cams so that it is ↵Hans de Goede
centered 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>
2011-01-19[media] gspca_sonixb: Refactor to unify bridge handlingHans de Goede
Refactor the code to unify how the sn9c101/102 and the sn9c103 bridge are handled. Also move code which is the same for all sensors from the per sensor init register settings to a central place. 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>
2010-12-29[media] gspca_sonixb: Add support for 0c45:602aHans de Goede
Add support for cameras with the HV7131D sensor, such as the 0c45:602a Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] gspca_sonixb: Rewrite start of frame detectionHans de Goede
Our old start of frame detection code wrongly assumes that the sof marker always lives at the beginning of the frame. At least for the 0c45:602a camera this is not the case. This patch also improves the framerate from 28 fps to 30 fps with the 0c45:6005 and 0c45:6007 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] gspca_sonixb: Make sonixb handle 0c45:6007 instead of sn9c102Hans de Goede
I've a 0c45:6007 camera and it works fine with the gspca_sonixb driver, so make that handle it instead of the deprecated sn9c102 driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] gspca: Convert some uppercase hexadecimal values to lowercaseJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] gspca: Fix coding style issuesJean-François Moine
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>
2010-10-21V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=mJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: gspca - all modules: Remove useless module load/unload messagesJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - main: Don't use the frame buffer flagsJean-François Moine
This patch fixes possible race conditions in queue management with SMP: when a frame was completed, the irq function tried to use the next frame buffer. At this time, it was possible that the application on an other processor updated the frame pointer, making the image to point to a bad buffer. The patch contains two main changes: - the image transfer uses the queue indexes which are protected against simultaneous memory access, - the image pointer which is used for image concatenation is only set at interrupt level. Some subdrivers which used the image pointer have been updated. Reported-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - main: Simplify image buildingJean-François Moine
The image pointer and its length are now in the main structure instead of in the frame buffer. They are updated on application vidioc_qbuf and in the URB interrupt function when ending an image. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: gspca - sonixb: Have 0c45:602e handled by sonixb instead of sn9c102Jean-François Moine
This change fixes the Debian Bug #579332 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579332 Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 camerasHans de Goede
Make the sonixb driver handle pas106 and pas202 cameras, when both it and the sn9c102 driver are enabled in the kernel configuration. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrlsHans de Goede
Fixup brightness ctrl and add gain and exposure ctrls for PAS106B sensors, this allows enabling autogain (done), and makes the cam usable in low light conditions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: Documentation: gspca.txt: update known mr97310a camsHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480Hans de Goede
In 640x480, if the reg11 has less than 4, the image is unstable (the bridge goes into a higher compression mode which we have not reverse engineered yet). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and ↵Hans de Goede
exposure ctrls Fixup brightness ctrl and add gain and exposure ctrls for PAS202BCB sensors, this allows enabling autogain (done), and makes the cam usable in low light conditions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine ↵Hans de Goede
expo ctrl Some sensors only allow controlling the exposure by changing the clockdiv, which means that exposure takes pretty large jumps (for example when going from a div of 1 to 2, the exposure doubles). Use 2 different entries in the controls array for these 2 different types of exposure (always disabling one), and; Add a new autogain algorithm for the coarse exposure case, which normally changes the gain setting, only touching the exposure setting if the desired luminance cannot be reached with gain, and after an exposure change once more first tries gain, etc. Thus avoiding exposure changes, and the resulting oscilation because of the huge steps these exposure controls take. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_sonixb: leave bridge gain at 1.0 when we have a sensor gainHans de Goede
Leave bridge gain at 1.0 when we have a sensor gain, while at it also change the bridge gain setting code to write both registers in one go saving us a usb transaction. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_sonixb: Add support for camera buttonHans de Goede
gspca_sonixb: Add support for camera button Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (14001): gscpa_sonixb: Differentiate between tas5110c and tas5110d ↵Hans de Goede
and fix d hstart Our hstart value was wrong for tas5110d sensor using sonixb cams, this patch fixes this. Many thanks to Paulus (laudaka) for donating me a camera with such a sensor IC. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.Marton Nemeth
The ctrls field of struct sd_desc is declared as const in gspca.h. It is worth to initialize the content also with constant values. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13621): gspca - some subdrivers: Make device_table[]s constant.Márton Németh
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-09Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (345 commits) V4L/DVB (13542): ir-keytable: Allow dynamic table change V4L/DVB (13541): atbm8830: replace 64-bit division and floating point usage V4L/DVB (13540): ir-common: Cleanup get key evdev code V4L/DVB (13539): ir-common: add __func__ for debug messages V4L/DVB (13538): ir-common: Use a dynamic keycode table V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code V4L/DVB (13534): ir-common: Remove some unused fields/structs V4L/DVB (13533): ir: use dynamic tables, instead of static ones V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it V4L/DVB (13458): go7007: subdev conversion V4L/DVB (13457): s2250: subdev conversion V4L/DVB (13456): s2250: Change module structure V4L/DVB (13528): em28xx: add support for em2800 VC211A card em28xx: don't reduce scale to half size for em2800 em28xx: don't load audio modules when AC97 is mis-detected em28xx: em2800 chips support max width of 640 V4L/DVB (13523): dvb-bt8xx: fix compile warning ... Fix up trivial conflicts due to spelling fixes from the trivial tree in Documentation/video4linux/gspca.txt drivers/media/video/cx18/cx18-mailbox.h
2009-12-05V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from ↵Jean-Francois Moine
pkt_scan(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-16V4L/DVB (11715): gspca - main: Set the number of packets per ISOC message.Jean-Francois Moine
The number of packets per isochronous message may now be set by the subdrivers (default value 32). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10336): gspca - all subdrivers: Return ret instead of -1 in ↵Alexey Klimov
sd_mod_init. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10335): gspca - all subdrivers: Fix CodingStyle in sd_mod_init ↵Alexey Klimov
function. Introduce int ret and check it value after call to usb_register(). Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10333): gspca - main and many subdrivers: Remove the epaddr variable.Jean-Francois Moine
The transfer endpoint address is now automatically chosen. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (10049): gspca - many subdrivers: Set 'const' the pixel format table.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9560): gspca: Let gspca handle the webcam 0c45:602c instead of sn9c102.Jean-Francois Moine
According to http://bugzilla.kernel.org/show_bug.cgi?id=11920, the driver sn9c102 does not work for this webcam. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9565): gspca: Remove empty lines in traces.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9543): gspca: Adjust autoexpo values for cams with a vga sensor in ↵Hans de Goede
sonixb. - This patch makes sonixb.c strife to different values during autoexposure for sif versus vga sensors. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (9079): gspca: Return error code from stream start functions.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8906): v4l-dvb: fix assorted sparse warningsHans Verkuil
Fix sparse warnings. None are serious, but cutting down on these helps find future serious sparse warnings/errors. Redid the av7710.c patch based on a suggestion by Oliver Endriss. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-10V4L/DVB (8559a): Fix a merge conflict at gspca/sonixbMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-04V4L/DVB (8874): gspca: Adjust hstart for sn9c103/ov7630 and update usb-id's.Hans de Goede
- Adjust hstart in ov7630 on sn9c103 initdata to shift bayer pattern, this is the same change as done for the other initdata tables in a previous patch. - Assign usb-id's for the ov7630 + sn9c103 to gspca if gspca and sn9c102 drivers are both enabled. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04V4L/DVB (8870): gspca: Fix dark room problem with sonixb.Hans de Goede
When using the sonixb driver in a dark room and given that the autoexposure algorithm starts with a setting most suitable for daylight, the picture produced by the cam may actually be 100% black leading to a avg_lum value of 0, so an avg_lum value of 0 does not always signal an exposure settings change (which it normally does). This patch adds a check for the really black image case and stops dropping all frames as invalid in this case. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04V4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 ↵Hans de Goede
to gspca. This patch makes gspca claim the USB-ID for sn9c101/2 cams with a TAS5110C1B sensor even if both gspca and sn9c102 are enabled, as these cams are much better supported under gspca (and extensively tested with gspca). It also removes an usb-id from sn9c102 for one more unsupported bridge sensor combo. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04V4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb.Hans de Goede
- Add documentation for some known registers - Add support for vga modes (320x240, 160x120) for sif sensors - Remove F_RAW sensor flag raw mode should work on any sensor as its a bridge only thing and keeping the flag was becoming awkward. - Fixup ov6650 and pas106 auto exposure window settings Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>