diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-02-10 03:33:37 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:46 -0400 |
commit | bde316a4f1094f9a3da402c44f7315e1a94fb332 (patch) | |
tree | 3127e086a6c48868859e830ac3699b1c6929df38 /drivers/media | |
parent | bb8ce9d9143c0fe2b5cdf65fa41250446805a4be (diff) |
V4L/DVB (7683): pvrusb2-dvb: set to DTV mode before attaching frontend
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-dvb.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/drivers/media/video/pvrusb2/pvrusb2-dvb.c index bde85c973058..69ac59aa654c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-dvb.c +++ b/drivers/media/video/pvrusb2/pvrusb2-dvb.c | |||
@@ -346,13 +346,31 @@ static int pvr2_dvb_adapter_exit(struct pvr2_dvb_adapter *adap) | |||
346 | 346 | ||
347 | static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap) | 347 | static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap) |
348 | { | 348 | { |
349 | struct pvr2_dvb_props *dvb_props = adap->pvr->hdw->hdw_desc->dvb_props; | 349 | struct pvr2_hdw *hdw = adap->pvr->hdw; |
350 | struct pvr2_dvb_props *dvb_props = hdw->hdw_desc->dvb_props; | ||
351 | int ret; | ||
350 | 352 | ||
351 | if (dvb_props == NULL) { | 353 | if (dvb_props == NULL) { |
352 | err("fe_props not defined!"); | 354 | err("fe_props not defined!"); |
353 | return -EINVAL; | 355 | return -EINVAL; |
354 | } | 356 | } |
355 | 357 | ||
358 | /* FIXME: This code should be moved into the core, | ||
359 | * and should only be called if we don't already have | ||
360 | * control of the bus. | ||
361 | * | ||
362 | * We can't call "pvr2_dvb_bus_ctrl(adap->fe, 1)" from here, | ||
363 | * because adap->fe isn't defined yet. | ||
364 | */ | ||
365 | ret = pvr2_ctrl_set_value(pvr2_hdw_get_ctrl_by_id(hdw, | ||
366 | PVR2_CID_INPUT), | ||
367 | PVR2_CVAL_INPUT_DTV); | ||
368 | if (ret != 0) | ||
369 | return ret; | ||
370 | |||
371 | pvr2_hdw_commit_ctl(hdw); | ||
372 | |||
373 | |||
356 | if (dvb_props->frontend_attach == NULL) { | 374 | if (dvb_props->frontend_attach == NULL) { |
357 | err("frontend_attach not defined!"); | 375 | err("frontend_attach not defined!"); |
358 | return -EINVAL; | 376 | return -EINVAL; |