summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-02-09 23:33:37 -0600
committerMike Isely <isely@pobox.com>2008-02-09 23:33:37 -0600
commit78ab92c6f010c8435c128e9225ce2df73dbf82ac (patch)
tree87ba7665d831e1de529818bfb5bf11c543204674 /linux/drivers/media
parentac1fae037de3b5f315e4e0aabf4dd205fd4c4538 (diff)
downloadmediapointer-dvb-s2-78ab92c6f010c8435c128e9225ce2df73dbf82ac.tar.gz
mediapointer-dvb-s2-78ab92c6f010c8435c128e9225ce2df73dbf82ac.tar.bz2
pvrusb2-dvb: set to DTV mode before attaching frontend
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
index 6b3658024..433e65383 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
@@ -287,9 +287,7 @@ static int pvr2_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
PVR2_CID_INPUT),
acquire ? PVR2_CVAL_INPUT_DTV :
PVR2_CVAL_INPUT_TV);
- pvr2_hdw_commit_setup(hdw);
- pvr2_hdw_state_eval(hdw);
-// pvr2_hdw_commit_ctl(hdw);
+ pvr2_hdw_commit_ctl(hdw);
return ret;
#else
return 0;
@@ -366,13 +364,31 @@ static int pvr2_dvb_adapter_exit(struct pvr2_dvb_adapter *adap)
static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap)
{
- struct pvr2_dvb_props *dvb_props = adap->pvr->hdw->hdw_desc->dvb_props;
+ struct pvr2_hdw *hdw = adap->pvr->hdw;
+ struct pvr2_dvb_props *dvb_props = hdw->hdw_desc->dvb_props;
+ int ret;
if (dvb_props == NULL) {
err("fe_props not defined!");
return -EINVAL;
}
+ /* FIXME: This code should be moved into the core,
+ * and should only be called if we don't already have
+ * control of the bus.
+ *
+ * We can't call "pvr2_dvb_bus_ctrl(adap->fe, 1)" from here,
+ * because adap->fe isn't defined yet.
+ */
+ ret = pvr2_ctrl_set_value(pvr2_hdw_get_ctrl_by_id(hdw,
+ PVR2_CID_INPUT),
+ PVR2_CVAL_INPUT_DTV);
+ if (ret != 0)
+ return ret;
+
+ pvr2_hdw_commit_ctl(hdw);
+
+
if (dvb_props->frontend_attach == NULL) {
err("frontend_attach not defined!");
return -EINVAL;