xref: /openbmc/linux/drivers/media/usb/pwc/pwc-timon.h (revision 867e6d38)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Linux driver for Philips webcam
3    (C) 2004-2006 Luc Saillard (luc@saillard.org)
4 
5    NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
6    driver and thus may have bugs that are not present in the original version.
7    Please send bug reports and support requests to <luc@saillard.org>.
8    The decompression routines have been implemented by reverse-engineering the
9    Nemosoft binary pwcx module. Caveat emptor.
10 
11 */
12 
13 
14 
15 /* This tables contains entries for the 675/680/690 (Timon) camera, with
16    4 different qualities (no compression, low, medium, high).
17    It lists the bandwidth requirements for said mode by its alternate interface
18    number. An alternate of 0 means that the mode is unavailable.
19 
20    There are 6 * 4 * 4 entries:
21      6 different resolutions subqcif, qsif, qcif, sif, cif, vga
22      6 framerates: 5, 10, 15, 20, 25, 30
23      4 compression modi: none, low, medium, high
24 
25    When an uncompressed mode is not available, the next available compressed mode
26    will be chosen (unless the decompressor is absent). Sometimes there are only
27    1 or 2 compressed modes available; in that case entries are duplicated.
28 */
29 
30 #ifndef PWC_TIMON_H
31 #define PWC_TIMON_H
32 
33 #include "pwc.h"
34 
35 #define PWC_FPS_MAX_TIMON 6
36 
37 struct Timon_table_entry
38 {
39 	char alternate;			/* USB alternate interface */
40 	unsigned short packetsize;	/* Normal packet size */
41 	unsigned short bandlength;	/* Bandlength when decompressing */
42 	unsigned char mode[13];		/* precomputed mode settings for cam */
43 };
44 
45 extern const struct Timon_table_entry Timon_table[PSZ_MAX][PWC_FPS_MAX_TIMON][4];
46 extern const unsigned int TimonRomTable [16][2][16][8];
47 extern const unsigned int Timon_fps_vector[PWC_FPS_MAX_TIMON];
48 
49 #endif
50 
51 
52