diff options
author | Mike Isely <isely@pobox.com> | 2008-04-22 14:45:40 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 14:07:47 -0300 |
commit | 84147f3dd9187cd0c9810801be1282419a8ea00a (patch) | |
tree | f3ba3d66eb43d4f0c6509b26ab99baa30acd2ba8 /drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
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/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 9408e8db98ef..8eabb67e5895 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) } +int pvr2_hdw_cmd_hcw_demod_reset(struct pvr2_hdw *hdw, int onoff) +{ + int status; + + LOCK_TAKE(hdw->ctl_lock); do { + pvr2_trace(PVR2_TRACE_INIT, "Issuing fe demod wake command"); + hdw->flag_ok = !0; + hdw->cmd_buffer[0] = FX2CMD_HCW_DEMOD_RESETIN; + hdw->cmd_buffer[1] = onoff; + status = pvr2_send_request(hdw, hdw->cmd_buffer, 2, NULL, 0); + } while (0); LOCK_GIVE(hdw->ctl_lock); + + return status; +} + +int pvr2_hdw_cmd_hcw_usbstream_dvb(struct pvr2_hdw *hdw, int onoff) +{ + int status; + LOCK_TAKE(hdw->ctl_lock); do { + hdw->cmd_buffer[0] = + (onoff ? FX2CMD_HCW_DTV_STREAMING_ON : + FX2CMD_HCW_DTV_STREAMING_OFF); + status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); + } while (0); LOCK_GIVE(hdw->ctl_lock); + return status; +} + +int pvr2_hdw_cmd_onair_fe_power_ctrl(struct pvr2_hdw *hdw, int onoff) +{ + int status; + + LOCK_TAKE(hdw->ctl_lock); do { + pvr2_trace(PVR2_TRACE_INIT, "Issuing fe power command to CPLD"); + hdw->flag_ok = !0; + hdw->cmd_buffer[0] = + (onoff ? FX2CMD_ONAIR_DTV_POWER_ON : + FX2CMD_ONAIR_DTV_POWER_OFF); + status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); + } while (0); LOCK_GIVE(hdw->ctl_lock); + + return status; +} + +int pvr2_hdw_cmd_onair_digital_path_ctrl(struct pvr2_hdw *hdw, int onoff) +{ + int status; + LOCK_TAKE(hdw->ctl_lock); do { + hdw->cmd_buffer[0] = + (onoff ? FX2CMD_ONAIR_DTV_STREAMING_ON : + FX2CMD_ONAIR_DTV_STREAMING_OFF); + status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0); + } while (0); LOCK_GIVE(hdw->ctl_lock); + return status; +} + /* Stop / start video stream transport */ static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) { |