kbtv and saa7134

Yuri Pankov y.pankov at irbis.net.ru
Fri Jan 19 11:59:32 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

filip lenaerts wrote:
> hi everyone,
> 
> i'm trying out kbtv on my shiny new 6.2-release of last week, but i can't get it to get any display.
> 
> to my pleasant surprise the maintainer of kbtv has resumed development a few days ago and released a new version 1.2 of kbtv.  also with that one, i can't get any channel (previously i tried with vs 1.1.3).  so i was wondering where things go wrong: either the tuner or the chip to  receive images.
> 
> concerning the tuner, i built the tools under kbtvs support directory and the tune_channels seem to work correctly: the ioctls performing I2CSTART, I2CSTOP, I2CREAD and I2CWRITE exit all with 0, so i assume this is working like it should:
> 
> ioctl(3,I2CSTOP,0xbfbfeb70)                      = 0 (0x0)
> ioctl(3,I2CSTART,0xbfbfeb70)                     = 0 (0x0)
> ioctl(3,I2CREAD,0xbfbfeb70)                      = 0 (0x0)
> ioctl(3,I2CSTOP,0xbfbfeb70)                      = 0 (0x0)
> 
> this may leads me to the saa driver (included in the kbtv, and not the freebsd base system, anyone knows why?):
> 
> i tried building it with the different makeflags, as described in the Makevars, but always with the same result: no image
> 
> my hardware, from pciconf -lv:
> 
> saa0 at pci3:1:0:  class=0x048000 card=0x00497416 chip=0x71341131 rev=0x01 hdr=0x00
>     vendor   = 'Philips Semiconductors'
>     device   = 'SAA7134HL Multi Media Capture Device'
>     class    = multimedia
> 
> 
> the readme says it support SAA7134x, but i'm starting to wonder whether my saa7134HL resorts to that? does anyone know?
> 
> dmesg gives me:
> 
> saa0: <Phillips SAA7134 AV broadcast decoder> mem 0xd8000000-0xd80003ff irq 17 at device 1.0 on pci3
> 
> i also am not sure about the tuner type.  i know it's a philips, but there is also a philipsMK2 and MK3 models. does anyone know how to get this information?
> 
> 
> i'm now looking into the source code of the saa and kbtv for adding debug statements, and also reading up about i2c and such, but i'm far from an expert.  so if anyone has any experience with this card or with kbtv, let me know.  i'd love to get this card working under freebsd
> 
> 
> tnx in advance,
> 
> filip
> 

See
http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-July/004462.html

You can check sticker on the top cover of tuner (small metal housing)
for your tuner's make, IIRC. If you indeed have MK3 tuner, you need to
initialize TDA988x based IF demodulator.

As quick check, try following code (yes, I know it's bad :), changing
values for B, C and E bytes (currently they are for PAL/SECAM D/K). You
can lookup them on page 16 of
http://dl.ivtvdriver.org/datasheets/tuners/FM1216ME_MK3.pdf, depending
on your TV standard.

#include <sys/param.h>
#include <fcntl.h>

#include <dev/iicbus/iic.h>

int main(void) {
    struct iiccmd cmd;
    char buf[4];
    int res = 0;
    int fd;
    int sleeptime = 10000;
    if ((fd = open("/dev/iic0", O_RDWR, 0)) < 0) return -1;
    cmd.slave = 0x86; /* TDA9887 address */
    cmd.count = 1;
    cmd.buf = buf;
    buf[0] = buf[1] = buf[2] = buf[3] = 0;
    ioctl(fd, I2CSTOP);
    usleep(sleeptime);
    ioctl(fd, I2CRSTCARD, &cmd);
    usleep(sleeptime);
    if (ioctl(fd, I2CSTART, &cmd) == 0) {
        buf[0] = 0;
        buf[1] = 0x56; /* B byte */
        buf[2] = 0x70; /* C byte */
        buf[3] = 0x4b; /* E byte */
        cmd.count = 4;
        cmd.buf = buf;
        res = ioctl(fd, I2CWRITE, &cmd);
        usleep(sleeptime);
        ioctl(fd, I2CSTOP);
        usleep(sleeptime);
    }
    close(fd);
    return res;
}


HTH,
Yuri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFsLAurfDNc84wGlURAhjPAKCTzVqCtkpKcuYkLb0H+44M2RYqSQCcCtq6
MpiH14e99kjWnamEVepGwTs=
=7g9M
-----END PGP SIGNATURE-----


More information about the freebsd-multimedia mailing list