aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/videobuf2-dvb.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-10-09 07:01:05 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-16 17:59:29 -0400
commit701b57ee3387b8e3749845b02310b5625fbd8da0 (patch)
tree359260df9fa9bad7c82eaf9374a5e1bf502b9401 /include/media/videobuf2-dvb.h
parent3415a89f48dce655ae353bc70a8e292764e8e931 (diff)
[media] vb2: Add videobuf2-dvb support
With the new vb2_thread_start/stop core code it is very easy to implement videobuf2-dvb. This should simplify converting existing videobuf drivers to vb2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media/videobuf2-dvb.h')
-rw-r--r--include/media/videobuf2-dvb.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/media/videobuf2-dvb.h b/include/media/videobuf2-dvb.h
new file mode 100644
index 000000000000..8f61456f1394
--- /dev/null
+++ b/include/media/videobuf2-dvb.h
@@ -0,0 +1,58 @@
1#ifndef _VIDEOBUF2_DVB_H_
2#define _VIDEOBUF2_DVB_H_
3
4#include <dvbdev.h>
5#include <dmxdev.h>
6#include <dvb_demux.h>
7#include <dvb_net.h>
8#include <dvb_frontend.h>
9#include <media/videobuf2-core.h>
10
11struct vb2_dvb {
12 /* filling that the job of the driver */
13 char *name;
14 struct dvb_frontend *frontend;
15 struct vb2_queue dvbq;
16
17 /* video-buf-dvb state info */
18 struct mutex lock;
19 int nfeeds;
20
21 /* vb2_dvb_(un)register manages this */
22 struct dvb_demux demux;
23 struct dmxdev dmxdev;
24 struct dmx_frontend fe_hw;
25 struct dmx_frontend fe_mem;
26 struct dvb_net net;
27};
28
29struct vb2_dvb_frontend {
30 struct list_head felist;
31 int id;
32 struct vb2_dvb dvb;
33};
34
35struct vb2_dvb_frontends {
36 struct list_head felist;
37 struct mutex lock;
38 struct dvb_adapter adapter;
39 int active_fe_id; /* Indicates which frontend in the felist is in use */
40 int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
41};
42
43int vb2_dvb_register_bus(struct vb2_dvb_frontends *f,
44 struct module *module,
45 void *adapter_priv,
46 struct device *device,
47 short *adapter_nr,
48 int mfe_shared);
49
50void vb2_dvb_unregister_bus(struct vb2_dvb_frontends *f);
51
52struct vb2_dvb_frontend *vb2_dvb_alloc_frontend(struct vb2_dvb_frontends *f, int id);
53void vb2_dvb_dealloc_frontends(struct vb2_dvb_frontends *f);
54
55struct vb2_dvb_frontend *vb2_dvb_get_frontend(struct vb2_dvb_frontends *f, int id);
56int vb2_dvb_find_frontend(struct vb2_dvb_frontends *f, struct dvb_frontend *p);
57
58#endif /* _VIDEOBUF2_DVB_H_ */