diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2005-09-09 13:02:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 13:57:36 -0700 |
commit | c05100528efe997a27d841230f9f5b2f4adf3d0f (patch) | |
tree | 2fb3d714bcc1c83022b413ed6dace26f317c6c01 /drivers/media | |
parent | 3cc2176cbbee6adfaceac2df6d77312cf30cee83 (diff) |
[PATCH] dvb: core: glue code for DMX_GET_CAPS and DMX_SET_SOURCE
Glue code for DMX_GET_CAPS and DMX_SET_SOURCE ioctls.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/demux.h | 5 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dmxdev.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/demux.h b/drivers/media/dvb/dvb-core/demux.h index fb55eaa5c8e..b86d03f5100 100644 --- a/drivers/media/dvb/dvb-core/demux.h +++ b/drivers/media/dvb/dvb-core/demux.h @@ -30,6 +30,7 @@ #include <linux/errno.h> #include <linux/list.h> #include <linux/time.h> +#include <linux/dvb/dmx.h> /*--------------------------------------------------------------------------*/ /* Common definitions */ @@ -282,6 +283,10 @@ struct dmx_demux { int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids); + int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps); + + int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src); + int (*get_stc) (struct dmx_demux* demux, unsigned int num, u64 *stc, unsigned int *base); }; diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index 68050cd527c..6059562f4d4 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c @@ -929,6 +929,22 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, dmxdev->demux->get_pes_pids(dmxdev->demux, (u16 *)parg); break; + case DMX_GET_CAPS: + if (!dmxdev->demux->get_caps) { + ret = -EINVAL; + break; + } + ret = dmxdev->demux->get_caps(dmxdev->demux, parg); + break; + + case DMX_SET_SOURCE: + if (!dmxdev->demux->set_source) { + ret = -EINVAL; + break; + } + ret = dmxdev->demux->set_source(dmxdev->demux, parg); + break; + case DMX_GET_STC: if (!dmxdev->demux->get_stc) { ret=-EINVAL; |