[linux-dvb] Philips TUV1236D/U was Re: Support for Kworld ATSC 110 tuner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/6/06, Andrew Burri <andrew.burri@xxxxxxxxx> wrote:
> Thanks to the help of this thread
>
> http://www.linuxtv.org/pipermail/linux-dvb/2005-December/006635.html
>  I have gotten my card to show signs of life.  Heres my output so far from
> dmesg.
>
>  Linux video capture interface: v1.00
>  saa7130/34: v4l2 driver version 0.2.14 loaded
>  ACPI: PCI Interrupt 0000:00:10.0[A] -> GSI 19 (level, low) -> IRQ 17
>  saa7133[0]: found at 0000:00:10.0, rev: 240, irq: 17, latency: 32, mmio:
> 0xbc800000
>  saa7133[0]: subsystem: 17de:7350, board: KWORLD ATSC110
> [card=83,autodetected]
>  saa7133[0]: board init: gpio is 100
>  saa7133[0]: i2c eeprom 00: de 17 50 73 ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>  saa7133[0]: Requsting tuner.o
>  saa7133[0]: Requsting tda9887.o
>  saa7133[0]: registered device video0 [v4l2]
>  saa7133[0]: registered device vbi0
>  saa7133[0]: registered device radio0
>  saa7133[0]: Tuner 68
>  nxt200x: NXT2004 Detected
>  DVB: registering new adapter (saa7133[0]).
>  DVB: registering frontend 0 (Nextwave NXT200X VSB/QAM frontend)...
>  nxt2004: Waiting for firmware upload (dvb-fe-nxt2004.fw)...
>  nxt2004: Waiting for firmware upload(2)...
>  nxt2004: No firmware uploaded (timeout or file not found?)
>
>
>  So far I have the NTSC side working with tvtime and have just started
> working on the dvb side of the code.
>  My starting point was from ver. 2.6.15 of the kernel and what I have been
> able to piece together, the card uses the Philips TUV1236D, which is tuner
> 68.  I added a new card number to saa7134.h
>  #define SAA7134_BOARD_KWORLD_ATSC110 83
>
>  in saa7134-cards.c, I added
>
>      [SAA7134_BOARD_KWORLD_ATSC110] = {
>          .name           = "KWORLD ATSC110",
>          .audio_clock    = 0x00187de7,
>          .tuner_type     = TUNER_PHILIPS_TUV1236D,
>
>          .radio_type     = UNSET,
>          .tuner_addr     = ADDR_UNSET,
>          .radio_addr     = ADDR_UNSET,
>          .tda9887_conf   = TDA9887_PRESENT,
>          .mpeg           = SAA7134_MPEG_DVB,
>
>          //.gpiomask       = 0x0800 00000,
>          .inputs         = {{
>                .name = name_tv,
>                .vmux = 1,
>                .amux = TV,
>                .tv   = 1,
>          },{
>                .name = name_comp1,
>                .vmux = 4,
>                .amux = LINE2,
>          },{
>                .name = name_svideo,
>                .vmux = 8,
>                .amux = LINE2,
>          }},
>          .radio = {
>                .name = name_radio,
>                .amux = LINE1,
>          },
>      },
>
>  also I added
>  .vendor       = PCI_VENDOR_ID_PHILIPS,
>          .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
>          .subvendor    = 0x17de,
>          .subdevice    = 0x7350,
>          .driver_data  = SAA7134_BOARD_KWORLD_ATSC110,
>
>  In the same file i added to the routine int saa7134_board_init2(struct
> saa7134_dev *dev)
>      case SAA7134_BOARD_KWORLD_ATSC110:
>          {
>          /* enable tuner */
>          u8 buffer [] = {
> 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
>          struct i2c_msg msg= {.addr=0x0a, .flags=0, .buf=buffer, .len =
> sizeof(buffer)};
>          i2c_transfer(&dev->i2c_adap, &msg, 1);
>          }
>          break;
>
>  Then I added in tuner-simple.c
>      case TUNER_PHILIPS_TUV1236D:
>          /* 0x40 -> ATSC antenna input 1 */
>          /* 0x48 -> ATSC antenna input 2 */
>          /* 0x00 -> NTSC antenna input 1 */
>          /* 0x08 -> NTSC antenna input 2 */
>  /*
> ================================================================================================HERE======
> */
>          {
>              u8 buffer [] = { 0x14,0x00,0x17,0x00 };
>              if (t->mode == T_UNINITIALIZED) t->mode = T_ANALOG_TV;
>              if (t->mode == T_ANALOG_TV) {
>                  buffer[1] = 0x08;
>                  buffer[3] = 0x00;
>              };
>              if (t->mode == T_DIGITAL_TV) {
>                  buffer[1] = 0x04;
>                  buffer[3] = 0x40;
>              };
>              if (4 != (rc = i2c_master_send(c,buffer,4)))
>                  tuner_warn("i2c i/o error: rc == %d (should be \n",rc);
>          };
>          break;
>      };
>
>  the mention of the tda9887 being present on the card is still untested by
> me, also the finer details of the code has not been worked out yet.  For
> example, I havent bothered to get correct settings for the inputs, and the
> NTSC tuner is looking at the wrong antenna input I think.
>  Hope this helps someone.

Good work!  I'm glad that my code for AVerTVHD A180 was able to help
you... Now, for the finishing touches:

1st - You should be working against cvs to generate your patch, NOT
the recent kernel... We have already added newer cards since the
version currently in 2.6.15.  You can grab the latest cvs by following
the instructions in the link below:

http://linuxtv.org/v4lwiki/index.php/How_to_build_from_CVS

2nd-  To get the digital functionality of the device working, you will
need to get the firmware for the nxt2004 demod, by issuing the
following command:

"linux/Documentation/dvb/get_dvb_firmware nxt2004"

...this will download the firmware to the current directory and
instruct you where to move / copy it to.

3rd- When your code is working and ready, please generate a unified
diff by using the following command, inside the v4l-dvb directory:

cvs diff -up > AndrewBurri.patch

...and then email the resulting patchfile to the list, in addition to
your sign-off, in the form:

Signed-off-by: Your Name <email@xxxxxxxx>

Best Regards,

Michael Krufky


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux