summaryrefslogtreecommitdiff
path: root/v4l_experimental/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <devnull@localhost>2005-11-27 23:01:16 +0000
committerMike Isely <devnull@localhost>2005-11-27 23:01:16 +0000
commit5eee74c9dab4a2cb88a52ae96fa90fe0d2658a1e (patch)
tree9b0c06c9e42360d79620f9f52b6475551337f2b9 /v4l_experimental/pvrusb2/pvrusb2-hdw.c
parent85af92b0d83f8f1de9fc774046b3c7e16fc14ac5 (diff)
downloadmediapointer-dvb-s2-5eee74c9dab4a2cb88a52ae96fa90fe0d2658a1e.tar.gz
mediapointer-dvb-s2-5eee74c9dab4a2cb88a52ae96fa90fe0d2658a1e.tar.bz2
Pull in changes from 20051126 pvrusb2 snapshot
From: Mike Isely <isely@pobox.com> - Rework various things to play nicer in native v4l environment Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-hdw.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw.c b/v4l_experimental/pvrusb2/pvrusb2-hdw.c
index 6853db776..715fb772e 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-hdw.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-hdw.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-hdw.c,v 1.1 2005/11/14 13:31:24 mchehab Exp $
+ * $Id: pvrusb2-hdw.c,v 1.2 2005/11/27 23:01:16 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
*
@@ -702,8 +702,8 @@ void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
if (vmsk & PVR2_SUBSYS_DIGITIZER_RUN) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
- " pvr2_decoder_enable_output(0)");
- pvr2_decoder_enable_output(hdw,0);
+ " pvr2_decoder_disable_output");
+ pvr2_decoder_disable_output(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_CFG_ALL) {
hdw->subsys_enabled_mask &=
@@ -759,31 +759,31 @@ void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
" pvr2_decoder_set_norm");
- pvr2_decoder_set_norm(hdw);
+ pvr2_decoder_set_norm(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_DIGITIZER_CFG_INPUT) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
" pvr2_decoder_set_input");
- pvr2_decoder_set_input(hdw);
+ pvr2_decoder_set_input(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_DIGITIZER_CFG_SIZE) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
" pvr2_decoder_set_size");
- pvr2_decoder_set_size(hdw);
+ pvr2_decoder_set_size(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_DIGITIZER_CFG_AUDIO) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
" pvr2_decoder_set_audio");
- pvr2_decoder_set_audio(hdw);
+ pvr2_decoder_set_audio(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_DIGITIZER_CFG_BCSH) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
" pvr2_decoder_set_bcsh");
- pvr2_decoder_set_bcsh(hdw);
+ pvr2_decoder_set_bcsh(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_ENC_CFG) {
pvr2_trace(PVR2_TRACE_CTL,
@@ -801,8 +801,8 @@ void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
if (vmsk & PVR2_SUBSYS_DIGITIZER_RUN) {
pvr2_trace(PVR2_TRACE_CTL,
"/*---TRACE_CTL----*/"
- " pvr2_decoder_enable_output(1)");
- pvr2_decoder_enable_output(hdw,!0);
+ " pvr2_decoder_enable_output");
+ pvr2_decoder_enable_output(hdw->dcp);
}
if (vmsk & PVR2_SUBSYS_USBSTREAM_RUN) {
pvr2_trace(PVR2_TRACE_CTL,
@@ -982,6 +982,8 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
pvr2_reset_ctl_endpoints(hdw);
if (!pvr2_hdw_dev_ok(hdw)) return;
+ hdw->dcp = pvr2_decoder_create(hdw);
+
pvr2_eeprom_analyze(hdw);
if (!pvr2_hdw_dev_ok(hdw)) return;
@@ -1185,6 +1187,8 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)
pvr2_stream_destroy(hdw->vid_stream);
hdw->vid_stream = 0;
}
+ pvr2_decoder_destroy(hdw->dcp);
+ hdw->dcp = 0;
pvr2_i2c_done(hdw);
pvr2_hdw_remove_usb_stuff(hdw);
down(&pvr2_unit_sem); do {
@@ -1557,7 +1561,7 @@ unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw)
switch (hdw->controls[PVR2_CID_INPUT].value) {
case PVR2_CVAL_INPUT_TV:
case PVR2_CVAL_INPUT_RADIO:
- if (pvr2_decoder_is_tuned(hdw)) {
+ if (pvr2_decoder_is_tuned(hdw->dcp) > 0) {
msk |= PVR2_SIGNAL_OK;
if (pvr2_audio_update_status(hdw) == 0) {
if (hdw->flag_stereo) {