[linux-dvb] Nebula usb frontend problem...
Patrick Boettcher
patrick.boettcher at desy.de
Sun Jul 31 22:38:41 CEST 2005
Hi Svante,
On Sun, 31 Jul 2005, Svante Olofsson wrote:
> Unfortunately, I am having problems with getting it working. I have downloaded
> the cvs driver and compiled it into both the kernel tree and the build-2.6
> directory. The problem is that I don't get a fronend when I load the kernel
> version of the driver ("modprobe dvb-usb-digitv"), and when I try the
> build-2.6 version it tries to load the nxt6000 frontend, and that is not
> supported. I have added the syslog info for both cases:
Attached is a patch for the nxt6000-based box. Can you please apply it to
dvb-kernel CVS and report whether it is working or not?
> Jul 31 14:57:44 gamer kernel: digitv: nxt6000 support is not done yet, in fact
> you are one of the first person who wants to use this device in Linux. Please
> report to linux-dvb at linuxtv.org
Yeah! I waited for someone sending message, before creating the patch.
Sorry for the delay.
Good luck,
Patrick.
--
Mail: patrick.boettcher at desy.de
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/
-------------- next part --------------
Index: linux/drivers/media/dvb/dvb-usb/digitv.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dvb-usb/digitv.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 digitv.c
--- linux/drivers/media/dvb/dvb-usb/digitv.c 28 Jun 2005 21:48:07 -0000 1.10
+++ linux/drivers/media/dvb/dvb-usb/digitv.c 31 Jul 2005 20:37:58 -0000
@@ -92,6 +92,21 @@ static int digitv_identify_state (struct
return 0;
}
+/* TODO put this into a general init-callback */
+static int digitv_rc_init(struct dvb_usb_device *d)
+{
+ u8 b[4] = { 0 };
+
+ b[0] = 1;
+ digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0);
+
+ b[0] = 0;
+ digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0);
+
+ return 0;
+}
+
+
static int digitv_mt352_demod_init(struct dvb_frontend *fe)
{
static u8 reset_buf[] = { 0x89, 0x38, 0x8a, 0x2d, 0x50, 0x80 };
@@ -113,31 +128,29 @@ static int digitv_mt352_demod_init(struc
}
static struct mt352_config digitv_mt352_config = {
- .demod_address = 0x0, /* ignored by the digitv anyway */
.demod_init = digitv_mt352_demod_init,
.pll_set = dvb_usb_pll_set,
};
-static struct nxt6000_config digitv_nxt6000_config = {
- .demod_address = 0x0, /* ignored by the digitv anyway */
- .clock_inversion = 0x0,
+static int digitv_nxt6000_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep)
+{
+ struct dvb_usb_device *d = fe->dvb->priv;
+ u8 b[5];
+ dvb_usb_pll_set(fe,fep,b);
+ return digitv_ctrl_msg(d,USB_WRITE_TUNER,0,&b[1],4,NULL,0);
+}
- .pll_init = NULL,
- .pll_set = NULL,
+static struct nxt6000_config digitv_nxt6000_config = {
+ .clock_inversion = 1,
+ .pll_set = digitv_nxt6000_pll_set,
};
static int digitv_frontend_attach(struct dvb_usb_device *d)
{
- if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL)
+ digitv_rc_init(d);
+ if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL ||
+ (d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL)
return 0;
- if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) {
-
- warn("nxt6000 support is not done yet, in fact you are one of the first "
- "person who wants to use this device in Linux. Please report to "
- "linux-dvb at linuxtv.org");
-
- return 0;
- }
return -EIO;
}
@@ -152,19 +165,6 @@ static struct dvb_usb_rc_key digitv_rc_k
{ 0x00, 0x16, KEY_POWER }, /* dummy key */
};
-static int digitv_rc_init(struct dvb_usb_device *d)
-{
- u8 b[4] = { 0 };
-
- b[0] = 1;
- digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0);
-
- b[0] = 0;
- digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0);
-
- return 0;
-}
-
/* TODO is it really the NEC protocol ? */
int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
More information about the linux-dvb
mailing list