diff options
author | darron@kewl.org <darron@kewl.org> | 2008-10-11 15:44:05 +0100 |
---|---|---|
committer | darron@kewl.org <darron@kewl.org> | 2008-10-11 15:44:05 +0100 |
commit | e792b162282b2a6897d82cb48a3ee6222bc01686 (patch) | |
tree | 53bb879a2b29b8a2c504d3e73923d349d7842a84 /linux/drivers/media/video/videobuf-dvb.c | |
parent | 8e5764414cfbfb3a7abb46f3fc79e631c643379c (diff) | |
download | mediapointer-dvb-s2-e792b162282b2a6897d82cb48a3ee6222bc01686.tar.gz mediapointer-dvb-s2-e792b162282b2a6897d82cb48a3ee6222bc01686.tar.bz2 |
MFE: Add multi-frontend mutual exclusion
From: Darron Broad <darron@kewl.org>
This add frontend R/W mutual exclusion.
Prior to this point in time it was possible to open both
frontends simultaneously which an MFE card cannot support.
In order to stop this, a delayed open is performed which
has the following function:
Return EBUSY after a configurable amount of time
if a frontend is unavailable due to the other being
in use.
Only allow opening of a frontend if the kernel thread
of the other has stopped.
This solution was chosen to allow switching between
frontends to work as seamlessly as possible. When both
frontends are actually opened simultaneously then one
will only open, but if quick switching is performed
between one of many then the new open will succeed in
a clean fashion rather than interrupting a kernel
thread.
Priority: normal
Signed-off-by: Darron Broad <darron@kewl.org>
Diffstat (limited to 'linux/drivers/media/video/videobuf-dvb.c')
-rw-r--r-- | linux/drivers/media/video/videobuf-dvb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/video/videobuf-dvb.c b/linux/drivers/media/video/videobuf-dvb.c index cf699a8ca..33e2f2b2b 100644 --- a/linux/drivers/media/video/videobuf-dvb.c +++ b/linux/drivers/media/video/videobuf-dvb.c @@ -145,7 +145,8 @@ int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, struct module *module, void *adapter_priv, struct device *device, - short *adapter_nr) //NEW + short *adapter_nr, + int mfe_shared) { struct list_head *list, *q; struct videobuf_dvb_frontend *fe; @@ -158,7 +159,7 @@ int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, } /* Bring up the adapter */ - res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, fe->dvb.name, adapter_nr); //NEW + res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, fe->dvb.name, adapter_nr, mfe_shared); if (res < 0) { printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res); goto err; @@ -186,7 +187,8 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, void *adapter_priv, struct device *device, char *adapter_name, - short *adapter_nr) //NEW + short *adapter_nr, + int mfe_shared) { int result; @@ -199,6 +201,7 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, adapter_name, result); } fe->adapter.priv = adapter_priv; + fe->adapter.mfe_shared = mfe_shared; return result; } |