[linux-dvb] Doubt about the file: dvb-usb-dvb.c

Mauro Carvalho Chehab mchehab at infradead.org
Wed Aug 1 16:34:46 CEST 2007


Em Seg, 2007-07-30 às 09:19 +0800, lwtbenben escreveu:
> >在2007-07-28,"Mauro Carvalho Chehab" <mchehab at infradead.org> 写道:
> Hi,
> >Em Sex, 2007-07-27 às 16:09 +0800, lwtbenben escreveu:
> >> Dear Mauro Carvalho Chehab:
> >> In dvb-usb-dvb.c, where we want to register our frontend to the DVB
> >> core, we have these condition checked;
> >> if (adap->props.frontend_attach(adap) == 0 && adap->fe != NULL)
> >> But actually pointer adap->fe is filled in the fuction
> >> adap->props.frontend_attach(adap), 
> >> Do you think this suitable?
> >> And my driver just can not enter this function to register my
> frontend
> >> to Linux DVB core.
> >Hmm... I'm not quite sure if I'm understanding what you're meaning.
> What
> >driver is not being registered? 
> Hi, Mauro 
> My USB driver has registered successfully. The problem is the
> frontend.
> I just can not get an available adap->fe pointer.

It seems to be a problem on your code. It would help if you put your
code somewhere and ask people for taking a look on it. 

Also, as Patrick and Luca said, the better environment for you to
develop a new driver is using a copy of v4l-dvb + your driver. Assuming
that your driver is called "mydriver", you need just to:

a) create a newer dir with your driver: 
	/linux/drivers/media/dvb/mydriver
b) Under /linux/drivers/media/dvb/mydriver:
	create a Kconfig and a Makefile 
   You may use another Kconfig/Makefile as example (for example, pluto2)
c) Add your driver directory at /linux/drivers/media/dvb/Makefile:
	obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ cinergyT2/ dvb-usb/ pluto2/ mydriver/

d) Add a source line for your driver at /linux/drivers/media/dvb/Kconfig:
	source "drivers/media/dvb/mydriver/Kconfig"

After that, you will be able to use v4l-dvb makefile to compile your
driver.  With
	make help
you'll see some useful syntax that may help your development.

Cheers,
Mauro




More information about the linux-dvb mailing list