]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
V4L/DVB (5058): Pvrusb2: bug fix involving switch into radio mode
[linux-2.6-omap-h63xx.git] / drivers / media / video / pvrusb2 / pvrusb2-hdw-internal.h
index 34b08fbcc6eaf8ca0beb49417408a8c17f66cfad..b9df52c882a82ff47dae29a954e550bd6497e372 100644 (file)
@@ -60,6 +60,7 @@ struct pvr2_decoder;
 
 typedef int (*pvr2_ctlf_is_dirty)(struct pvr2_ctrl *);
 typedef void (*pvr2_ctlf_clear_dirty)(struct pvr2_ctrl *);
+typedef int (*pvr2_ctlf_check_value)(struct pvr2_ctrl *,int);
 typedef int (*pvr2_ctlf_get_value)(struct pvr2_ctrl *,int *);
 typedef int (*pvr2_ctlf_set_value)(struct pvr2_ctrl *,int msk,int val);
 typedef int (*pvr2_ctlf_val_to_sym)(struct pvr2_ctrl *,int msk,int val,
@@ -83,6 +84,7 @@ struct pvr2_ctl_info {
        pvr2_ctlf_get_value get_min_value;  /* Get minimum allowed value */
        pvr2_ctlf_get_value get_max_value;  /* Get maximum allowed value */
        pvr2_ctlf_set_value set_value;      /* Set its value */
+       pvr2_ctlf_check_value check_value;  /* Check that value is valid */
        pvr2_ctlf_val_to_sym val_to_sym;    /* Custom convert value->symbol */
        pvr2_ctlf_sym_to_val sym_to_val;    /* Custom convert symbol->value */
        pvr2_ctlf_is_dirty is_dirty;        /* Return true if dirty */
@@ -212,7 +214,6 @@ struct pvr2_hdw {
        /* Frequency table */
        unsigned int freqTable[FREQTABLE_SIZE];
        unsigned int freqProgSlot;
-       unsigned int freqSlot;
 
        /* Stuff for handling low level control interaction with device */
        struct mutex ctl_lock_mutex;
@@ -258,7 +259,11 @@ struct pvr2_hdw {
        /* Tuner / frequency control stuff */
        unsigned int tuner_type;
        int tuner_updated;
-       unsigned int freqVal;
+       unsigned int freqValTelevision;  /* Current freq for tv mode */
+       unsigned int freqValRadio;       /* Current freq for radio mode */
+       unsigned int freqSlotTelevision; /* Current slot for tv mode */
+       unsigned int freqSlotRadio;      /* Current slot for radio mode */
+       unsigned int freqSelector;       /* 0=radio 1=television */
        int freqDirty;
 
        /* Video standard handling */
@@ -281,9 +286,11 @@ struct pvr2_hdw {
        int unit_number;             /* ID for driver instance */
        unsigned long serial_number; /* ID for hardware itself */
 
-       /* Minor number used by v4l logic (yes, this is a hack, as there should
-          be no v4l junk here).  Probably a better way to do this. */
-       int v4l_minor_number;
+       /* Minor numbers used by v4l logic (yes, this is a hack, as there
+          should be no v4l junk here).  Probably a better way to do this. */
+       int v4l_minor_number_video;
+       int v4l_minor_number_vbi;
+       int v4l_minor_number_radio;
 
        /* Location of eeprom or a negative number if none */
        int eeprom_addr;
@@ -319,6 +326,7 @@ struct pvr2_hdw {
        VCREATE_DATA(res_hor);
        VCREATE_DATA(res_ver);
        VCREATE_DATA(srate);
+       VCREATE_DATA(automodeswitch);
 #undef VCREATE_DATA
 
        struct pvr2_ctld_info *mpeg_ctrl_info;
@@ -327,6 +335,9 @@ struct pvr2_hdw {
        unsigned int control_cnt;
 };
 
+/* This function gets the current frequency */
+unsigned long pvr2_hdw_get_cur_freq(struct pvr2_hdw *);
+
 #endif /* __PVRUSB2_HDW_INTERNAL_H */
 
 /*