[linux-dvb] Help with mxl5003 tuner

Manu Abraham abraham.manu at gmail.com
Thu Jan 24 13:08:36 CET 2008


carlos escribano wrote:
> Hello,
> 
> I have a DTD adapter from Costar (CST-DT600-MA), as accessory in a Arima
> UM650UV1 laptop. It has a gl861 USB controller, a wjce6353 demuxer
> (recognized as zl10353) and a mxl5003 tuner.
> 
> I added their ids to mxl500x brach of mercurial repository and run with
> gl861 module, the kernel recognizes it in warm state, register the
> zl10353 demuxer and attach the mxl5003 tuner, without error messages at
> loading. 
> 
> I dont have info about the device mxl5003 config, so I've added some
> values from a hauppauge hvr1600 (the values one Ive seen for this
> tuner), but no luck: scandvb fails.

That's an ATSC device.

> Any ideas about how can I know the right config values for this tuner?
> 
> Thanks.
> 
> 
> 
> This is the patch Ive used:
> 
> diff -u -r
> mxl500x-7e116c8c7962/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
> mxl500x-7e116c8c7962.new/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
> --- mxl500x-7e116c8c7962/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
> 2008-01-21 21:58:02.000000000 +0100
> +++
> mxl500x-7e116c8c7962.new/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
> 2008-01-24 02:53:13.000000000 +0100
> @@ -53,6 +53,7 @@
>  #define USB_PID_ADSTECH_USB2_WARM                      0xa334
>  #define USB_PID_AFATECH_AF9005                         0x9020
>  #define USB_VID_ALINK_DTU                              0xf170
> +#define USB_PID_COSTAR_CST_DT600_MA                     0x0504
>  #define USB_PID_AVERMEDIA_DVBT_USB_COLD                        0x0001
>  #define USB_PID_AVERMEDIA_DVBT_USB_WARM                        0x0002
>  #define USB_PID_AVERMEDIA_DVBT_USB2_COLD               0xa800
> diff -u -r mxl500x-7e116c8c7962/linux/drivers/media/dvb/dvb-usb/gl861.c
> mxl500x-7e116c8c7962.new/linux/drivers/media/dvb/dvb-usb/gl861.c
> --- mxl500x-7e116c8c7962/linux/drivers/media/dvb/dvb-usb/gl861.c
> 2008-01-21 21:58:02.000000000 +0100
> +++ mxl500x-7e116c8c7962.new/linux/drivers/media/dvb/dvb-usb/gl861.c
> 2008-01-24 04:42:16.000000000 +0100
> @@ -10,6 +10,7 @@
>  
>  #include "zl10353.h"
>  #include "qt1010.h"
> +#include "mxl500x.h"
>  
>  /* debug */
>  static int dvb_usb_gl861_debug;
> @@ -116,12 +117,34 @@
>         return -EIO;
>  }
>  
> +static struct mxl500x_config costar_dst_ct600_tuner = {
> +        .delsys = MXL500x_MODE_ATSC,

If you are using a DVB-T device, you should at least use MXL500x_MODE_DVBT
AFAICS, the zl10353/ce6353 cannot do ATSC ;-)
	.delsys = MXL500x_MODE_DVBT

> +        .octf   = MXL500x_OCTF_CH,

When you don't explicitly know what your hardware does, you shouldn't 
try to
apply a tracking filter.

MXL500x_OCTF_OFF, seems to look like a better option for you here, atm
	.octf = MXL500x_OCTF_OFF

> +        .xtal_freq      = 16000000,

Crystal frequencies can be 12Mhz, 16Mhz, 20 Mhz or 24 MHz. You need to
identify what your hardware uses.

> +        .iflo_freq      = 5380000,

The IF output depends on your configuration, but for DVB-T using 4.57Mhz as
an initial value looks like a good starting point
	.iflo_freq = 4570000

> +        .ref_freq       = 15,

For the DVB-T device that i use, i do use a reference of 365.6MHz

	.ref_freq	= 365600000, /* 365.6MHz for the prescribed IF LOF */

> +        .rssi_ena       = MXL_RSSI_ENABLE,


Till you are very sure about your setup, better alternative is to 
disable RSSI,
though you will see a slightly lower signal. But better to see a 
slightly lower
signal than to pull out all your hair, while not having a stepping stone 
itself.
RSSI should be enabled, when all your frontend is perfect, otherwise 
that will
wreak havoc in your setup. Not the best option to start playing with 
initially,
especially when you are using with the ZL10353, the demod driver being
sub-optimal.

	.rssi_ena	= MXL_RSSI_DISABLE

> +        .addr          = 0x63,

The device can be found at I2C addresses 0x60 and 0x63, You need to find
what's relevant for you.

> +};
> +
>  static struct qt1010_config gl861_qt1010_config = {
>         .i2c_address = 0x62
>  };
>  
>  static int gl861_tuner_attach(struct dvb_usb_adapter *adap)
>  {
> +
> +       if (adap->dev->udev->descriptor.idVendor  == USB_VID_ALINK &&
> +                adap->dev->udev->descriptor.idProduct ==
> USB_PID_COSTAR_CST_DT600_MA) {
> +
> +               return dvb_attach (
> +                          mxl500x_attach,
> +                          adap->fe,
> +                          &costar_dst_ct600_tuner,
> +                          &adap->dev->i2c_adap
> +               ) == NULL ? -ENODEV : 0;
> +
> +       }
>         return dvb_attach(qt1010_attach,
>                           adap->fe, &adap->dev->i2c_adap,
>                           &gl861_qt1010_config) == NULL ? -ENODEV : 0;
> @@ -158,6 +181,7 @@
>  static struct usb_device_id gl861_table [] = {
>                 { USB_DEVICE(USB_VID_MSI,
> USB_PID_MSI_MEGASKY580_55801) },
>                 { USB_DEVICE(USB_VID_ALINK, USB_VID_ALINK_DTU) },
> +                { USB_DEVICE(USB_VID_ALINK,
> USB_PID_COSTAR_CST_DT600_MA) },
>                 { }             /* Terminating entry */
>  };
>  MODULE_DEVICE_TABLE (usb, gl861_table);
> @@ -188,7 +212,7 @@
>         }},
>         .i2c_algo         = &gl861_i2c_algo,
>  
> -       .num_device_descs = 2,
> +       .num_device_descs = 3,
>         .devices = {
>                 {   "MSI Mega Sky 55801 DVB-T USB2.0",
>                         { &gl861_table[0], NULL },
> @@ -198,6 +222,11 @@
>                         { &gl861_table[1], NULL },
>                         { NULL },
>                 },
> +                {   "COSTAR CST-DT600-MA DVB-T USB2.0",
> +                        { &gl861_table[2], NULL },
> +                        { NULL },
> +                },
> +
>         }
>  };


Regards,
Manu



More information about the linux-dvb mailing list