diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.h')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 3ad7a13d6c39..20295e0c1995 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
@@ -40,9 +40,10 @@ | |||
40 | 40 | ||
41 | /* Legal values for the INPUT state variable */ | 41 | /* Legal values for the INPUT state variable */ |
42 | #define PVR2_CVAL_INPUT_TV 0 | 42 | #define PVR2_CVAL_INPUT_TV 0 |
43 | #define PVR2_CVAL_INPUT_SVIDEO 1 | 43 | #define PVR2_CVAL_INPUT_DTV 1 |
44 | #define PVR2_CVAL_INPUT_COMPOSITE 2 | 44 | #define PVR2_CVAL_INPUT_COMPOSITE 2 |
45 | #define PVR2_CVAL_INPUT_RADIO 3 | 45 | #define PVR2_CVAL_INPUT_SVIDEO 3 |
46 | #define PVR2_CVAL_INPUT_RADIO 4 | ||
46 | 47 | ||
47 | enum pvr2_config { | 48 | enum pvr2_config { |
48 | pvr2_config_empty, /* No configuration */ | 49 | pvr2_config_empty, /* No configuration */ |
@@ -90,9 +91,6 @@ enum pvr2_v4l_type { | |||
90 | /* Translate configuration enum to a string label */ | 91 | /* Translate configuration enum to a string label */ |
91 | const char *pvr2_config_get_name(enum pvr2_config); | 92 | const char *pvr2_config_get_name(enum pvr2_config); |
92 | 93 | ||
93 | /* Translate a master state enum to a string label */ | ||
94 | const char *pvr2_hdw_get_state_name(unsigned int); | ||
95 | |||
96 | struct pvr2_hdw; | 94 | struct pvr2_hdw; |
97 | 95 | ||
98 | /* Create and return a structure for interacting with the underlying | 96 | /* Create and return a structure for interacting with the underlying |
@@ -100,14 +98,15 @@ struct pvr2_hdw; | |||
100 | struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | 98 | struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, |
101 | const struct usb_device_id *devid); | 99 | const struct usb_device_id *devid); |
102 | 100 | ||
101 | /* Perform second stage initialization, passing in a notification callback | ||
102 | for when the master state changes. */ | ||
103 | int pvr2_hdw_initialize(struct pvr2_hdw *, | ||
104 | void (*callback_func)(void *), | ||
105 | void *callback_data); | ||
106 | |||
103 | /* Destroy hardware interaction structure */ | 107 | /* Destroy hardware interaction structure */ |
104 | void pvr2_hdw_destroy(struct pvr2_hdw *); | 108 | void pvr2_hdw_destroy(struct pvr2_hdw *); |
105 | 109 | ||
106 | /* Register a function to be called whenever the master state changes. */ | ||
107 | void pvr2_hdw_set_state_callback(struct pvr2_hdw *, | ||
108 | void (*callback_func)(void *), | ||
109 | void *callback_data); | ||
110 | |||
111 | /* Return true if in the ready (normal) state */ | 110 | /* Return true if in the ready (normal) state */ |
112 | int pvr2_hdw_dev_ok(struct pvr2_hdw *); | 111 | int pvr2_hdw_dev_ok(struct pvr2_hdw *); |
113 | 112 | ||
@@ -146,6 +145,23 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *, | |||
146 | /* Commit all control changes made up to this point */ | 145 | /* Commit all control changes made up to this point */ |
147 | int pvr2_hdw_commit_ctl(struct pvr2_hdw *); | 146 | int pvr2_hdw_commit_ctl(struct pvr2_hdw *); |
148 | 147 | ||
148 | /* Return a bit mask of valid input selections for this device. Mask bits | ||
149 | * will be according to PVR_CVAL_INPUT_xxxx definitions. */ | ||
150 | unsigned int pvr2_hdw_get_input_available(struct pvr2_hdw *); | ||
151 | |||
152 | /* Return a bit mask of allowed input selections for this device. Mask bits | ||
153 | * will be according to PVR_CVAL_INPUT_xxxx definitions. */ | ||
154 | unsigned int pvr2_hdw_get_input_allowed(struct pvr2_hdw *); | ||
155 | |||
156 | /* Change the set of allowed input selections for this device. Both | ||
157 | change_mask and change_valu are mask bits according to | ||
158 | PVR_CVAL_INPUT_xxxx definitions. The change_mask parameter indicate | ||
159 | which settings are being changed and the change_val parameter indicates | ||
160 | whether corresponding settings are being set or cleared. */ | ||
161 | int pvr2_hdw_set_input_allowed(struct pvr2_hdw *, | ||
162 | unsigned int change_mask, | ||
163 | unsigned int change_val); | ||
164 | |||
149 | /* Return name for this driver instance */ | 165 | /* Return name for this driver instance */ |
150 | const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *); | 166 | const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *); |
151 | 167 | ||
@@ -250,6 +266,9 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *); | |||
250 | /* Execute simple reset command */ | 266 | /* Execute simple reset command */ |
251 | int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); | 267 | int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); |
252 | 268 | ||
269 | /* suspend */ | ||
270 | int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *); | ||
271 | |||
253 | /* Order decoder to reset */ | 272 | /* Order decoder to reset */ |
254 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); | 273 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); |
255 | 274 | ||