Merge branch 'origin'
[pandora-kernel.git] / drivers / media / dvb / ttpci / av7110.h
index cce00ef..3e2e121 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/dvb/ca.h>
 #include <linux/dvb/osd.h>
 #include <linux/dvb/net.h>
+#include <linux/mutex.h>
 
 #include "dvbdev.h"
 #include "demux.h"
@@ -98,7 +99,8 @@ struct av7110 {
        int adac_type;         /* audio DAC type */
 #define DVB_ADAC_TI      0
 #define DVB_ADAC_CRYSTAL  1
-#define DVB_ADAC_MSP     2
+#define DVB_ADAC_MSP34x0  2
+#define DVB_ADAC_MSP34x5  3
 #define DVB_ADAC_NONE   -1
 
 
@@ -126,7 +128,7 @@ struct av7110 {
        /* DEBI and polled command interface */
 
        spinlock_t              debilock;
-       struct semaphore        dcomlock;
+       struct mutex            dcomlock;
        volatile int            debitype;
        volatile int            debilen;
 
@@ -145,7 +147,7 @@ struct av7110 {
 
        int                     osdwin;      /* currently active window */
        u16                     osdbpp[8];
-       struct semaphore        osd_sema;
+       struct mutex            osd_mutex;
 
        /* CA */
 
@@ -171,7 +173,7 @@ struct av7110 {
        struct tasklet_struct   vpe_tasklet;
 
        int                     fe_synced;
-       struct semaphore        pid_mutex;
+       struct mutex            pid_mutex;
 
        int                     video_blank;
        struct video_status     videostate;
@@ -228,6 +230,9 @@ struct av7110 {
        struct dvb_video_events  video_events;
        video_size_t             video_size;
 
+       u16                     wssMode;
+       u16                     wssData;
+
        u32                     ir_config;
        u32                     ir_command;
        void                    (*ir_handler)(struct av7110 *av7110, u32 ircom);
@@ -245,6 +250,15 @@ struct av7110 {
 
        struct dvb_frontend* fe;
        fe_status_t fe_status;
+
+       /* crash recovery */
+       void                            (*recover)(struct av7110* av7110);
+       struct dvb_frontend_parameters  saved_fe_params;
+       fe_sec_voltage_t                saved_voltage;
+       fe_sec_tone_mode_t              saved_tone;
+       struct dvb_diseqc_master_cmd    saved_master_cmd;
+       fe_sec_mini_cmd_t               saved_minicmd;
+
        int (*fe_init)(struct dvb_frontend* fe);
        int (*fe_read_status)(struct dvb_frontend* fe, fe_status_t* status);
        int (*fe_diseqc_reset_overload)(struct dvb_frontend* fe);
@@ -252,7 +266,7 @@ struct av7110 {
        int (*fe_diseqc_send_burst)(struct dvb_frontend* fe, fe_sec_mini_cmd_t minicmd);
        int (*fe_set_tone)(struct dvb_frontend* fe, fe_sec_tone_mode_t tone);
        int (*fe_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage);
-       int (*fe_dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned int cmd);
+       int (*fe_dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
        int (*fe_set_frontend)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
 };
 
@@ -260,8 +274,6 @@ struct av7110 {
 extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
                       u16 subpid, u16 pcrpid);
 
-extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
-
 extern int av7110_ir_init(struct av7110 *av7110);
 extern void av7110_ir_exit(struct av7110 *av7110);