Date: Wed, 5 Nov 1997 18:01:54 +0100 (MET) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: multimedia@freebsd.org Subject: Teletext decoding with the Hauppauge... Message-ID: <199711051701.SAA23167@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
Enclosed is a very primitive program, which, together with the Bt848 patches that I submitted a few days ago allow you to capture teletext data. The program is very raw since it was meant as a command-line tool to control tuner parameters (channel, brightness, etc.) and was later extended to access the I2C peripherals and then further extended to capture txt pages. As it is now, you can run it and then issue commands like txt 120 to capture page 120, etc. -- when a page is done it is displayed on stdout. Fancy user interfaces will come next year... I am not sure if the card can only capture teletext, or also close-captioning or other "extended" services available around the world. As an example, it _might_ be able to capture Intercast data (but decoding them is a completely different issue...) in the locations where this service is available. The patch for the Bt848 driver for those who have lost it is the following: in /sys/pci/brooktree848.c, as one of the switches in tuner_ioctl(), add the following: static int tuner_ioctl( bktr_ptr_t bktr, int unit, int cmd, caddr_t arg, struct proc* pr ) { ... case BT848_I2CWR: /* XXX */ { u_long par = *(u_long *)arg; u_char write = (par >> 24) & 0xff ; int i2c_addr = (par >> 16) & 0xff ; int i2c_port = (par >> 8) & 0xff ; u_long data = (par) & 0xff ; if (write) { i2cWrite( bktr, i2c_addr, i2c_port, data); } else { data = i2cRead( bktr, i2c_addr); } *(u_long *)arg = (par & 0xffffff00) | ( data & 0xff ); } break; in /sys/i386/include/ioctl_bt848.h add the following (near the definition of other ioctl()s : /* * b7-b0: data (read/write) * b15-b8: internal peripheral register (write) * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ #define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ Cheers Luigi begin 664 txt.c.gz M'XL(`&K08#0``\U8>W/;-A+_6_P46W4<DY(BD_2CBBVG(ZMNFIG4[ME*;WI. MQ@.1H(0)1?)`TI:<^KO?+D!2E)]*.IZY3$03P&(?OWT0BZV6`2W(\HAW/7JC MGSFTP'GSYB?XD(N)@#-Q<Q,;QFC*(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