]> err.no Git - linux-2.6/commitdiff
[PATCH] dvb: core: glue code for DMX_GET_CAPS and DMX_SET_SOURCE
authorAndreas Oberritter <obi@linuxtv.org>
Fri, 9 Sep 2005 20:02:21 +0000 (13:02 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 20:57:36 +0000 (13:57 -0700)
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>
drivers/media/dvb/dvb-core/demux.h
drivers/media/dvb/dvb-core/dmxdev.c

index fb55eaa5c8e70525073427372c9ea3f6191e3592..b86d03f5100bf881fd3f0ff3165148278803ef67 100644 (file)
@@ -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);
 };
index 68050cd527cb4db568a0868b10d2234bbe003ace..6059562f4d4247776ba3d22c87b39753c16a1d49 100644 (file)
@@ -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;