Commit c0510052 authored by Andreas Oberritter's avatar Andreas Oberritter Committed by Linus Torvalds

[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: default avatarAndreas Oberritter <obi@linuxtv.org>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3cc2176c
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/dvb/dmx.h>
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
/* Common definitions */ /* Common definitions */
...@@ -282,6 +283,10 @@ struct dmx_demux { ...@@ -282,6 +283,10 @@ struct dmx_demux {
int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids); 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, int (*get_stc) (struct dmx_demux* demux, unsigned int num,
u64 *stc, unsigned int *base); u64 *stc, unsigned int *base);
}; };
......
...@@ -929,6 +929,22 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *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); dmxdev->demux->get_pes_pids(dmxdev->demux, (u16 *)parg);
break; 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: case DMX_GET_STC:
if (!dmxdev->demux->get_stc) { if (!dmxdev->demux->get_stc) {
ret=-EINVAL; ret=-EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment