]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (9227): MFE: Add multi-frontend mutual exclusion
authorDarron Broad <darron@kewl.org>
Sat, 11 Oct 2008 14:44:05 +0000 (11:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 17 Oct 2008 20:24:15 +0000 (17:24 -0300)
commit59b1842da1c6f33ad2e8da82d3dfb3445751d964
tree9a57bcf44df5d76ad845995dcfd5f49e20c68240
parent2f3af9e64de44743a860fd1eee966222a7accc54
V4L/DVB (9227): MFE: Add multi-frontend mutual exclusion

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.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-core/dvbdev.h
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/videobuf-dvb.c
include/media/videobuf-dvb.h