#
VERSION=2.13.6
#6:  gspca - ov519: Fix LED inversion of some ov519 webcams
#	The list of the webcams which have LED inversion was rebuild scanning
#	ms-win .inf files.
#    gspca - tp6800: adjust the decompression qualities
#5:  gspca - ov534_9: Use the new control mechanism
#    gspca - ov534_9: New sensor ov9712 and new webcam 05a9:8065
#	The webcam is build from a Omnivision test kit that contains an OV538 bridge
#	with an OV9712 sensor.
#4:  gspca - main: remove the limitation of interrupt polling
#    gspca - main: Fix the isochronous transfer interval.
#	For USB speeds different of 'low', the bInterval value is logarithmic.
#    gspca - main: Handle the xHCI error on usb_set_interface()
#	This patch is adapted from a patch from Sarah Sharp (2010/05/03).
#	The xHCD handler checks the USB bandwidth on usb_set_interface()
#	instead of on usb_submit_urb().
#	Now, the same treatment is applied in case of error of both functions.
#    gspca - sonixj: fix again bad reg17 setting for om6802 in 320x240
#3:  gspca - tp6800: fix bad probe of tp6810 + cx0342
#    gspca - tp6800: autogain does not work with tp6810 + cx0342
#    gspca - tp6800: more gain scale for soi763a
#    gspca - tp6800: accept some abnormal tp6810 isoc packets
#    gspca - tp6800: adjust frame rate from exposure value
#    gspca - tp6800: adjust auto quality for tp6810
#    gspca - sonixj: Bad reg17 setting for om6802
#		(from Luiz Ramos)
#    gspca - sonixj: Fix image too dark in 320x240 for sensor om6802
#	In 320x240, the bridge clock must run slower for a same sensor clock.
#    gspca - sonixj: Remove useless code
#	- clock (reg01) already 48 MHz for 320x240 (hv7131r and mi0360)
#2:  gspca - tp6800: adjust the frame rate control of the tp6810
#    gspca - tp6800: replace ovxxxx by soi763a
#    gspca - tp6800: add autogain for tp6810
#    gspca - tp6800: change default quality to 13 for soi763a
#    gspca - tp6800: ignore higher bits of quality in the tp6810 frame header
#    gspca - tp6800: small changes in tp6810 start sequences (reg 7d)
#    gspca - dist: do 'rm' of 'make install' work with 'sh'
#    gspca - main: Better values for V4L2_FMT_FLAG_COMPRESSED
#	In vidioc_enum_fmt_vid_cap, the 'compressed' flag was set from the
#	pixelformat, and all pixelformats were not treated.
#	Now, images are said as compressed when the image size is smaller than
#	its number of pixels.
#    gspca - benq: Remove useless function sd_isoc_init
#	The sd_isoc_init() did only a set interface which is done in gspca main.
#    gspca - main: Use a better altsetting for image transfer
#	Previously image transfer used to use the highest altsetting, which, most of
#	the time, took the whole USB bandwidth.
#	Now, the altsetting is chosen according to an estimation of the bandwidth
#	needed for image transfer.
#1:  gspca - kinect: add its generation in build/Makefile
#    gspca - stv06xx: Remove useless debug messages.
#	This subdriver displayed information already displayed by the gspca main
#	or available by usbmon.
#    gspca - tp6800: fix the settings of JPEG compression / decompression
#    gspca - tp6800: adjust controls for tp6810 and ovxxxx
#0:  gspca - zc3xx: Set the color matrix for sensors hv7131b and mc501cb
#    gspca - zc3xx: Set the reset level for sensors hv7131b/r
#    gspca - zc3xx: Don't probe the sensor hv7131r at start time
#    gspca - zc3xx: Set the exposure of hv7131r at start time
#    gspca - main: Set a correct interval for input polling
#	The interrupt intervals of USB2.0 and USB3.0 are logarithmic.
#		(removed later)
#    gspca - main: Limit the input polling interval
#	The input polling does not need to be very precise.
#	Restricting to 4 or 5 times per second seems enough.
#		(removed later)
# 2.12
#25: gspca - zc3xx: Set the quality for sensor hv7131r
#    gspca - zc3xx: Don't touch the zc3xx register 018
#    gspca - tp6800: lack of quality for tp6810 + ovxxxx
#    gspca - tp6800: no frame rate for tp6810
#    gspca - tp6800: add tp6810 sensor probe
#		(and fix the i2c 16 bits write)
#24: gspca - tp6800: add some delays
#    gspca - tp6800: add the sensor ovxxxx for tp6810
#23: gspca - sonixj: More exposure at start time for soi768
#    gspca - sonixj: Cleanup the brightness control of the om6802
#    gspca - sonixj: Adjust the contrast control
#    gspca - main: Clear the bulk pipe after the subdriver start
#22: gspca - main: direction test in alt_xfer
#    gspca - ov519: Change default exposure
#21  gspca - nw80x: remove gain (and autogain) for Spacecam
#    gspca - nw80x: Add brightness for Spacecam
#20  gspca - nw80x: Add exposure, gain and autogain for Spacecam
#19  gspca - nw80x: add more exchanges in 'Spacecam' start
#16  gspca - ov519: fix a bug in disabling exposure when AGC
#12: gspca - tp6800: small changes for tp6810/cx0342
#    gspca - tp6800: add 640x480 for tp6810/cx0342
#11: gspca - tp6800: bad pkt scan and bad quant. tb for chip tp6810
#10: gspca - tp6800: handle the chip tp6810
#6   gspca - sonixj: Change the fill ratios for quality change
#5:  gspca - main: Optimize code
#    gspca - ov519: handle the frame rate of the ov2610ae
#    (dist) remove the .ko.gz on 'make install'
# 2.11
#20: gspca - tp6800: the resolutions were inverted
#    gspca - tp6800: change the jpeg quantication tables for ovxxxx
#19: gspca - tp6800: fix some strange and bad isoc packets
#    gspca - tp6800: add delay on USB write
#    gspca - tp6800: load only once the fix i2c parameters
#    gspca - tp6800: try to do real 640x480 for ovxxxx
#18: gspca - tp6800: info message if the sensor is not forced
#17: gspca - tp6800: bad init of the color table
#    gspca - tp6800: adjust the quantization tables from the webcam quality
#    gspca - vc032x: change some values of po3130nc from ms-win driver
#    gspca - vc032x: add sharpness control to po3130nc
#    gspca - vc032x: remove control setting on po3130nc capture start
#13: gspca - tp6800: fix a crash at capture start with sensor CX0342
#12: gspca - tp6800: fix bad jpeg header
#11: gspca - tp6800: add jpeg quality and exposure and gain controls
#    gspca - tp6800: add webcam 06a2:6810
#8:  gspca - tp6800: fix bad frame rate setting for cx0342
#    gspca - tp6800: set the asked frame rate for ovxxxx
#    gspca - stv06xx - st6422: Use the new control mechanism
#    gspca - stv06xx: Move the packet scan routine of st6422
#7:  gspca - tp6800: add USB traces
#    gspca - tp6800: display the ovxxx id after capture start
#    gspca - zc3xx: Remove some sensors from the chipset table
#	Some values of the chipset ID do not identify the sensor.
#    gspca - zc3xx: Probe the sensor gc0303
#6:  gspca - tp6800: add gamma control
#    gspca - tp6800: add 640x480 for ovxxxx (not handled)
#4:  gspca - ov519: Add get/set streamparm for frame rate
#		Also, remove the module parameter 'frame_rate'.
#    gspca - zc3xx: Bad detection of some tas5130c sensors
# 2.10
#19: gspca: Convert hexadecimal values from uppercase to lowercase
#14: gspca - tp6800: use the new video control mechanism.
#    gspca - main: let set the input 0.
#13  gspca - main: bad setting of video standard
#12: gspca - spca505: Use the new video control mechanism.
#    (dist: remove .mod.c)
#11: gspca - main: Handle multi video inputs
#    gspca - main: Handle video standards
#    gspca - spca505: Merge spca506 into spca505 and remove spca506
#		This change was needed to handle the USB device 0733:0430 which may be
#		the webcam Intel PC Camera Pro CS430 or the PixelView PlayTV
#		(PV-321 USB-TV-FM-Capture Box ?)
#		The grabber parts now include input and standard selection.
#    gspca - spca505: Fix a bad value in TV start
#9:  gspca - vc032x: Add 1280x1024 resolution for sensor po3130nc
#    gspca - spca505: Set the names to the known bridge registers
#    gspca - spca505: Propagate USB errors to higher level
#8:  gspca - main: Disable debug messages by default
#    gspca - vc032x: Add poxxxx controls to po3130nc
#    gspca - vc032x: Let 046d:0892 and 046d:0896 as po3130nc instead of poxxxx
#7:  gspca - vc032x: Cleanup source
#    gspca - vc032x: Let sensor probe of 046d:0892 and 046d:0896 (poxxxx)
#    gspca - vc032x: remove full start and stop0 for poxxxx
#    gspca - zc3xx: Adjust exchanges for the webcam KMC-90.
#		The exchanges cs2102k are removed and replaced by hdcs2020.
#		The exchanges hdcs2020 now include some KMC-90 specific ones.
#			(i2c addr, control2 instead of control, ..)
#    dist: remove unless things (crebuildir.sh - Makefile targets)
#6:  gspca - zc3xx: Update the init sequences of sensor cs2102k (hdcs2020)
#		The new exchanges are extracted from the public file usbvm31b.inf of the
#		ms-Windows driver for the KMC-90 webcam.
#		In this file, the sensor is named cs2102 but it is a hdcs2020.
#    gspca - zc3xx: Update the init sequences of sensor hdcs2020
#		The new exchanges are extracted from the public file usbvm303.inf of the
#		ms-Windows driver for 0ac8:303b.
#5:  gspca - vc032x: remove poxxxx double start
#    gspca - vc032x: do full init of poxxx at probe time
#    gspca - vc032x: restore values of sensor poxxxx reg 20
#    gspca - vc032x: compile option no_poxxx
#3:  gspca - vc032x: remove vc321_reset
#    gspca - vc032x: Add 160x120 for sensor poxxxx
#    gspca - vc032x: change value of sensor reg 20 of poxxxx
#    gspca - vc032x: rearrange the start sequences of poxxxx
#    gspca - vc032x: option double start for poxxxx
#		(removed)
#    gspca - zc3xx: check the mi360soc sensor ID after start
#2:  gspca - vc032x: remove the new values of ms-win poxxxxx
#    gspca - vc032x: Bad settings of req 87 and 88.
#1:  gspca - zc3xx: Add the reset_resume function.
#    gspca - zc3xx: Display Micron sensor ID.
#0:  gspca - vc032x: Initialize critical registers at probe time.
#		The associated sequence was removed some time ago.
#		It is useful for integrated webcams.
#		(removed)
# 2.9
#52: gspca - vc032x: Add the reset_resume function.
#51: gspca - vc032x: always full start and full stop (b300 & b003)
#50: gspca - vc032x: fix the first backlight exchange
#    gspca - vc032x: add POXXX_TEST_1 and 2 for 30s problem
#49: gspca - vc032x: remove some previous discrete values from new ms-win driver
#48: gspca - vc032x: Adjust exchanges of poxxxx from newer ms-win driver.
#47: gspca - vc032x: Don't stop the poxxxx webcams on close.
#    gspca - vc032x: Add trace of USB exchanges
#46: gspca - vc032x: Check and set a main register at poxxxx connect time
#    gspca - vc032x: Split the start exchanges of poxxxx
#		The start exchange is splitted into two parts, and the first part
#			is sent on cold start only.
#    gspca - vc032x: Don't stop immediately the poxxxx webcams on close.
#		The full stop of the webcam (for return to cold state) is
#			done 30s after close.
#		(not done)
#    gspca - vc032x: remove 1280x1024 from poxxxx
#45  gspca - vc032x: Add 1280x1024 resolution for sensor poxxxx.
#		(removed later)
#44: gspca - vc032x: Add some delays for poxxxx.
#    gspca - pac7302/11: Change some initialization values.
#		The new values are extracted from Pac7302.inf for 093a:2620
#		version 1.0.0.19 07/04/30.
#		- set back the EOF control in pkt_scan
#43  gspca - tp6800: define a color table for the sensor ovxxxx
#42  gspca - zc3xx: Adjust icm105a exchanges from ms-win driver.
#    gspca - pac7302/11: Fix lack of end of image.
#	It seems that the JPEG end of frame (ff d9) is not present
#	or is not at the awaited place for some webcams.
#	The problem was introduced by commit
#		327c4abf74a4426676df6c359b2a3dea2a5d126e
#		(removed later)
#20: gspca - tp6800: change ovxxxx_r from ms-win driver
#		     add sharpness control
#		     small changes in init / start
#		     other gamma table for ovxxxx
#19: gspca - tp6800: change ovxxxx_r
#17: gspca - tp6800: adjust ovxxxx init (gamma)
#15: gspca - tp6800: fix a bug in bulk write
#12: gspca - tp6800: dd the sensor ovxxxx
#    gspca - tp6800: New subdriver
# 7: gspca - tasc: bug in sd_start
# 6: gspca - tasc: New subdriver.

KVER=$(shell uname -r)
KSRC=/lib/modules/$(KVER)/build
KGSPCADIR=/lib/modules/$(KVER)/kernel/drivers/media/video/gspca

all: modules

modules:
	$(MAKE) -C $(KSRC) M=$(PWD)/build modules

gspca_%::
	$(MAKE) -C $(KSRC) M=$(PWD)/build gspca_main.ko $@

install:
	rm -f $(KGSPCADIR)/gspca*.ko $(KGSPCADIR)/*/gspca*.ko \
		$(KGSPCADIR)/gspca*.gz $(KGSPCADIR)/*/gspca*.gz; \
	install -c -m 0644 build/*.ko $(KGSPCADIR)/; \
	depmod

# local development
dist:
	ln -s . gspca-$(VERSION); \
	files=`ls gspca-$(VERSION)/build/*.c | fgrep -v .mod.c`; \
	tar -zcvf gspca-$(VERSION).tar.gz \
		gspca-$(VERSION)/Makefile \
		gspca-$(VERSION)/README \
		gspca-$(VERSION)/build/Makefile \
		gspca-$(VERSION)/build/gspca.h.orig \
		gspca-$(VERSION)/build/*.h \
		$$files; \
	rm gspca-$(VERSION)
.PHONY: dist driver install update modules
