summaryrefslogtreecommitdiff
path: root/v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h')
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h48
1 files changed, 39 insertions, 9 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h b/v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h
index fb274daea..bcdf143f6 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h
+++ b/v4l_experimental/pvrusb2/pvrusb2-hdw-internal.h
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-hdw-internal.h,v 1.3 2005/12/07 06:53:52 mcisely Exp $
+ * $Id: pvrusb2-hdw-internal.h,v 1.4 2006/01/01 08:26:03 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
*
@@ -58,6 +58,29 @@ struct pvr2_ctl_state {
int dirty;
};
+struct pvr2_audio_stat {
+ void *ctxt;
+ void (*detach)(void *);
+ int (*status)(void *);
+};
+
+struct pvr2_decoder_ctrl {
+ void *ctxt;
+ void (*detach)(void *);
+ void (*enable)(void *,int);
+ int (*tuned)(void *);
+};
+
+#define PVR2_I2C_PEND_DETECT 0x01 /* Need to detect a client type */
+#define PVR2_I2C_PEND_CLIENT 0x02 /* Client needs a specific update */
+#define PVR2_I2C_PEND_REFRESH 0x04 /* Client has specific pending bits */
+#define PVR2_I2C_PEND_STALE 0x08 /* Broadcast pending bits */
+
+#define PVR2_I2C_PEND_ALL (PVR2_I2C_PEND_DETECT |\
+ PVR2_I2C_PEND_CLIENT |\
+ PVR2_I2C_PEND_REFRESH |\
+ PVR2_I2C_PEND_STALE)
+
/* This structure contains all state data directly needed to
manipulate the hardware (as opposed to complying with a kernel
interface) */
@@ -73,17 +96,21 @@ struct pvr2_hdw {
struct semaphore big_lock_sem;
int big_lock_held; /* For debugging */
+ void (*poll_trigger_func)(void *);
+ void *poll_trigger_data;
+
char name[32];
/* I2C stuff */
struct i2c_adapter i2c_adap;
struct i2c_algorithm i2c_algo;
int i2c_linked;
- struct i2c_client *i2c_tuner_client;
- struct i2c_client *i2c_ifhandler_client;
- struct i2c_client *i2c_audio_client;
- struct i2c_client *i2c_video_client;
- struct i2c_client *i2c_tveeprom_client;
+ unsigned int i2c_pend_types; /* Which types of update are needed */
+ unsigned long i2c_pend_mask; /* Change bits we need to scan */
+ unsigned long i2c_stale_mask; /* Pending broadcast change bits */
+ unsigned long i2c_active_mask; /* All change bits currently in use */
+ struct list_head i2c_clients;
+ struct semaphore i2c_list_lock;
/* Frequency table */
unsigned int freqTable[FREQTABLE_SIZE];
@@ -110,6 +137,10 @@ struct pvr2_hdw {
int flag_init_ok; // true if structure is fully initialized
int flag_streaming_enabled; // true if streaming should be on
+ int flag_decoder_is_tuned;
+
+ struct pvr2_decoder_ctrl *decoder_ctrl;
+
// CPU firmware info (used to help find / save firmware data)
char *fw_buffer;
unsigned int fw_size;
@@ -122,11 +153,9 @@ struct pvr2_hdw {
/* Tuner / frequency control stuff */
unsigned int tuner_type;
+ int tuner_updated;
unsigned long video_standards;
- /* Context for controller video decoder (see pvrusb2-video.h) */
- struct pvr2_decoder *dcp;
-
int unit_number; /* ID for driver instance */
unsigned long serial_number; /* ID for hardware itself */
@@ -139,6 +168,7 @@ struct pvr2_hdw {
/* Information about what audio signal we're hearing */
int flag_stereo;
int flag_bilingual;
+ struct pvr2_audio_stat *audio_stat;
/* Every last bit of controllable state */
struct pvr2_ctl_state controls[PVR2_CID_COUNT];