aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/vp702x-fe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/vp702x-fe.c')
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x-fe.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c
index d4da494132ec78..3ecb2e0ce80f7e 100644
--- a/drivers/media/dvb/dvb-usb/vp702x-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c
@@ -24,6 +24,8 @@ struct vp702x_fe_state {
struct dvb_frontend fe;
struct dvb_usb_device *d;
+ struct dvb_frontend_ops ops;
+
fe_sec_voltage_t voltage;
fe_sec_tone_mode_t tone_mode;
@@ -72,9 +74,6 @@ static int vp702x_fe_read_status(struct dvb_frontend* fe, fe_status_t *status)
else
*status = 0;
- deb_fe("real state: %x\n",*status);
- *status = 0x1f;
-
if (*status & FE_HAS_LOCK)
st->status_check_interval = 1000;
else
@@ -171,8 +170,6 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe,
st->status_check_interval = 250;
st->next_status_check = jiffies;
- vp702x_usb_in_op(st->d, RESET_TUNER, 0, 0, NULL, 0);
- msleep(30);
vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100);
if (ibuf[2] == 0 && ibuf[3] == 0)
@@ -183,6 +180,20 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe,
return 0;
}
+static int vp702x_fe_init(struct dvb_frontend *fe)
+{
+ struct vp702x_fe_state *st = fe->demodulator_priv;
+ deb_fe("%s\n",__FUNCTION__);
+ vp702x_usb_in_op(st->d, RESET_TUNER, 0, 0, NULL, 0);
+ return 0;
+}
+
+static int vp702x_fe_sleep(struct dvb_frontend *fe)
+{
+ deb_fe("%s\n",__FUNCTION__);
+ return 0;
+}
+
static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
struct dvb_frontend_parameters *fep)
{
@@ -193,8 +204,8 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
struct dvb_diseqc_master_cmd *m)
{
- struct vp702x_fe_state *st = fe->demodulator_priv;
- u8 cmd[8],ibuf[10];
+ //struct vp702x_fe_state *st = fe->demodulator_priv;
+ u8 cmd[8];//,ibuf[10];
memset(cmd,0,8);
deb_fe("%s\n",__FUNCTION__);
@@ -207,12 +218,12 @@ static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
memcpy(&cmd[3], m->msg, m->msg_len);
cmd[7] = vp702x_chksum(cmd,0,7);
- vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100);
+// vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100);
- if (ibuf[2] == 0 && ibuf[3] == 0)
- deb_fe("diseqc cmd failed.\n");
- else
- deb_fe("diseqc cmd succeeded.\n");
+// if (ibuf[2] == 0 && ibuf[3] == 0)
+// deb_fe("diseqc cmd failed.\n");
+// else
+// deb_fe("diseqc cmd succeeded.\n");
return 0;
}
@@ -318,8 +329,8 @@ static struct dvb_frontend_ops vp702x_fe_ops = {
},
.release = vp702x_fe_release,
- .init = NULL,
- .sleep = NULL,
+ .init = vp702x_fe_init,
+ .sleep = vp702x_fe_sleep,
.set_frontend = vp702x_fe_set_frontend,
.get_frontend = vp702x_fe_get_frontend,