diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-devattr.h')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-devattr.h | 72 |
1 files changed, 57 insertions, 15 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/drivers/media/video/pvrusb2/pvrusb2-devattr.h index 64b467f0637f..c2e2b06fe2e0 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.h +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.h | |||
@@ -23,6 +23,9 @@ | |||
23 | 23 | ||
24 | #include <linux/mod_devicetable.h> | 24 | #include <linux/mod_devicetable.h> |
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB | ||
27 | #include "pvrusb2-dvb.h" | ||
28 | #endif | ||
26 | 29 | ||
27 | /* | 30 | /* |
28 | 31 | ||
@@ -39,6 +42,13 @@ struct pvr2_string_table { | |||
39 | #define PVR2_ROUTING_SCHEME_HAUPPAUGE 0 | 42 | #define PVR2_ROUTING_SCHEME_HAUPPAUGE 0 |
40 | #define PVR2_ROUTING_SCHEME_GOTVIEW 1 | 43 | #define PVR2_ROUTING_SCHEME_GOTVIEW 1 |
41 | 44 | ||
45 | #define PVR2_DIGITAL_SCHEME_NONE 0 | ||
46 | #define PVR2_DIGITAL_SCHEME_HAUPPAUGE 1 | ||
47 | #define PVR2_DIGITAL_SCHEME_ONAIR 2 | ||
48 | |||
49 | #define PVR2_LED_SCHEME_NONE 0 | ||
50 | #define PVR2_LED_SCHEME_HAUPPAUGE 1 | ||
51 | |||
42 | /* This describes a particular hardware type (except for the USB device ID | 52 | /* This describes a particular hardware type (except for the USB device ID |
43 | which must live in a separate structure due to environmental | 53 | which must live in a separate structure due to environmental |
44 | constraints). See the top of pvrusb2-hdw.c for where this is | 54 | constraints). See the top of pvrusb2-hdw.c for where this is |
@@ -58,40 +68,64 @@ struct pvr2_device_desc { | |||
58 | was initialized from internal ROM. */ | 68 | was initialized from internal ROM. */ |
59 | struct pvr2_string_table fx2_firmware; | 69 | struct pvr2_string_table fx2_firmware; |
60 | 70 | ||
71 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB | ||
72 | /* callback functions to handle attachment of digital tuner & demod */ | ||
73 | struct pvr2_dvb_props *dvb_props; | ||
74 | |||
75 | #endif | ||
76 | /* Initial standard bits to use for this device, if not zero. | ||
77 | Anything set here is also implied as an available standard. | ||
78 | Note: This is ignored if overridden on the module load line via | ||
79 | the video_std module option. */ | ||
80 | v4l2_std_id default_std_mask; | ||
81 | |||
82 | /* V4L tuner type ID to use with this device (only used if the | ||
83 | driver could not discover the type any other way). */ | ||
84 | int default_tuner_type; | ||
85 | |||
61 | /* Signal routing scheme used by device, contains one of | 86 | /* Signal routing scheme used by device, contains one of |
62 | PVR2_ROUTING_SCHEME_XXX. Schemes have to be defined as we | 87 | PVR2_ROUTING_SCHEME_XXX. Schemes have to be defined as we |
63 | encounter them. This is an arbitrary integer scheme id; its | 88 | encounter them. This is an arbitrary integer scheme id; its |
64 | meaning is contained entirely within the driver and is | 89 | meaning is contained entirely within the driver and is |
65 | interpreted by logic which must send commands to the chip-level | 90 | interpreted by logic which must send commands to the chip-level |
66 | drivers (search for things which touch this field). */ | 91 | drivers (search for things which touch this field). */ |
67 | unsigned int signal_routing_scheme; | 92 | unsigned char signal_routing_scheme; |
68 | 93 | ||
69 | /* V4L tuner type ID to use with this device (only used if the | 94 | /* Indicates scheme for controlling device's LED (if any). The |
70 | driver could not discover the type any other way). */ | 95 | driver will turn on the LED when streaming is underway. This |
71 | int default_tuner_type; | 96 | contains one of PVR2_LED_SCHEME_XXX. */ |
97 | unsigned char led_scheme; | ||
72 | 98 | ||
73 | /* Initial standard bits to use for this device, if not zero. | 99 | /* Control scheme to use if there is a digital tuner. This |
74 | Anything set here is also implied as an available standard. | 100 | contains one of PVR2_DIGITAL_SCHEME_XXX. This is an arbitrary |
75 | Note: This is ignored if overridden on the module load line via | 101 | integer scheme id; its meaning is contained entirely within the |
76 | the video_std module option. */ | 102 | driver and is interpreted by logic which must control the |
77 | v4l2_std_id default_std_mask; | 103 | streaming pathway (search for things which touch this field). */ |
104 | unsigned char digital_control_scheme; | ||
78 | 105 | ||
79 | /* If set, we don't bother trying to load cx23416 firmware. */ | 106 | /* If set, we don't bother trying to load cx23416 firmware. */ |
80 | char flag_skip_cx23416_firmware; | 107 | int flag_skip_cx23416_firmware:1; |
108 | |||
109 | /* If set, the encoder must be healthy in order for digital mode to | ||
110 | work (otherwise we assume that digital streaming will work even | ||
111 | if we fail to locate firmware for the encoder). If the device | ||
112 | doesn't support digital streaming then this flag has no | ||
113 | effect. */ | ||
114 | int flag_digital_requires_cx23416:1; | ||
81 | 115 | ||
82 | /* Device has a hauppauge eeprom which we can interrogate. */ | 116 | /* Device has a hauppauge eeprom which we can interrogate. */ |
83 | char flag_has_hauppauge_rom; | 117 | int flag_has_hauppauge_rom:1; |
84 | 118 | ||
85 | /* Device does not require a powerup command to be issued. */ | 119 | /* Device does not require a powerup command to be issued. */ |
86 | char flag_no_powerup; | 120 | int flag_no_powerup:1; |
87 | 121 | ||
88 | /* Device has a cx25840 - this enables special additional logic to | 122 | /* Device has a cx25840 - this enables special additional logic to |
89 | handle it. */ | 123 | handle it. */ |
90 | char flag_has_cx25840; | 124 | int flag_has_cx25840:1; |
91 | 125 | ||
92 | /* Device has a wm8775 - this enables special additional logic to | 126 | /* Device has a wm8775 - this enables special additional logic to |
93 | ensure that it is found. */ | 127 | ensure that it is found. */ |
94 | char flag_has_wm8775; | 128 | int flag_has_wm8775:1; |
95 | 129 | ||
96 | /* Device has IR hardware that can be faked into looking like a | 130 | /* Device has IR hardware that can be faked into looking like a |
97 | normal Hauppauge i2c IR receiver. This is currently very | 131 | normal Hauppauge i2c IR receiver. This is currently very |
@@ -101,7 +135,15 @@ struct pvr2_device_desc { | |||
101 | to virtualize the presence of the non-existant IR receiver chip and | 135 | to virtualize the presence of the non-existant IR receiver chip and |
102 | implement the virtual receiver in terms of appropriate FX2 | 136 | implement the virtual receiver in terms of appropriate FX2 |
103 | commands. */ | 137 | commands. */ |
104 | char flag_has_hauppauge_custom_ir; | 138 | int flag_has_hauppauge_custom_ir:1; |
139 | |||
140 | /* These bits define which kinds of sources the device can handle. | ||
141 | Note: Digital tuner presence is inferred by the | ||
142 | digital_control_scheme enumeration. */ | ||
143 | int flag_has_fmradio:1; /* Has FM radio receiver */ | ||
144 | int flag_has_analogtuner:1; /* Has analog tuner */ | ||
145 | int flag_has_composite:1; /* Has composite input */ | ||
146 | int flag_has_svideo:1; /* Has s-video input */ | ||
105 | }; | 147 | }; |
106 | 148 | ||
107 | extern struct usb_device_id pvr2_device_table[]; | 149 | extern struct usb_device_id pvr2_device_table[]; |