diff options
author | Steven Toth <stoth@hauppauge.com> | 2006-09-25 12:41:53 -0300 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2006-09-25 12:41:53 -0300 |
commit | 100ebe4cb9402ad48873d719f4d66de1aeb4d555 (patch) | |
tree | 7d2e00050826783d070d4b71e406037c2473ac8c /linux/drivers | |
parent | 8410a558238806137cdefe6af1a821d01ede056c (diff) | |
download | mediapointer-dvb-s2-100ebe4cb9402ad48873d719f4d66de1aeb4d555.tar.gz mediapointer-dvb-s2-100ebe4cb9402ad48873d719f4d66de1aeb4d555.tar.bz2 |
Add frontend structure callback for bus acquisition.
From: Steven Toth <stoth@hauppauge.com>
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>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 378261485..3bc3a37e6 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1020,6 +1020,13 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) if ((ret = dvb_generic_open (inode, file)) < 0) return ret; + if (fe->ops.ts_bus_ctrl) { + if ((ret = fe->ops.ts_bus_ctrl (fe, 1)) < 0) { + dvb_generic_release (inode, file); + return ret; + } + } + if ((file->f_flags & O_ACCMODE) != O_RDONLY) { /* normal tune mode when opened R/W */ @@ -1049,6 +1056,9 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) if ((file->f_flags & O_ACCMODE) != O_RDONLY) fepriv->release_jiffies = jiffies; + if (fe->ops.ts_bus_ctrl) + fe->ops.ts_bus_ctrl (fe, 0); + return dvb_generic_release (inode, file); } diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h index e5d5028b3..f233d78bc 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -129,6 +129,7 @@ struct dvb_frontend_ops { int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg); int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd); int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable); + int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire); struct dvb_tuner_ops tuner_ops; }; |