diff options
author | Mike Isely <isely@pobox.com> | 2008-04-22 13:45:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:47 -0400 |
commit | 84147f3dd9187cd0c9810801be1282419a8ea00a (patch) | |
tree | f3ba3d66eb43d4f0c6509b26ab99baa30acd2ba8 /drivers/media/video/pvrusb2 | |
parent | 99a6acf9a7a80da49e85be964b15ffed9ab7643e (diff) |
V4L/DVB (7307): pvrusb2: New functions for additional FX2 digital-related commands
This code is actually part of a larger set from Mike Krufky
<mkrufky@linuxtv.org>, to support ATSC streaming from within the
pvrusb2 driver. More to come...
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h | 9 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 55 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.h | 8 |
3 files changed, 72 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h b/drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h index ffbc6d09610..a866c949243 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h +++ b/drivers/media/video/pvrusb2/pvrusb2-fx2-cmd.h | |||
@@ -49,6 +49,15 @@ | |||
49 | #define FX2CMD_GET_EEPROM_ADDR 0xeb | 49 | #define FX2CMD_GET_EEPROM_ADDR 0xeb |
50 | #define FX2CMD_GET_IR_CODE 0xec | 50 | #define FX2CMD_GET_IR_CODE 0xec |
51 | 51 | ||
52 | #define FX2CMD_HCW_DEMOD_RESETIN 0xf0 | ||
53 | #define FX2CMD_HCW_DTV_STREAMING_ON 0xf1 | ||
54 | #define FX2CMD_HCW_DTV_STREAMING_OFF 0xf2 | ||
55 | |||
56 | #define FX2CMD_ONAIR_DTV_STREAMING_ON 0xa0 | ||
57 | #define FX2CMD_ONAIR_DTV_STREAMING_OFF 0xa1 | ||
58 | #define FX2CMD_ONAIR_DTV_POWER_ON 0xa2 | ||
59 | #define FX2CMD_ONAIR_DTV_POWER_OFF 0xa3 | ||
60 | |||
52 | #endif /* _PVRUSB2_FX2_CMD_H_ */ | 61 | #endif /* _PVRUSB2_FX2_CMD_H_ */ |
53 | 62 | ||
54 | /* | 63 | /* |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 9408e8db98e..8eabb67e589 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -3241,6 +3241,61 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw) | |||
3241 | } | 3241 | } |
3242 | 3242 | ||
3243 | 3243 | ||
3244 | int pvr2_hdw_cmd_hcw_demod_reset(struct pvr2_hdw *hdw, int onoff) | ||
3245 | { | ||
3246 | int status; | ||
3247 | |||
3248 | LOCK_TAKE(hdw->ctl_lock); do { | ||
3249 | pvr2_trace(PVR2_TRACE_INIT, "Issuing fe demod wake command"); | ||
3250 | hdw->flag_ok = !0; | ||
3251 | hdw->cmd_buffer[0] = FX2CMD_HCW_DEMOD_RESETIN; | ||
3252 | hdw->cmd_buffer[1] = onoff; | ||
3253 | status = pvr2_send_request(hdw, hdw->cmd_buffer, 2, NULL, 0); | ||
3254 | } while (0); LOCK_GIVE(hdw->ctl_lock); | ||
3255 | |||
3256 | return status; | ||
3257 | } | ||
3258 | |||
3259 | int pvr2_hdw_cmd_hcw_usbstream_dvb(struct pvr2_hdw *hdw, int onoff) | ||
3260 | { | ||
3261 | int status; | ||
3262 | LOCK_TAKE(hdw->ctl_lock); do { | ||
3263 | hdw->cmd_buffer[0] = | ||
3264 | (onoff ? FX2CMD_HCW_DTV_STREAMING_ON : | ||
3265 | FX2CMD_HCW_DTV_STREAMING_OFF); | ||
3266 | status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); | ||
3267 | } while (0); LOCK_GIVE(hdw->ctl_lock); | ||
3268 | return status; | ||
3269 | } | ||
3270 | |||
3271 | int pvr2_hdw_cmd_onair_fe_power_ctrl(struct pvr2_hdw *hdw, int onoff) | ||
3272 | { | ||
3273 | int status; | ||
3274 | |||
3275 | LOCK_TAKE(hdw->ctl_lock); do { | ||
3276 | pvr2_trace(PVR2_TRACE_INIT, "Issuing fe power command to CPLD"); | ||
3277 | hdw->flag_ok = !0; | ||
3278 | hdw->cmd_buffer[0] = | ||
3279 | (onoff ? FX2CMD_ONAIR_DTV_POWER_ON : | ||
3280 | FX2CMD_ONAIR_DTV_POWER_OFF); | ||
3281 | status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); | ||
3282 | } while (0); LOCK_GIVE(hdw->ctl_lock); | ||
3283 | |||
3284 | return status; | ||
3285 | } | ||
3286 | |||
3287 | int pvr2_hdw_cmd_onair_digital_path_ctrl(struct pvr2_hdw *hdw, int onoff) | ||
3288 | { | ||
3289 | int status; | ||
3290 | LOCK_TAKE(hdw->ctl_lock); do { | ||
3291 | hdw->cmd_buffer[0] = | ||
3292 | (onoff ? FX2CMD_ONAIR_DTV_STREAMING_ON : | ||
3293 | FX2CMD_ONAIR_DTV_STREAMING_OFF); | ||
3294 | status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); | ||
3295 | } while (0); LOCK_GIVE(hdw->ctl_lock); | ||
3296 | return status; | ||
3297 | } | ||
3298 | |||
3244 | /* Stop / start video stream transport */ | 3299 | /* Stop / start video stream transport */ |
3245 | static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) | 3300 | static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) |
3246 | { | 3301 | { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 57e1ff49149..e9090c5064d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
@@ -258,6 +258,14 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); | |||
258 | /* suspend */ | 258 | /* suspend */ |
259 | int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *); | 259 | int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *); |
260 | 260 | ||
261 | /* Hauppauge - specific */ | ||
262 | int pvr2_hdw_cmd_hcw_demod_reset(struct pvr2_hdw *hdw, int onoff); | ||
263 | int pvr2_hdw_cmd_hcw_usbstream_dvb(struct pvr2_hdw *hdw, int onoff); | ||
264 | |||
265 | /* onair - specific */ | ||
266 | int pvr2_hdw_cmd_onair_fe_power_ctrl(struct pvr2_hdw *hdw, int onoff); | ||
267 | int pvr2_hdw_cmd_onair_digital_path_ctrl(struct pvr2_hdw *hdw, int onoff); | ||
268 | |||
261 | /* Order decoder to reset */ | 269 | /* Order decoder to reset */ |
262 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); | 270 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); |
263 | 271 | ||