summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-02-03 17:48:09 -0600
committerMike Isely <isely@pobox.com>2008-02-03 17:48:09 -0600
commit0925f6ad8494d423299231d3915d4339b0f277e1 (patch)
tree9ab2a5ffc3c4436aa61529900d5f10bcf0104bcc /linux
parentc7200b4f826eb632eb0a22e9cfa45d97a579e801 (diff)
downloadmediapointer-dvb-s2-0925f6ad8494d423299231d3915d4339b0f277e1.tar.gz
mediapointer-dvb-s2-0925f6ad8494d423299231d3915d4339b0f277e1.tar.bz2
pvrusb2-dvb: add pvr2_dvb_bus_ctrl to allow frontends to negotiate bus access
From: Michael Krufky <mkrufky@linuxtv.org> This function is just a skeleton for now - a placeholder to remind us to fix it. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
index 18c18db2f..74bbd8e0f 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.c
@@ -39,6 +39,32 @@ static int pvr2_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
return 0; /* FIXME: pvr2_dvb_ctrl_feed(dvbdmxfeed, 0); */
}
+static int pvr2_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
+{
+ /* TO DO: This function will call into the core and request for
+ * input to be set to 'dtv' if (acquire) and if it isn't set already.
+ *
+ * If (!acquire) then we should do nothing -- don't switch inputs
+ * again unless the analog side of the driver requests the bus.
+ */
+#if 0
+ struct pvr2_dvb_adapter *adap = fe->dvb->priv;
+ struct pvr2_hdw *hdw = adap->pvr->hdw;
+ int ret = 0;
+
+ ret = pvr2_ctrl_set_value(pvr2_hdw_get_ctrl_by_id(hdw,
+ 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);
+ return ret;
+#else
+ return 0;
+#endif
+}
+
static int pvr2_dvb_adapter_init(struct pvr2_dvb_adapter *adap)
{
int ret;
@@ -136,6 +162,9 @@ static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap)
if (adap->fe->ops.analog_ops.standby)
adap->fe->ops.analog_ops.standby(adap->fe);
+ /* Ensure all frontends negotiate bus access */
+ adap->fe->ops.ts_bus_ctrl = pvr2_dvb_bus_ctrl;
+
} else {
err("no frontend was attached!");
return -ENODEV;