Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
fada1935 MCC |
2 | #include <media/dvbdev.h> |
3 | #include <media/dmxdev.h> | |
4 | #include <media/dvb_demux.h> | |
5 | #include <media/dvb_net.h> | |
6 | #include <media/dvb_frontend.h> | |
1da177e4 | 7 | |
5d8f290c HPS |
8 | #ifndef _VIDEOBUF_DVB_H_ |
9 | #define _VIDEOBUF_DVB_H_ | |
10 | ||
1da177e4 LT |
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 */ | |
3593cab5 | 18 | struct mutex lock; |
1da177e4 LT |
19 | struct task_struct *thread; |
20 | int nfeeds; | |
21 | ||
22 | /* videobuf_dvb_(un)register manges this */ | |
1da177e4 LT |
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 | ||
363c35fc | 30 | struct videobuf_dvb_frontend { |
363c35fc ST |
31 | struct list_head felist; |
32 | int id; | |
33 | struct videobuf_dvb dvb; | |
34 | }; | |
35 | ||
36 | struct videobuf_dvb_frontends { | |
7bdf84fc | 37 | struct list_head felist; |
363c35fc ST |
38 | struct mutex lock; |
39 | struct dvb_adapter adapter; | |
40 | int active_fe_id; /* Indicates which frontend in the felist is in use */ | |
8e739090 | 41 | int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */ |
363c35fc ST |
42 | }; |
43 | ||
44 | int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, | |
1da177e4 | 45 | struct module *module, |
d09dbf92 | 46 | void *adapter_priv, |
78e92006 | 47 | struct device *device, |
59b1842d | 48 | short *adapter_nr, |
9adf6132 | 49 | int mfe_shared); |
363c35fc ST |
50 | |
51 | void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f); | |
52 | ||
96b7a1a8 | 53 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); |
878595f6 | 54 | void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f); |
363c35fc ST |
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 | ||
5d8f290c | 59 | #endif /* _VIDEOBUF_DVB_H_ */ |