aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@linuxtv.org>2005-09-09 16:02:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:36 -0400
commitc05100528efe997a27d841230f9f5b2f4adf3d0f (patch)
tree2fb3d714bcc1c83022b413ed6dace26f317c6c01 /drivers
parent3cc2176cbbee6adfaceac2df6d77312cf30cee83 (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')
-rw-r--r--drivers/media/dvb/dvb-core/demux.h5
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c16
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 fb55eaa5c8e7..b86d03f5100b 100644
--- a/drivers/media/dvb/dvb-core/demux.h
+++ b/drivers/media/dvb/dvb-core/demux.h
@@ -30,6 +30,7 @@
30#include <linux/errno.h> 30#include <linux/errno.h>
31#include <linux/list.h> 31#include <linux/list.h>
32#include <linux/time.h> 32#include <linux/time.h>
33#include <linux/dvb/dmx.h>
33 34
34/*--------------------------------------------------------------------------*/ 35/*--------------------------------------------------------------------------*/
35/* Common definitions */ 36/* Common definitions */
@@ -282,6 +283,10 @@ struct dmx_demux {
282 283
283 int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids); 284 int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
284 285
286 int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);
287
288 int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);
289
285 int (*get_stc) (struct dmx_demux* demux, unsigned int num, 290 int (*get_stc) (struct dmx_demux* demux, unsigned int num,
286 u64 *stc, unsigned int *base); 291 u64 *stc, unsigned int *base);
287}; 292};
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 68050cd527cb..6059562f4d42 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,
929 dmxdev->demux->get_pes_pids(dmxdev->demux, (u16 *)parg); 929 dmxdev->demux->get_pes_pids(dmxdev->demux, (u16 *)parg);
930 break; 930 break;
931 931
932 case DMX_GET_CAPS:
933 if (!dmxdev->demux->get_caps) {
934 ret = -EINVAL;
935 break;
936 }
937 ret = dmxdev->demux->get_caps(dmxdev->demux, parg);
938 break;
939
940 case DMX_SET_SOURCE:
941 if (!dmxdev->demux->set_source) {
942 ret = -EINVAL;
943 break;
944 }
945 ret = dmxdev->demux->set_source(dmxdev->demux, parg);
946 break;
947
932 case DMX_GET_STC: 948 case DMX_GET_STC:
933 if (!dmxdev->demux->get_stc) { 949 if (!dmxdev->demux->get_stc) {
934 ret=-EINVAL; 950 ret=-EINVAL;