From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 19 11:59:32 2007 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AFDB16A407 for ; Fri, 19 Jan 2007 11:59:32 +0000 (UTC) (envelope-from y.pankov@irbis.net.ru) Received: from mail.irbis.net.ru (mail.irbis.net.ru [194.186.18.2]) by mx1.freebsd.org (Postfix) with ESMTP id 91DBC13C459 for ; Fri, 19 Jan 2007 11:59:31 +0000 (UTC) (envelope-from y.pankov@irbis.net.ru) Received: from [192.168.0.64] (baator.local [192.168.0.64]) by mail.irbis.net.ru (Postfix) with ESMTP id 8F6DB62D4AF; Fri, 19 Jan 2007 14:49:01 +0300 (MSK) Message-ID: <45B0B02E.2010501@irbis.net.ru> Date: Fri, 19 Jan 2007 14:49:02 +0300 From: Yuri Pankov User-Agent: Thunderbird 1.5.0.9 (X11/20070116) MIME-Version: 1.0 To: filip lenaerts References: <20070119103820.22322.qmail@web53002.mail.yahoo.com> In-Reply-To: <20070119103820.22322.qmail@web53002.mail.yahoo.com> X-Enigmail-Version: 0.94.1.0 OpenPGP: id=CE301A55 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.7/2466/Fri Jan 19 02:49:11 2007 on mail.irbis.net.ru X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.irbis.net.ru [194.186.18.2]); Fri, 19 Jan 2007 14:49:02 +0300 (MSK) Cc: freebsd-multimedia@freebsd.org Subject: Re: kbtv and saa7134 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 11:59:32 -0000 -----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@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: 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 #include #include 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-----