diff options
author | Mike Isely <isely@pobox.com> | 2006-03-25 16:40:16 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2006-03-25 16:40:16 -0600 |
commit | 22184ee779d37f2c64b08ea427d939f0e2d58b37 (patch) | |
tree | adfb0a1119f17af1ea3cd344bbf04a51f128a766 /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
parent | acea6b43b12c290328f857fa981b2c8b3d598b45 (diff) | |
download | mediapointer-dvb-s2-22184ee779d37f2c64b08ea427d939f0e2d58b37.tar.gz mediapointer-dvb-s2-22184ee779d37f2c64b08ea427d939f0e2d58b37.tar.bz2 |
Implement method in pvrusb2 to force the decoder to reset
From: Mike Isely <isely@pobox.com>
This change threads logic through the pvrusb2 to make it possible to
command the decoder chip to reset itself. The method is
decoder-agnostic; the part of the pvrusb2 which control's that chip's
module has to provide the final hook. This just lays the foundation.
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 6a729c4c7..16757a8fb 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2420,6 +2420,27 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) } +int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw) +{ + if (!hdw->decoder_ctrl) { + pvr2_trace(PVR2_TRACE_INIT, + "Unable to reset decoder: nothing attached"); + return -ENOTTY; + } + + if (!hdw->decoder_ctrl->force_reset) { + pvr2_trace(PVR2_TRACE_INIT, + "Unable to reset decoder: not implemented"); + return -ENOTTY; + } + + pvr2_trace(PVR2_TRACE_INIT, + "Requesting decoder reset"); + hdw->decoder_ctrl->force_reset(hdw->decoder_ctrl->ctxt); + return 0; +} + + int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) { int status; |