aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-09-25 11:41:53 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:13:46 -0400
commitba7e6f3e3e639de2597afffaae3fda75f6e6082d (patch)
tree4bd222eaa0101a02b3c9fd68b031a20eb030bfc9 /drivers
parent43e0602222e861957c82a7ddc7c4c2062c1aebbb (diff)
V4L/DVB (4665): Add frontend structure callback for bus acquisition.
This patch enables generic bus arbitration callbacks enabling dvbcore frontend_open and frontend_release to pass 'acquire' and 'release' hardware messages back into the DVB bridge frameworks. Frameworks like cx88 can then implement single bus multiple demod card sharing features, which would prohibit two frontends from attempting to use a single transport bus at the same time. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c10
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 3dd5dbafb330..53304e6991ac 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1014,6 +1014,13 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
1014 if ((ret = dvb_generic_open (inode, file)) < 0) 1014 if ((ret = dvb_generic_open (inode, file)) < 0)
1015 return ret; 1015 return ret;
1016 1016
1017 if (fe->ops.ts_bus_ctrl) {
1018 if ((ret = fe->ops.ts_bus_ctrl (fe, 1)) < 0) {
1019 dvb_generic_release (inode, file);
1020 return ret;
1021 }
1022 }
1023
1017 if ((file->f_flags & O_ACCMODE) != O_RDONLY) { 1024 if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
1018 1025
1019 /* normal tune mode when opened R/W */ 1026 /* normal tune mode when opened R/W */
@@ -1043,6 +1050,9 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
1043 if ((file->f_flags & O_ACCMODE) != O_RDONLY) 1050 if ((file->f_flags & O_ACCMODE) != O_RDONLY)
1044 fepriv->release_jiffies = jiffies; 1051 fepriv->release_jiffies = jiffies;
1045 1052
1053 if (fe->ops.ts_bus_ctrl)
1054 fe->ops.ts_bus_ctrl (fe, 0);
1055
1046 return dvb_generic_release (inode, file); 1056 return dvb_generic_release (inode, file);
1047} 1057}
1048 1058
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index e5d5028b3694..f233d78bc364 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -129,6 +129,7 @@ struct dvb_frontend_ops {
129 int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg); 129 int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg);
130 int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd); 130 int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
131 int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable); 131 int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
132 int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);
132 133
133 struct dvb_tuner_ops tuner_ops; 134 struct dvb_tuner_ops tuner_ops;
134}; 135};