blob: b9517e1cac0812770b9da1b65d047346c55dc58d [file] [log] [blame]
Mike Isely989eb152007-11-26 01:53:12 -03001/*
2 *
3 * $Id$
4 *
5 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21#ifndef __PVRUSB2_DEVATTR_H
22#define __PVRUSB2_DEVATTR_H
23
24#include <linux/mod_devicetable.h>
25
26/*
27
28 This header defines structures used to describe attributes of a device.
29
30*/
31
32
33struct pvr2_string_table {
34 const char **lst;
35 unsigned int cnt;
36};
37
Mike Iselyf5174af2007-11-26 02:07:26 -030038#define PVR2_ROUTING_SCHEME_HAUPPAUGE 0
Mike Isely9e2e3ae2007-11-26 02:14:23 -030039#define PVR2_ROUTING_SCHEME_GOTVIEW 1
Mike Isely989eb152007-11-26 01:53:12 -030040
41/* This describes a particular hardware type (except for the USB device ID
42 which must live in a separate structure due to environmental
43 constraints). See the top of pvrusb2-hdw.c for where this is
44 instantiated. */
45struct pvr2_device_desc {
46 /* Single line text description of hardware */
47 const char *description;
48
49 /* Single token identifier for hardware */
50 const char *shortname;
51
52 /* List of additional client modules we need to load */
53 struct pvr2_string_table client_modules;
54
55 /* List of FX2 firmware file names we should search; if empty then
56 FX2 firmware check / load is skipped and we assume the device
57 was initialized from internal ROM. */
58 struct pvr2_string_table fx2_firmware;
59
Mike Iselyf5174af2007-11-26 02:07:26 -030060 /* Signal routing scheme used by device, contains one of
61 PVR2_ROUTING_SCHEME_XXX. Schemes have to be defined as we
62 encounter them. This is an arbitrary integer scheme id; its
63 meaning is contained entirely within the driver and is
64 interpreted by logic which must send commands to the chip-level
65 drivers (search for things which touch this field). */
66 unsigned int signal_routing_scheme;
67
Mike Iselyaaf78842007-11-26 02:04:11 -030068 /* V4L tuner type ID to use with this device (only used if the
69 driver could not discover the type any other way). */
70 int default_tuner_type;
71
Mike Isely989eb152007-11-26 01:53:12 -030072 /* If set, we don't bother trying to load cx23416 firmware. */
73 char flag_skip_cx23416_firmware;
74
Mike Iselyaaf78842007-11-26 02:04:11 -030075 /* Device has a hauppauge eeprom which we can interrogate. */
76 char flag_has_hauppauge_rom;
77
Mike Isely989eb152007-11-26 01:53:12 -030078 /* Device does not require a powerup command to be issued. */
79 char flag_no_powerup;
80
81 /* Device has a cx25840 - this enables special additional logic to
82 handle it. */
83 char flag_has_cx25840;
84
85 /* Device has a wm8775 - this enables special additional logic to
86 ensure that it is found. */
87 char flag_has_wm8775;
Mike Isely056d1a82007-11-26 02:09:42 -030088
89 /* Device has IR hardware that can be faked into looking like a
90 normal Hauppauge i2c IR receiver. */
91 char flag_has_hauppauge_custom_ir;
Mike Isely989eb152007-11-26 01:53:12 -030092};
93
94extern const struct pvr2_device_desc pvr2_device_descriptions[];
95extern struct usb_device_id pvr2_device_table[];
96extern const unsigned int pvr2_device_count;
97
98#endif /* __PVRUSB2_HDW_INTERNAL_H */
99
100/*
101 Stuff for Emacs to see, in order to encourage consistent editing style:
102 *** Local Variables: ***
103 *** mode: c ***
104 *** fill-column: 75 ***
105 *** tab-width: 8 ***
106 *** c-basic-offset: 8 ***
107 *** End: ***
108 */