#ifndef _VIDEOBUF2_DVB_H_
#define	_VIDEOBUF2_DVB_H_

#include <dvbdev.h>
#include <dmxdev.h>
#include <dvb_demux.h>
#include <dvb_net.h>
#include <dvb_frontend.h>

#include <media/videobuf2-v4l2.h>

/* We don't actually need to include media-device.h here */
struct media_device;

/*
 * TODO: This header file should be replaced with videobuf2-core.h
 * Currently, vb2_thread is not a stuff of videobuf2-core,
 * since vb2_thread has many dependencies on videobuf2-v4l2.
 */

struct vb2_dvb {
	/* filling that the job of the driver */
	char			*name;
	struct dvb_frontend	*frontend;
	struct vb2_queue	dvbq;

	/* video-buf-dvb state info */
	struct mutex		lock;
	int			nfeeds;

	/* vb2_dvb_(un)register manages this */
	struct dvb_demux	demux;
	struct dmxdev		dmxdev;
	struct dmx_frontend	fe_hw;
	struct dmx_frontend	fe_mem;
	struct dvb_net		net;
};

struct vb2_dvb_frontend {
	struct list_head felist;
	int id;
	struct vb2_dvb dvb;
};

struct vb2_dvb_frontends {
	struct list_head felist;
	struct mutex lock;
	struct dvb_adapter adapter;
	int active_fe_id; /* Indicates which frontend in the felist is in use */
	int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
};

int vb2_dvb_register_bus(struct vb2_dvb_frontends *f,
			 struct module *module,
			 void *adapter_priv,
			 struct device *device,
			 struct media_device *mdev,
			 short *adapter_nr,
			 int mfe_shared);

void vb2_dvb_unregister_bus(struct vb2_dvb_frontends *f);

struct vb2_dvb_frontend *vb2_dvb_alloc_frontend(struct vb2_dvb_frontends *f, int id);
void vb2_dvb_dealloc_frontends(struct vb2_dvb_frontends *f);

struct vb2_dvb_frontend *vb2_dvb_get_frontend(struct vb2_dvb_frontends *f, int id);
int vb2_dvb_find_frontend(struct vb2_dvb_frontends *f, struct dvb_frontend *p);

#endif			/* _VIDEOBUF2_DVB_H_ */
urce/pxa.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/clocksource/pxa.h?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/clocksource/pxa.h?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752'>commit</a><a class='active' href='/cgit.cgi/linux/net-next.git/diff/include/clocksource/pxa.h?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/clocksource/pxa.h'>
<input type='hidden' name='id' value='f2557779e1a9cfbf69c99b74da26cc1b2b10e752'/><input type='hidden' name='id2' value='030305d69fc6963c16003f50d7e8d74b02d0a143'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/diff/?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>root</a>/<a href='/cgit.cgi/linux/net-next.git/diff/include?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>include</a>/<a href='/cgit.cgi/linux/net-next.git/diff/include/clocksource?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>clocksource</a>/<a href='/cgit.cgi/linux/net-next.git/diff/include/clocksource/pxa.h?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>pxa.h</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='f2557779e1a9cfbf69c99b74da26cc1b2b10e752'/><input type='hidden' name='id2' value='030305d69fc6963c16003f50d7e8d74b02d0a143'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=f2557779e1a9cfbf69c99b74da26cc1b2b10e752&amp;id2=030305d69fc6963c16003f50d7e8d74b02d0a143'>Diffstat</a> (limited to 'include/clocksource/pxa.h')</div><table summary='diffstat' class='diffstat'>