aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index d7a216b41b72..a3fe251d6fd9 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -163,6 +163,11 @@ struct pvr2_decoder_ctrl {
163#define FW1_STATE_RELOAD 3 163#define FW1_STATE_RELOAD 3
164#define FW1_STATE_OK 4 164#define FW1_STATE_OK 4
165 165
166/* What state the device is in if it is a hybrid */
167#define PVR2_PATHWAY_UNKNOWN 0
168#define PVR2_PATHWAY_ANALOG 1
169#define PVR2_PATHWAY_DIGITAL 2
170
166typedef int (*pvr2_i2c_func)(struct pvr2_hdw *,u8,u8 *,u16,u8 *, u16); 171typedef int (*pvr2_i2c_func)(struct pvr2_hdw *,u8,u8 *,u16,u8 *, u16);
167#define PVR2_I2C_FUNC_CNT 128 172#define PVR2_I2C_FUNC_CNT 128
168 173
@@ -182,7 +187,6 @@ struct pvr2_hdw {
182 struct workqueue_struct *workqueue; 187 struct workqueue_struct *workqueue;
183 struct work_struct workpoll; /* Update driver state */ 188 struct work_struct workpoll; /* Update driver state */
184 struct work_struct worki2csync; /* Update i2c clients */ 189 struct work_struct worki2csync; /* Update i2c clients */
185 struct work_struct workinit; /* Driver initialization sequence */
186 190
187 /* Video spigot */ 191 /* Video spigot */
188 struct pvr2_stream *vid_stream; 192 struct pvr2_stream *vid_stream;
@@ -229,17 +233,19 @@ struct pvr2_hdw {
229 233
230 /* Bits of state that describe what is going on with various parts 234 /* Bits of state that describe what is going on with various parts
231 of the driver. */ 235 of the driver. */
236 int state_pathway_ok; /* Pathway config is ok */
232 int state_encoder_ok; /* Encoder is operational */ 237 int state_encoder_ok; /* Encoder is operational */
233 int state_encoder_run; /* Encoder is running */ 238 int state_encoder_run; /* Encoder is running */
234 int state_encoder_config; /* Encoder is configured */ 239 int state_encoder_config; /* Encoder is configured */
235 int state_encoder_waitok; /* Encoder pre-wait done */ 240 int state_encoder_waitok; /* Encoder pre-wait done */
241 int state_encoder_runok; /* Encoder has run for >= .25 sec */
236 int state_decoder_run; /* Decoder is running */ 242 int state_decoder_run; /* Decoder is running */
237 int state_usbstream_run; /* FX2 is streaming */ 243 int state_usbstream_run; /* FX2 is streaming */
238 int state_decoder_quiescent; /* Decoder idle for > 50msec */ 244 int state_decoder_quiescent; /* Decoder idle for > 50msec */
239 int state_pipeline_config; /* Pipeline is configured */ 245 int state_pipeline_config; /* Pipeline is configured */
240 int state_pipeline_req; /* Somebody wants to stream */ 246 int state_pipeline_req; /* Somebody wants to stream */
241 int state_pipeline_pause; /* Pipeline must be paused */ 247 int state_pipeline_pause; /* Pipeline must be paused */
242 int state_pipeline_idle; /* Pipeline not running */ 248 int state_pipeline_idle; /* Pipeline not running */
243 249
244 /* This is the master state of the driver. It is the combined 250 /* This is the master state of the driver. It is the combined
245 result of other bits of state. Examining this will indicate the 251 result of other bits of state. Examining this will indicate the
@@ -247,6 +253,9 @@ struct pvr2_hdw {
247 PVR2_STATE_xxxx */ 253 PVR2_STATE_xxxx */
248 unsigned int master_state; 254 unsigned int master_state;
249 255
256 /* True if device led is currently on */
257 int led_on;
258
250 /* True if states must be re-evaluated */ 259 /* True if states must be re-evaluated */
251 int state_stale; 260 int state_stale;
252 261
@@ -259,6 +268,9 @@ struct pvr2_hdw {
259 /* Timer for measuring encoder pre-wait time */ 268 /* Timer for measuring encoder pre-wait time */
260 struct timer_list encoder_wait_timer; 269 struct timer_list encoder_wait_timer;
261 270
271 /* Timer for measuring encoder minimum run time */
272 struct timer_list encoder_run_timer;
273
262 /* Place to block while waiting for state changes */ 274 /* Place to block while waiting for state changes */
263 wait_queue_head_t state_wait_data; 275 wait_queue_head_t state_wait_data;
264 276
@@ -267,6 +279,7 @@ struct pvr2_hdw {
267 int flag_disconnected; /* flag_ok == 0 due to disconnect */ 279 int flag_disconnected; /* flag_ok == 0 due to disconnect */
268 int flag_init_ok; /* true if structure is fully initialized */ 280 int flag_init_ok; /* true if structure is fully initialized */
269 int fw1_state; /* current situation with fw1 */ 281 int fw1_state; /* current situation with fw1 */
282 int pathway_state; /* one of PVR2_PATHWAY_xxx */
270 int flag_decoder_missed;/* We've noticed missing decoder */ 283 int flag_decoder_missed;/* We've noticed missing decoder */
271 int flag_tripped; /* Indicates overall failure to start */ 284 int flag_tripped; /* Indicates overall failure to start */
272 285
@@ -323,6 +336,11 @@ struct pvr2_hdw {
323 int v4l_minor_number_vbi; 336 int v4l_minor_number_vbi;
324 int v4l_minor_number_radio; 337 int v4l_minor_number_radio;
325 338
339 /* Bit mask of PVR2_CVAL_INPUT choices which are valid for the hardware */
340 unsigned int input_avail_mask;
341 /* Bit mask of PVR2_CVAL_INPUT choices which are currenly allowed */
342 unsigned int input_allowed_mask;
343
326 /* Location of eeprom or a negative number if none */ 344 /* Location of eeprom or a negative number if none */
327 int eeprom_addr; 345 int eeprom_addr;
328 346