aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-11 10:05:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-17 16:23:10 -0400
commit363c35fc448943c3d6121332d28bcda2d2fbf87c (patch)
tree739864d237b7fa60bef51bc510fe55c888b606ca /include/media
parent548da7625c825eccc31b4b3865ae5389c3660486 (diff)
V4L/DVB (9222): S2API: Add Multiple-frontend on a single adapter support.
A detailed description from the original patches 2 years ago: "The WinTV-HVR3000 has a single transport bus which is shared between a DVB-T and DVB-S modulator. These patches build on the bus acquisition cx88 work from a few weeks ago to add support for this. So to applications the HVR3000 looks like this: /dev/dvb/adapter0/fe0 (cx24123 DVB-S demod) /dev/dvb/adapter0/fe1 (cx22702 DVB-T demod) Additional boards continue as before, eg: /dev/dvb/adapter1/fe0 (lgdt3302 ATSC demod) The basic change is removing the single instance of the videobuf_dvb in cx8802_dev and saa7134_dev(?) and replacing it with a list and some supporting functions. *NOTE* This branch was taken before v4l-dvb was closed for 2.6.19 so two or three current cx88 patches appear to be reversed by this tree, this will be cleaned up in the near future. The patches missing change the mutex handing to core->lock, fix an enumeration problem." It should be recognised that a number of people have been maintaining this patchset. Significant levels of Kudos to everyone one involved, including but not limited to: Darron Broad Fabio M. Di Nitto Carlo Scarfoglio Hans Werner Without the work of these people, and countless others, my two year old patches would of died on the Mercurial linuxtv.org vine a long time ago. TODO: Revise these patches a little further so that the need for demux1 and dvr0 is optional, not mandatory on the HVR3000. HISTORY (darron): This is the last update to MFE prepared by Hans which is based upon the `scratchpad' diff created by Carlo. All MFE work prior to that point must be attributed to Fabio who ported and maintained Steve's original patch up to that time. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-dvb.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h
index b77748696329..09547ec3f3c3 100644
--- a/include/media/videobuf-dvb.h
+++ b/include/media/videobuf-dvb.h
@@ -24,12 +24,42 @@ struct videobuf_dvb {
24 struct dvb_net net; 24 struct dvb_net net;
25}; 25};
26 26
27int videobuf_dvb_register(struct videobuf_dvb *dvb, 27struct videobuf_dvb_frontend {
28 void *dev;
29 struct list_head felist;
30 int id;
31 struct videobuf_dvb dvb;
32};
33
34struct videobuf_dvb_frontends {
35 struct mutex lock;
36 struct dvb_adapter adapter;
37 int active_fe_id; /* Indicates which frontend in the felist is in use */
38 struct videobuf_dvb_frontend frontend;
39};
40
41int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
28 struct module *module, 42 struct module *module,
29 void *adapter_priv, 43 void *adapter_priv,
30 struct device *device, 44 struct device *device,
31 short *adapter_nr); 45 short *adapter_nr); //NEW
32void videobuf_dvb_unregister(struct videobuf_dvb *dvb); 46
47void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
48
49int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *f,
50 struct module *module,
51 void *adapter_priv,
52 struct device *device,
53 char *adapter_name,
54 short *adapter_nr); //NEW
55
56int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb);
57
58struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id);
59
60struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
61int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
62
33 63
34/* 64/*
35 * Local variables: 65 * Local variables: