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

Andrew Burri andrew.burri at gmail.com
Fri Jan 6 10:31:09 CET 2006


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.

Andy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20060106/517273d7/attachment.htm


More information about the linux-dvb mailing list