Thomas Gleixner | 1a59d1b8 | 2019-05-27 08:55:05 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* Linux driver for Philips webcam |
Luc Saillard | 2b455db | 2006-04-24 10:29:46 -0300 | [diff] [blame] | 3 | (C) 2004-2006 Luc Saillard (luc@saillard.org) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Hans de Goede | a08d2c7 | 2011-12-31 07:45:39 -0300 | [diff] [blame] | 33 | #include "pwc.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
Luc Saillard | 9ee6d78 | 2007-04-22 23:54:36 -0300 | [diff] [blame] | 35 | #define PWC_FPS_MAX_TIMON 6 |
| 36 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Luc Saillard | 9ee6d78 | 2007-04-22 23:54:36 -0300 | [diff] [blame] | 45 | extern const struct Timon_table_entry Timon_table[PSZ_MAX][PWC_FPS_MAX_TIMON][4]; |
Luc Saillard | 2b455db | 2006-04-24 10:29:46 -0300 | [diff] [blame] | 46 | extern const unsigned int TimonRomTable [16][2][16][8]; |
Luc Saillard | 9ee6d78 | 2007-04-22 23:54:36 -0300 | [diff] [blame] | 47 | extern const unsigned int Timon_fps_vector[PWC_FPS_MAX_TIMON]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
| 49 | #endif |
| 50 | |
| 51 | |