linux/include/media/video-buf-dvb.h
Andrew de Quincey d09dbf92ad V4L/DVB (3762): Add sysfs device links to dvb devices
Currently in /sys/class/dvb/dvbX.demuxY/ we have:
	dev
	uevent
With the patch, we have (for a PCI DVB device):
	dev
	device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:03:0d.0
	uevent
So userspace tools can (finally) work out which physical device a DVB adapter
refers to. Previously you had to kinda look through dmesg and hope that it
hadn't been dumped out of the buffer. This makes debugging a lot easier if
the system has been up for a long time!
This is done by adding an extra 'struct device *' parameter to
dvb_register_adapter(). It will work with any kind of standard
linux 'device'. Additionally, if someone has an embedded system which does
things differently, they can simply supply 'NULL' and the behaviour will be
as before - the link will simply not appear.

Ack'd-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 01:57:55 -03:00

37 lines
932 B
C

#include <dvbdev.h>
#include <dmxdev.h>
#include <dvb_demux.h>
#include <dvb_net.h>
#include <dvb_frontend.h>
struct videobuf_dvb {
/* filling that the job of the driver */
char *name;
struct dvb_frontend *frontend;
struct videobuf_queue dvbq;
/* video-buf-dvb state info */
struct mutex lock;
struct task_struct *thread;
int nfeeds;
/* videobuf_dvb_(un)register manges this */
struct dvb_adapter adapter;
struct dvb_demux demux;
struct dmxdev dmxdev;
struct dmx_frontend fe_hw;
struct dmx_frontend fe_mem;
struct dvb_net net;
};
int videobuf_dvb_register(struct videobuf_dvb *dvb,
struct module *module,
void *adapter_priv,
struct device *device);
void videobuf_dvb_unregister(struct videobuf_dvb *dvb);
/*
* Local variables:
* c-basic-offset: 8
* End:
*/