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.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index 34b08fbcc6ea..16bd74199601 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -60,6 +60,7 @@ struct pvr2_decoder;
60 60
61typedef int (*pvr2_ctlf_is_dirty)(struct pvr2_ctrl *); 61typedef int (*pvr2_ctlf_is_dirty)(struct pvr2_ctrl *);
62typedef void (*pvr2_ctlf_clear_dirty)(struct pvr2_ctrl *); 62typedef void (*pvr2_ctlf_clear_dirty)(struct pvr2_ctrl *);
63typedef int (*pvr2_ctlf_check_value)(struct pvr2_ctrl *,int);
63typedef int (*pvr2_ctlf_get_value)(struct pvr2_ctrl *,int *); 64typedef int (*pvr2_ctlf_get_value)(struct pvr2_ctrl *,int *);
64typedef int (*pvr2_ctlf_set_value)(struct pvr2_ctrl *,int msk,int val); 65typedef int (*pvr2_ctlf_set_value)(struct pvr2_ctrl *,int msk,int val);
65typedef int (*pvr2_ctlf_val_to_sym)(struct pvr2_ctrl *,int msk,int val, 66typedef int (*pvr2_ctlf_val_to_sym)(struct pvr2_ctrl *,int msk,int val,
@@ -83,6 +84,7 @@ struct pvr2_ctl_info {
83 pvr2_ctlf_get_value get_min_value; /* Get minimum allowed value */ 84 pvr2_ctlf_get_value get_min_value; /* Get minimum allowed value */
84 pvr2_ctlf_get_value get_max_value; /* Get maximum allowed value */ 85 pvr2_ctlf_get_value get_max_value; /* Get maximum allowed value */
85 pvr2_ctlf_set_value set_value; /* Set its value */ 86 pvr2_ctlf_set_value set_value; /* Set its value */
87 pvr2_ctlf_check_value check_value; /* Check that value is valid */
86 pvr2_ctlf_val_to_sym val_to_sym; /* Custom convert value->symbol */ 88 pvr2_ctlf_val_to_sym val_to_sym; /* Custom convert value->symbol */
87 pvr2_ctlf_sym_to_val sym_to_val; /* Custom convert symbol->value */ 89 pvr2_ctlf_sym_to_val sym_to_val; /* Custom convert symbol->value */
88 pvr2_ctlf_is_dirty is_dirty; /* Return true if dirty */ 90 pvr2_ctlf_is_dirty is_dirty; /* Return true if dirty */
@@ -135,17 +137,10 @@ struct pvr2_ctrl {
135}; 137};
136 138
137 139
138struct pvr2_audio_stat {
139 void *ctxt;
140 void (*detach)(void *);
141 int (*status)(void *);
142};
143
144struct pvr2_decoder_ctrl { 140struct pvr2_decoder_ctrl {
145 void *ctxt; 141 void *ctxt;
146 void (*detach)(void *); 142 void (*detach)(void *);
147 void (*enable)(void *,int); 143 void (*enable)(void *,int);
148 int (*tuned)(void *);
149 void (*force_reset)(void *); 144 void (*force_reset)(void *);
150}; 145};
151 146
@@ -212,7 +207,6 @@ struct pvr2_hdw {
212 /* Frequency table */ 207 /* Frequency table */
213 unsigned int freqTable[FREQTABLE_SIZE]; 208 unsigned int freqTable[FREQTABLE_SIZE];
214 unsigned int freqProgSlot; 209 unsigned int freqProgSlot;
215 unsigned int freqSlot;
216 210
217 /* Stuff for handling low level control interaction with device */ 211 /* Stuff for handling low level control interaction with device */
218 struct mutex ctl_lock_mutex; 212 struct mutex ctl_lock_mutex;
@@ -258,9 +252,17 @@ struct pvr2_hdw {
258 /* Tuner / frequency control stuff */ 252 /* Tuner / frequency control stuff */
259 unsigned int tuner_type; 253 unsigned int tuner_type;
260 int tuner_updated; 254 int tuner_updated;
261 unsigned int freqVal; 255 unsigned int freqValTelevision; /* Current freq for tv mode */
256 unsigned int freqValRadio; /* Current freq for radio mode */
257 unsigned int freqSlotTelevision; /* Current slot for tv mode */
258 unsigned int freqSlotRadio; /* Current slot for radio mode */
259 unsigned int freqSelector; /* 0=radio 1=television */
262 int freqDirty; 260 int freqDirty;
263 261
262 /* Current tuner info - this information is polled from the I2C bus */
263 struct v4l2_tuner tuner_signal_info;
264 int tuner_signal_stale;
265
264 /* Video standard handling */ 266 /* Video standard handling */
265 v4l2_std_id std_mask_eeprom; // Hardware supported selections 267 v4l2_std_id std_mask_eeprom; // Hardware supported selections
266 v4l2_std_id std_mask_avail; // Which standards we may select from 268 v4l2_std_id std_mask_avail; // Which standards we may select from
@@ -281,20 +283,17 @@ struct pvr2_hdw {
281 int unit_number; /* ID for driver instance */ 283 int unit_number; /* ID for driver instance */
282 unsigned long serial_number; /* ID for hardware itself */ 284 unsigned long serial_number; /* ID for hardware itself */
283 285
284 /* Minor number used by v4l logic (yes, this is a hack, as there should 286 /* Minor numbers used by v4l logic (yes, this is a hack, as there
285 be no v4l junk here). Probably a better way to do this. */ 287 should be no v4l junk here). Probably a better way to do this. */
286 int v4l_minor_number; 288 int v4l_minor_number_video;
289 int v4l_minor_number_vbi;
290 int v4l_minor_number_radio;
287 291
288 /* Location of eeprom or a negative number if none */ 292 /* Location of eeprom or a negative number if none */
289 int eeprom_addr; 293 int eeprom_addr;
290 294
291 enum pvr2_config config; 295 enum pvr2_config config;
292 296
293 /* Information about what audio signal we're hearing */
294 int flag_stereo;
295 int flag_bilingual;
296 struct pvr2_audio_stat *audio_stat;
297
298 /* Control state needed for cx2341x module */ 297 /* Control state needed for cx2341x module */
299 struct cx2341x_mpeg_params enc_cur_state; 298 struct cx2341x_mpeg_params enc_cur_state;
300 struct cx2341x_mpeg_params enc_ctl_state; 299 struct cx2341x_mpeg_params enc_ctl_state;
@@ -327,6 +326,9 @@ struct pvr2_hdw {
327 unsigned int control_cnt; 326 unsigned int control_cnt;
328}; 327};
329 328
329/* This function gets the current frequency */
330unsigned long pvr2_hdw_get_cur_freq(struct pvr2_hdw *);
331
330#endif /* __PVRUSB2_HDW_INTERNAL_H */ 332#endif /* __PVRUSB2_HDW_INTERNAL_H */
331 333
332/* 334/*