]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/media/videobuf-dvb.h
jbd2: Fix possible overflow in jbd2_log_space_left()
[mirror_ubuntu-bionic-kernel.git] / include / media / videobuf-dvb.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <dvbdev.h>
3 #include <dmxdev.h>
4 #include <dvb_demux.h>
5 #include <dvb_net.h>
6 #include <dvb_frontend.h>
7
8 #ifndef _VIDEOBUF_DVB_H_
9 #define _VIDEOBUF_DVB_H_
10
11 struct videobuf_dvb {
12 /* filling that the job of the driver */
13 char *name;
14 struct dvb_frontend *frontend;
15 struct videobuf_queue dvbq;
16
17 /* video-buf-dvb state info */
18 struct mutex lock;
19 struct task_struct *thread;
20 int nfeeds;
21
22 /* videobuf_dvb_(un)register manges this */
23 struct dvb_demux demux;
24 struct dmxdev dmxdev;
25 struct dmx_frontend fe_hw;
26 struct dmx_frontend fe_mem;
27 struct dvb_net net;
28 };
29
30 struct videobuf_dvb_frontend {
31 struct list_head felist;
32 int id;
33 struct videobuf_dvb dvb;
34 };
35
36 struct videobuf_dvb_frontends {
37 struct list_head felist;
38 struct mutex lock;
39 struct dvb_adapter adapter;
40 int active_fe_id; /* Indicates which frontend in the felist is in use */
41 int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
42 };
43
44 int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
45 struct module *module,
46 void *adapter_priv,
47 struct device *device,
48 short *adapter_nr,
49 int mfe_shared);
50
51 void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
52
53 struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id);
54 void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f);
55
56 struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
57 int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
58
59 #endif /* _VIDEOBUF_DVB_H_ */