diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-19 11:51:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 14:12:40 -0400 |
commit | 0540c4961fcc6d69b8a3314c330c376890715eee (patch) | |
tree | 8babf9a7a6d10f4ebc5990009ad64328daf044a5 /drivers/media/dvb/dvb-usb/vp702x-fe.c | |
parent | 6958effedb0dc709966c22e7fd0e8210b5401b84 (diff) |
V4L/DVB (4649): Merged VP702x support to dvb-usb multi input
The fixed support for the VP70x (supports only StarBox2) is now in sync with
latest changes in the dvb-usb framework.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/vp702x-fe.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp702x-fe.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c index d4da494132ec..41f733b47e70 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 { | |||
24 | struct dvb_frontend fe; | 24 | struct dvb_frontend fe; |
25 | struct dvb_usb_device *d; | 25 | struct dvb_usb_device *d; |
26 | 26 | ||
27 | struct dvb_frontend_ops ops; | ||
28 | |||
27 | fe_sec_voltage_t voltage; | 29 | fe_sec_voltage_t voltage; |
28 | fe_sec_tone_mode_t tone_mode; | 30 | fe_sec_tone_mode_t tone_mode; |
29 | 31 | ||
@@ -72,9 +74,6 @@ static int vp702x_fe_read_status(struct dvb_frontend* fe, fe_status_t *status) | |||
72 | else | 74 | else |
73 | *status = 0; | 75 | *status = 0; |
74 | 76 | ||
75 | deb_fe("real state: %x\n",*status); | ||
76 | *status = 0x1f; | ||
77 | |||
78 | if (*status & FE_HAS_LOCK) | 77 | if (*status & FE_HAS_LOCK) |
79 | st->status_check_interval = 1000; | 78 | st->status_check_interval = 1000; |
80 | else | 79 | else |
@@ -171,8 +170,6 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe, | |||
171 | st->status_check_interval = 250; | 170 | st->status_check_interval = 250; |
172 | st->next_status_check = jiffies; | 171 | st->next_status_check = jiffies; |
173 | 172 | ||
174 | vp702x_usb_in_op(st->d, RESET_TUNER, 0, 0, NULL, 0); | ||
175 | msleep(30); | ||
176 | vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100); | 173 | vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100); |
177 | 174 | ||
178 | if (ibuf[2] == 0 && ibuf[3] == 0) | 175 | if (ibuf[2] == 0 && ibuf[3] == 0) |
@@ -183,6 +180,20 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe, | |||
183 | return 0; | 180 | return 0; |
184 | } | 181 | } |
185 | 182 | ||
183 | static int vp702x_fe_init(struct dvb_frontend *fe) | ||
184 | { | ||
185 | struct vp702x_fe_state *st = fe->demodulator_priv; | ||
186 | deb_fe("%s\n",__FUNCTION__); | ||
187 | vp702x_usb_in_op(st->d, RESET_TUNER, 0, 0, NULL, 0); | ||
188 | return 0; | ||
189 | } | ||
190 | |||
191 | static int vp702x_fe_sleep(struct dvb_frontend *fe) | ||
192 | { | ||
193 | deb_fe("%s\n",__FUNCTION__); | ||
194 | return 0; | ||
195 | } | ||
196 | |||
186 | static int vp702x_fe_get_frontend(struct dvb_frontend* fe, | 197 | static int vp702x_fe_get_frontend(struct dvb_frontend* fe, |
187 | struct dvb_frontend_parameters *fep) | 198 | struct dvb_frontend_parameters *fep) |
188 | { | 199 | { |
@@ -207,12 +218,12 @@ static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe, | |||
207 | memcpy(&cmd[3], m->msg, m->msg_len); | 218 | memcpy(&cmd[3], m->msg, m->msg_len); |
208 | cmd[7] = vp702x_chksum(cmd,0,7); | 219 | cmd[7] = vp702x_chksum(cmd,0,7); |
209 | 220 | ||
210 | vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100); | 221 | // vp702x_usb_inout_op(st->d,cmd,8,ibuf,10,100); |
211 | 222 | ||
212 | if (ibuf[2] == 0 && ibuf[3] == 0) | 223 | // if (ibuf[2] == 0 && ibuf[3] == 0) |
213 | deb_fe("diseqc cmd failed.\n"); | 224 | // deb_fe("diseqc cmd failed.\n"); |
214 | else | 225 | // else |
215 | deb_fe("diseqc cmd succeeded.\n"); | 226 | // deb_fe("diseqc cmd succeeded.\n"); |
216 | 227 | ||
217 | return 0; | 228 | return 0; |
218 | } | 229 | } |
@@ -318,8 +329,8 @@ static struct dvb_frontend_ops vp702x_fe_ops = { | |||
318 | }, | 329 | }, |
319 | .release = vp702x_fe_release, | 330 | .release = vp702x_fe_release, |
320 | 331 | ||
321 | .init = NULL, | 332 | .init = vp702x_fe_init, |
322 | .sleep = NULL, | 333 | .sleep = vp702x_fe_sleep, |
323 | 334 | ||
324 | .set_frontend = vp702x_fe_set_frontend, | 335 | .set_frontend = vp702x_fe_set_frontend, |
325 | .get_frontend = vp702x_fe_get_frontend, | 336 | .get_frontend = vp702x_fe_get_frontend, |