151694Sroger/* $FreeBSD$ */ 251694Sroger 351694Sroger/* 451694Sroger * This is part of the Driver for Video Capture Cards (Frame grabbers) 551694Sroger * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 651694Sroger * chipset. 751694Sroger * Copyright Roger Hardiman and Amancio Hasty. 851694Sroger * 951694Sroger * CHANGELOG : The Change History: 1051694Sroger * These version numbers represent the authors own numbering. 1151694Sroger * They are unrelated to Revision Control numbering of FreeBSD or 1251694Sroger * any other system. 1351694Sroger 1451694Sroger1.0 1/24/97 First Alpha release 1551694Sroger 1651694Sroger1.1 2/20/97 Added video ioctl so we can do PCI To PCI 1751694Sroger data transfers. This is for capturing data 1851694Sroger directly to a vga frame buffer which has 1951694Sroger a linear frame buffer. Minor code clean-up. 2051694Sroger 2151694Sroger1.3 2/23/97 Fixed system lock-up reported by 2251694Sroger Randall Hopper <rhh@ct.picker.com>. This 2351694Sroger problem seems somehow to be exhibited only 2451694Sroger in his system. I changed the setting of 2551694Sroger INT_MASK for CAP_CONTINUOUS to be exactly 2651694Sroger the same as CAP_SINGLE apparently setting 2751694Sroger bit 23 cleared the system lock up. 2851694Sroger version 1.1 of the driver has been reported 2951694Sroger to work with STB's WinTv, Hauppage's Wincast/Tv 3051694Sroger and last but not least with the Intel Smart 3151694Sroger Video Recorder. 3251694Sroger 3351694Sroger1.4 3/9/97 fsmp@freefall.org 3451694Sroger Merged code to support tuners on STB and WinCast 3551694Sroger cards. 3651694Sroger Modifications to the contrast and chroma ioctls. 3751694Sroger Textual cleanup. 3851694Sroger 3951694Sroger1.5 3/15/97 fsmp@freefall.org 4051694Sroger new bt848 specific versions of hue/bright/ 4151694Sroger contrast/satu/satv. 4251694Sroger Amancio's patch to fix "screen freeze" problem. 4351694Sroger 4451694Sroger1.6 3/19/97 fsmp@freefall.org 4551694Sroger new table-driven frequency lookup. 4651694Sroger removed disable_intr()/enable_intr() calls from i2c. 4751694Sroger misc. cleanup. 4851694Sroger 4951694Sroger1.7 3/19/97 fsmp@freefall.org 5051694Sroger added audio support submitted by: 5151694Sroger Michael Petry <petry@netwolf.NetMasters.com> 5251694Sroger 5351694Sroger1.8 3/20/97 fsmp@freefall.org 5451694Sroger extended audio support. 5551694Sroger card auto-detection. 5651694Sroger major cleanup, order of routines, declarations, etc. 5751694Sroger 5851694Sroger1.9 3/22/97 fsmp@freefall.org 5951694Sroger merged in Amancio's minor unit for tuner control 6051694Sroger mods. 6151694Sroger misc. cleanup, especially in the _intr routine. 6251694Sroger made AUDIO_SUPPORT mainline code. 6351694Sroger 6451694Sroger1.10 3/23/97 fsmp@freefall.org 6551694Sroger added polled hardware i2c routines, 6651694Sroger removed all existing software i2c routines. 6751694Sroger created software i2cProbe() routine. 6851694Sroger Randall Hopper's fixes of BT848_GHUE & BT848_GBRIG. 6951694Sroger eeprom support. 7051694Sroger 7151694Sroger1.11 3/24/97 fsmp@freefall.org 7251694Sroger Louis Mamakos's new bt848 struct. 7351694Sroger 7451694Sroger1.12 3/25/97 fsmp@freefall.org 7551694Sroger japanese freq table from Naohiro Shichijo. 7651694Sroger new table structs for tuner lookups. 7751694Sroger major scrub for "magic numbers". 7851694Sroger 7951694Sroger1.13 3/28/97 fsmp@freefall.org 8051694Sroger 1st PAL support. 8151694Sroger MAGIC_[1-4] demarcates magic #s needing PAL work. 8251694Sroger AFC code submitted by Richard Tobin 8351694Sroger <richard@cogsci.ed.ac.uk>. 8451694Sroger 8551694Sroger1.14 3/29/97 richard@cogsci.ed.ac.uk 8651694Sroger PAL support: magic numbers moved into 8751694Sroger format_params structure. 8851694Sroger Revised AFC interface. 8951694Sroger fixed DMA_PROG_ALLOC size misdefinition. 9051694Sroger 9151694Sroger1.15 4/18/97 John-Mark Gurney <gurney_j@resnet.uoregon.edu> 9251694Sroger Added [SR]RGBMASKs ioctl for byte swapping. 9351694Sroger 9451694Sroger1.16 4/20/97 Randall Hopper <rhh@ct.picker.com> 9551694Sroger Generalized RGBMASK ioctls for general pixel 9651694Sroger format setting [SG]ACTPIXFMT, and added query API 9751694Sroger to return driver-supported pix fmts GSUPPIXFMT. 9851694Sroger 9951694Sroger1.17 4/21/97 hasty@rah.star-gate.com 10051694Sroger Clipping support added. 10151694Sroger 10251694Sroger1.18 4/23/97 Clean up after failed CAP_SINGLEs where bt 10351694Sroger interrupt isn't delivered, and fixed fixing 10451694Sroger CAP_SINGLEs that for ODD_ONLY fields. 10551694Sroger1.19 9/8/97 improved yuv support , cleaned up weurope 10651694Sroger channel table, incorporated cleanup work from 10751694Sroger Luigi, fixed pci interface bug due to a 10851694Sroger change in the pci interface which disables 10951694Sroger interrupts from a PCI device by default, 11051694Sroger Added Luigi's, ioctl's BT848_SLNOTCH, 11151694Sroger BT848_GLNOTCH (set luma notch and get luma not) 11251694Sroger1.20 10/5/97 Keith Sklower <sklower@CS.Berkeley.EDU> submitted 11351694Sroger a patch to fix compilation of the BSDI's PCI 11451694Sroger interface. 11551694Sroger Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp> 11651694Sroger Submitted a patch for Japanese cable channels 11751694Sroger Joao Carlos Mendes Luis jonny@gta.ufrj.br 11851694Sroger Submitted general ioctl to set video broadcast 11951694Sroger formats (PAL, NTSC, etc..) previously we depended 12051694Sroger on the Bt848 auto video detect feature. 12151694Sroger1.21 10/24/97 Randall Hopper <rhh@ct.picker.com> 12251694Sroger Fix temporal decimation, disable it when 12351694Sroger doing CAP_SINGLEs, and in dual-field capture, don't 12451694Sroger capture fields for different frames 12551694Sroger1.22 11/08/97 Randall Hopper <rhh@ct.picker.com> 12651694Sroger Fixes for packed 24bpp - FIFO alignment 12751694Sroger1.23 11/17/97 Amancio <hasty@star-gate.com> 12851694Sroger Added yuv support mpeg encoding 12951694Sroger1.24 12/27/97 Jonathan Hanna <pangolin@rogers.wave.ca> 13051694Sroger Patch to support Philips FR1236MK2 tuner 13151694Sroger1.25 02/02/98 Takeshi Ohashi 13251694Sroger <ohashi@atohasi.mickey.ai.kyutech.ac.jp> submitted 13351694Sroger code to support bktr_read . 13451694Sroger Flemming Jacobsen <fj@schizo.dk.tfs.com> 13551694Sroger submitted code to support radio available with in 13651694Sroger some bt848 based cards;additionally, wrote code to 13751694Sroger correctly recognized his bt848 card. 13851694Sroger Roger Hardiman <roger@cs.strath.ac.uk> submitted 13951694Sroger various fixes to smooth out the microcode and made 14051694Sroger all modes consistent. 14151694Sroger1.26 Moved Luigi's I2CWR ioctl from the video_ioctl 14251694Sroger section to the tuner_ioctl section 14351694Sroger Changed Major device from 79 to 92 and reserved 14451694Sroger our Major device number -- hasty@star-gate.com 14551694Sroger1.27 Last batch of patches for radio support from 14651694Sroger Flemming Jacobsen <fj@trw.nl>. 14751694Sroger Added B849 PCI ID submitted by: 14851694Sroger Tomi Vainio <tomppa@fidata.fi> 14951694Sroger1.28 Frank Nobis <fn@Radio-do.de> added tuner support 15051694Sroger for the German Phillips PAL tuner and 15151694Sroger additional channels for german cable tv. 15251694Sroger1.29 Roger Hardiman <roger@cs.strath.ac.uk> 15351694Sroger Revised autodetection code to correctly handle both 15451694Sroger old and new VideoLogic Captivator PCI cards. 15551694Sroger Added tsleep of 2 seconds to initialistion code 15651694Sroger for PAL users.Corrected clock selection code on 15751694Sroger format change. 15851694Sroger1.30 Bring back Frank Nobis <fn@Radio-do.de>'s opt_bktr.h 15951694Sroger 16051694Sroger1.31 Randall Hopper <rhh@ct.picker.com> 16151694Sroger submitted ioctl to clear the video buffer 16251694Sroger prior to starting video capture 16351694Sroger Amancio : clean up yuv12 so that it does not 16451694Sroger affect rgb capture. Basically, fxtv after 16551694Sroger capturing in yuv12 mode , switching to rgb 16651694Sroger would cause the video capture to be too bright. 16751694Sroger1.32 disable inverse gamma function for rgb and yuv 16851694Sroger capture. fixed meteor brightness ioctl it now 16951694Sroger converts the brightness value from unsigned to 17051694Sroger signed. 17151694Sroger1.33 added sysctl: hw.bt848.tuner, hw.bt848.reverse_mute, 17251694Sroger hw.bt848.card 17351694Sroger card takes a value from 0 to bt848_max_card 17451694Sroger tuner takes a value from 0 to bt848_max_tuner 17551694Sroger reverse_mute : 0 no effect, 1 reverse tuner 17651694Sroger mute function some tuners are wired reversed :( 17751694Sroger1.34 reverse mute function for ims turbo card 17851694Sroger 17951694Sroger1.35 Roger Hardiman <roger@cs.strath.ac.uk> 18051694Sroger options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL 18151694Sroger in the kernel config file makes the driver's 18251694Sroger video_open() function select PAL rather than NTSC. 18351694Sroger This fixed all the hangs on my Dual Crystal card 18451694Sroger when using a PAL video signal. As a result, you 185160964Syar can lose the tsleep (of 2 seconds - now 0.25!!) 18651694Sroger which I previously added. (Unless someone else 18751694Sroger wanted the 0.25 second tsleep). 18851694Sroger 18951694Sroger1.36 added bt848.format sysctl variable. 19051694Sroger 1 denotes NTSC , 0 denotes PAL 19151694Sroger 19251694Sroger1.37 added support for Bt878 and improved Hauppauge's 19351694Sroger bt848 tuner recognition 19451694Sroger1.38 Further improvements on Hauppauge's rely on 19551694Sroger eeprom[9] to determine the tuner type 8) 19651694Sroger 19751694Sroger AVerMedia card type added <sos@freebsd.org> 19851694Sroger 19951694Sroger1.39 08/05/98 Roger Hardiman <roger@cs.strath.ac.uk> 20051694Sroger Updated Hauppauge detection code for Tuner ID 0x0a 20151694Sroger for newer NTSC WinCastTV 404 with Bt878 chipset. 20251694Sroger Tidied up PAL default in video_open() 20351694Sroger 20451694Sroger Soren bumped version from 1.39 to 1.49 to sync 20551694Sroger with FreeBSD CVS numbers. 20651694Sroger 20751694Sroger1.49 10 August 1998 Roger Hardiman <roger@cs.strath.ac.uk> 20851694Sroger Added Capture Area ioctl - BT848[SG]CAPAREA. 20951694Sroger Normally the full 640x480 (768x576 PAL) image 21051694Sroger is grabbed. This ioctl allows a smaller area 21151694Sroger from anywhere within the video image to be 21251694Sroger grabbed, eg a 400x300 image from (50,10). 21351694Sroger See restrictions in BT848SCAPAREA. 21451694Sroger 21551694Sroger1.50 31 August 1998 Roger Hardiman <roger@cs.strath.ac.uk> 21651694Sroger Renamed BT848[SG]CAPAREA to BT848_[SG]CAPAREA. 21751694Sroger Added PR kern/7177 for SECAM Video Highway Xtreme 21851694Sroger with single crystal PLL configuration 21951694Sroger submitted by Vsevolod Lobko <seva@alex-ua.com>. 22051694Sroger In kernel configuration file add 22151694Sroger options OVERRIDE_CARD=2 22251694Sroger options OVERRIDE_TUNER=11 22351694Sroger options BKTR_USE_PLL 22451694Sroger 22551694Sroger1.51 31 August 1998 Roger Hardiman <roger@cs.strath.ac.uk> 22651694Sroger Fixed bug in Miro Tuner detection. Missing Goto. 22751694Sroger Removed Hauppauge EEPROM 0x10 detection as I think 22851694Sroger 0x10 should be a PAL tuner, not NTSC. 22951694Sroger Reinstated some Tuner Guesswork code from 1.27 23051694Sroger 23151694Sroger1.52 3 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 23251694Sroger Submitted patch by Vsevolod Lobko <seva@alex-ua.com> 23351694Sroger to correct SECAM B-Delay and add XUSSR channel set. 23451694Sroger 23551694Sroger1.53 9 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 23651694Sroger Changed METEORSINPUT for Hauppauge cards with bt878. 23751694Sroger Submitted by Fred Templin <templin@erg.sri.com> 23851694Sroger Also fixed video_open defines and 878 support. 23951694Sroger 24051694Sroger1.54 18 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 24151694Sroger Changed tuner code to autodetect tuner i2c address. 24251694Sroger Addresses were incorrectly hardcoded. 24351694Sroger 24451694Sroger1.55 21 Sep 1998 Roger Hardiman <roger@cs.strath.ac.uk> 24551694Sroger Hauppauge Tech Support confirmed all Hauppauge 878 24651694Sroger PAL/SECAM boards will use PLL mode. 24751694Sroger Added to card probe. Thanks to Ken and Fred. 24851694Sroger 24951694Sroger1.56 21 Jan 1999 Roger Hardiman <roger@cs.strath.ac.uk> 25051694Sroger Added detection of Hauppauge IR remote control. 25151694Sroger and MSP34xx Audio chip. Fixed i2c read error. 25251694Sroger Hauppauge supplied details of new Tuner Types. 25351694Sroger Danny Braniss <danny@cs.huji.ac.il> submitted Bt878 25453123Sroger AVerMedia detection with PCI subsystem vendor id. 25551694Sroger 25651694Sroger1.57 26 Jan 1999 Roger Hardiman <roger@cs.strath.ac.uk> 25751694Sroger Support for MSP3410D / MSP3415D Stereo/Mono audio 25851694Sroger using the audio format Auto Detection Mode. 25951694Sroger Nicolas Souchu <nsouch@freebsd.org> ported the 26051694Sroger msp_read/write/reset functions to smbus/iicbus. 26151694Sroger METEOR_INPUT_DEV2 now selects a composite camera on 26251694Sroger the SVIDEO port for Johan Larsson<gozer@ludd.luth.se> 26351694Sroger For true SVIDEO, use METEOR_INPUT_DEV_SVIDEO 26451694Sroger 26551694Sroger1.58 8 Feb 1999 Roger Hardiman <roger@cs.strath.ac.uk> 26651694Sroger Added check to bktr_mmap from OpenBSD driver. 26751694Sroger Improved MSP34xx reset for bt848 Hauppauge boards. 26851694Sroger Added detection for Bt848a. 26951694Sroger Vsevolod Lobko<seva@sevasoft.alex-ua.com> added 27051694Sroger more XUSSR channels. 27151694Sroger 27251694Sroger1.59 9 Feb 1999 Added ioctl REMOTE_GETKEY for Hauppauge Infra-Red 27351694Sroger Remote Control. Submitted by Roger Hardiman. 27451694Sroger Added ioctl TVTUNER_GETCHANSET and 27551694Sroger BT848_GPIO_SET_EN,BT848_GPIO_SET_DATA (and GETs) 27651694Sroger Submitted by Vsevolod Lobko <seva@alex-ua.com> 27751694Sroger 27851694Sroger1.60 23 Feb 1999 Roger Hardiman <roger@freebsd.org> 27951694Sroger Corrected Mute on Hauppauge Radio cards. 28051694Sroger Autodetect MMAC Osprey by looking for "MMAC" in the EEPROM. 28151694Sroger Added for Jan Schmidt <mmedia@rz.uni-greifswald.de> 28251694Sroger Added ALPS Tuner Type from Hiroki Mori <mori@infocity.co.jp> 28351694Sroger 28451694Sroger1.61 29 Apr 1999 Roger Hardiman <roger@freebsd.org> 28551694Sroger Fix row=0/columns=0 bug. From Randal Hopper<aa8vb@ipass.net> 28651694Sroger Add option to block the reset of the MSP34xx audio chip by 28751694Sroger adding options BKTR_NO_MSP_RESET to the kernel config file. 28851694Sroger This is usefull if you run another operating system 28951694Sroger first to initialise the audio chip, then do a soft reboot. 29051694Sroger Added for Yuri Gindin <yuri@xpert.com> 29151694Sroger 29251694Sroger1.62 29 Apr 1999 Added new cards: NEC PK-UG-X017 and I/O DATA GV-BCTV2/PCI 29351694Sroger Added new tuner: ALPS_TSBH1 (plus FM Radio for ALPS_TSCH5) 29451694Sroger Added support for BCTV audio mux. 29551694Sroger All submitted by Hiroki Mori <mori@infocity.co.jp> 29651694Sroger 29751694Sroger1.63 29 Apr 1999 Roger Hardiman <roger@freebsd.org> 29851694Sroger Added initial code for VBI capture based on work by 29951694Sroger Hiroki Mori <mori@infocity.co.jp> and reworked by myself. 30051694Sroger This allows software decoding of teletext, intercast and 30151694Sroger subtitles via /dev/vbi. 30251694Sroger 30351694Sroger1.64 7 May 1999 Roger Hardiman <roger@freebsd.org> 30451694Sroger Support LifeView FlyVideo 98 cards. Use EEPROM for card 30551694Sroger autodetection. Use bttv's audio mux values. 30651694Sroger Thanks to Paul Reece <paul@fastlane.net.au>, 30751694Sroger Ivan Brawley <brawley@internode.com.au> and 30851694Sroger Gilad Rom <rom_glsa@ein-hashofet.co.il> 30951694Sroger Automatically locate the EEPROM i2c address and read the 31051694Sroger subsystem_vendor_id from EEPROM and not the PCI registers. 31151694Sroger Add NSMBUS checks around smbus/iicbus i2c bus code 31251694Sroger making it easier to compile the driver under 2.2.x. 31351694Sroger Add GPIO mask for the audio mux to each card type. 31451694Sroger Add CARD_ZOLTRIX and CARD_KISS from mailing list searches. 31551694Sroger 31651694Sroger1.65 18 May 1999 Roger Hardiman <roger@freebsd.org> 31751694Sroger Change Intel GPIO mask to stop turning the Intel Camera off 31851694Sroger Fixed tuner selection on Hauppauge card with tuner 0x0a 31951694Sroger Replaced none tuner with no tuner for Theo de Raadt. 32051694Sroger Ivan Brawley <brawley@internode.com.au> added 32151694Sroger the Australian channel frequencies. 32251694Sroger 32351694Sroger1.66 19 May 1999 Ivan Brawley <brawley@internode.com.au> added better 32451694Sroger Australian channel frequencies. 32551694Sroger 32651694Sroger1.67 23 May 1999 Roger Hardiman <roger@freebsd.org> 32751694Sroger Added rgb_vbi_prog() to capture VBI data and video at the 32851694Sroger same time. To capture VBI data, /dev/vbi must be opened 32951694Sroger before starting video capture. 33051694Sroger 33151694Sroger1.68 25 May 1999 Roger Hardiman <roger@freebsd.org> 33251694Sroger Due to differences in PCI bus implementations from various 33351694Sroger motherboard chipset manufactuers, the Bt878/Bt879 has 3 33451694Sroger PCI bus compatibility modes. These are 33551694Sroger NORMAL PCI 2.1 for proper PCI 2.1 compatible chipsets. 33651694Sroger INTEL 430 FX for the Intel 430 FX chipset. 33751694Sroger SIS VIA CHIPSET for certain SiS and VIA chipsets. 33851694Sroger Older Intel and non-Intel chipsets may also benefit from 33951694Sroger either 430_FX or SIS/VIA mode. 34051694Sroger 34151694Sroger NORMAL PCI mode is enabled by default. 34251694Sroger For INTEL 430 FX mode, add this to your kenel config: 34351694Sroger options "BKTR_430_FX_MODE" 34451694Sroger For SiS / VIA mode, add this to your kernel config: 34551694Sroger options "BKTR_SIS_VIA_MODE" 34651694Sroger 34751694Sroger Using quotes in these options is not needed in FreeBSD 4.x. 34851694Sroger 34951694Sroger Note. Newer VIA chipsets should be fully PCI 2.1 compatible 35051694Sroger and should work fine in the Default mode. 35151694Sroger 35251694Sroger Also rename 849 to 849A, the correct name for the chip. 35351694Sroger 35451694Sroger1.69 12 June 1999 Roger Hardiman <roger@freebsd.org> 35551694Sroger Updates for FreeBSD 4.x device driver interface. 35651694Sroger BSDI code removed. Will be restored later. 35751694Sroger 35851694Sroger1.70 12 July 1999 Roger Hardiman <roger@freebsd.org> 35951694Sroger Reorganise OS device dependant parts (based on a port to 36051694Sroger linux by Brad Parker). 36151694Sroger Make the driver compile on FreeBSD 2.2.x systems again. 36251694Sroger Change number of VBI lines from 16 to 12 for NTSC formats. 36351694Sroger Changes to probeCard() for better eeprom identification. 36451694Sroger Added STB Bt878 card identification. 36551694Sroger Add Hauppauge model identification to probeCard(). 36651694Sroger Added TDA9850 initialisation code taken from Linux bttv. 36751694Sroger Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP. 36851694Sroger Matt Brown <matt@dqc.org> added MSP3430G DBX initialisation. 36951694Sroger 37051694Sroger1.71 30 Aug 1999 Roger Hardiman <roger@freebsd.org> 37151694Sroger Small cleanup of OS dependant code. Remove NPCI usage. 37251694Sroger Fix bug in AVerMedia detection. 37351694Sroger Update VBI support for the AleVT Teletext package. Parts 37451694Sroger from Juha Nurmela's driver <Juha.Nurmela@quicknet.inet.fi> 37551694Sroger Add support for Hauppauge 627 and Temic 4006 submitted 37651694Sroger by Maurice Castro <maurice@atum.castro.aus.net> 37751694Sroger Tom Jansen <tom@unhooked.net> added BSDi support again. 37851694Sroger 37951694Sroger1.72 31 Aug 1999 Juha Nurmela <Juha.Nurmela@quicknet.inet.fi> 38051694Sroger Clear cap_ctl register when restarting the RISC program. 38151694Sroger This fixes the freezes experienced when changing changes. 38251694Sroger 38351694Sroger1.73 10 Sep 1999 Roger Hardiman <roger@freebsd.org> 38451694Sroger Add Hauppauge tuner #6 for Brian Somers <brian@freebsd.org> 38551694Sroger Add card type for Aimslabs Video Highway Xtreme for 38651694Sroger Ladislav Kostal <kostal@pefstud.uniag.sk> 38751694Sroger Added select() code (for VBI) for the 2.2.x driver 38851694Sroger tested by Steve Richards <steve@richsoft.demon.co.uk> 38951694Sroger 39051694Sroger1.74 17 Sep 1999 Roger Hardiman <roger@freebsd.org> 39151694Sroger Fix bug where FM radio stations were offset after using FXTV 39251694Sroger AVerMedia tuner type autodetection added for cards with 39351694Sroger a configuration EEPROM (currently their Bt878 range) 39451694Sroger Thanks to Frank at AVerMedia for providing the information. 39551694Sroger Tested by David La Croix <dlacroix@cowpie.acm.vt.edu> 39651694Sroger Tidy up some tuner code and Hauppauge detection code. 39751694Sroger New NetBSD code from Bernd Ernesti<bernd@arresum.inka.de> 39851694Sroger 39951694Sroger2.00 25 Sep 1999 Roger Hardiman <roger@freebsd.org> 40096758Seric Split the driver into separate tuner, card and audio sections. 40151925Sroger Update tuner code for FM radio to use datasheet equations. 40251694Sroger 40351725Sroger2.01 27 Sep 1999 Roger Hardiman <roger@freebsd.org> 40451725Sroger Add Dynalink Magic TView for Craig <crh@outpost.co.nz> 40551725Sroger Add Leadtek Winfast 2000 for Peter Wemm <peter@netplex.com.au> 40651725Sroger There is no audio support on these 2 cards yet. 40751725Sroger Tidy up a few tables with tabs and PLL selection code. 40851725Sroger Restore Video Highway Xtreme PLL code. 40951694Sroger 41051943Sroger2.02 4 Oct 1999 Peter Wemm <peter@netplex.com.au> 41151925Sroger Updated Australian Channel Set. 41251925Sroger Added Tuner and Mute values for LeadTek Winfast 2000 card 41351943Sroger 41451943Sroger2.03 5 Oct 1999 Thomas Runge <runge@rostock.zgdv.de> 41551943Sroger Found FM radio bug mute introduced in release 2.00 41651943Sroger 41752593Sroger2.04 20 Oct 1999 Roger Hardiman <roger@freebsd.org> 41853123Sroger Updated AVerMedia audio sources to support FM and Line In 41953123Sroger sources properly. (Based on info supplied by AVerMedia) 42052593Sroger Make PLL mode the default for Bt878 chips. This means PAL 42152593Sroger Bt878 users no longer need the BKTR_USE_PLL kernel option. 42252593Sroger Detect and auto-configure Dolby Surround Sound DPL3518A chip 42352593Sroger on Hauppauge WinTV Theater. From Frank Nobis <fn@radio-do.de> 42452593Sroger 42553123Sroger2.05 8 Nov 1999 Update tuner control codes for Philips SECAM. Submitted by 42653123Sroger Cyrille Lefevre <clefevre@citeweb.net> 42753123Sroger Updated clipping code, ready for Xv support in XFree86 4.0, 42853123Sroger submitted by Thomas Mueller <tmueller@thmu.de> 42953123Sroger Thomas also has information on a LynxOS port of this driver. 43053123Sroger Phase out the rgb_prog RISC program and use rgb_vbi_prog as 43153123Sroger the default. Now you no longer have to open /dev/vbi 43253123Sroger before /dev/bktr. - Roger Hardiman <roger@freebsd.org> 43354422Sroger 43454422Sroger2.06 7 Dec 1999 Fix bug which made the tuner fail on cards detected as 43554422Sroger IMS Turbo. Found by Patrick Mackeown<pgm@NS4.HELP-DESK.CO.UK> 43654422Sroger Put back some Hauppauge Tuner Types I deleted my mistake. 43754422Sroger Backout the switch from rgb_prob to rgb_vbi_prog due to 43854422Sroger problems with NTSC users. 43954422Sroger 44056531Sroger2.07 24 Jan 2000 Update i2c code to build on FreeBSD 3.x and 4.x machines. 44156531Sroger Added GPIO audio values for the Askey/Dynalink TV card 44259014Sroger taken from postings on the V4L mailing list. 44356531Sroger Update Australian Channel Set. Submitted by 44459014Sroger John Birrell <jb@cimlogic.com.au> 44556531Sroger Add new Channel Set for France. Submitted by 44659014Sroger Daniel Dagneaux <dagneaux@lure.u-psud.fr> 44756531Sroger 44859014Sroger2.08 6 Mar 2000 Reinstate rgb_vbi_prog as the default RISC program for 44959014Sroger PAL video. This does not want to work for NTSC, which will 45059014Sroger continue to use the rgb_prog RISC program. 45159014Sroger Add support for cable channels above channel 100. 45259014Sroger Submitted by Scott Presnell <srp@zgi.com> 45359014Sroger New MSP3410/3415 setup code submitted by 45459014Sroger Frank Nobis<fn@radio-do.de>. This is experimental and is 45559014Sroger enabled by setting the sysctl, hw.bt848.slow_msp_audio to 1 45659014Sroger before starting FXTV (or before opening /dev/bktrN) 45756531Sroger 45859014Sroger2.09 20 Mar 2000 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at> submitted 45959014Sroger patches to include the NetBSD and OpenBSD support from driver 46059014Sroger 1.74 into the new 2.xx driver. NetBSD is tested. OpenBSD is 46159014Sroger untested. 46259014Sroger Also fixed coding error in bktr_audio.c spotted by Thomas. 46359014Sroger Change xxx_ioctl functions to use ioctl_cmd_t for the cmd 46459014Sroger parameter. Found by looking at OpenBSDs change logs. 46559014Sroger Delete PROT_EXEC from OpenBSD (as per OpenBSD cvs logs). 46659014Sroger 46759014Sroger2.10 4 Apr 2000 Convert to using bus_space() to access the Bt848/878 registers 46859014Sroger rather than using a memory mapped structure. This makes the 46959014Sroger driver portable to other architectures, like Alpha and PPC. 47059014Sroger This was done by Thomas Klausner <wiz@netbsd.org> and 47159014Sroger myself Roger Hardiman <roger@freebsd.org> 47259014Sroger 47359250Sroger2.11 15 Apr 2000 Made changes so the driver compiles on FreeBSD/Alpha. 47459250Sroger Stop printing MSP autodetect. Requested by 47559250Sroger Chris D. Faulhaber <jedgar@fxp.org> 47659250Sroger 47759277Sroger2.12 16 Apr 2000 Set adelay as an 8 bit value, noticed by 47859277Sroger Thomas Klausner <wiz@netbsd.org> 47959277Sroger Fix typo in the new interrupt code. 48059277Sroger 48162112Sroger2.12 20 May 2000 Merge in NetBSD changes from Thomas Klausner <wiz@netbsd.org> 48262112Sroger following the import of driver 2.12 into NetBSD 48359277Sroger 48462112Sroger2.13 26 Jun 2000 Merge in more changes from Thomas Klausner <wiz@netbsd.org> 48562112Sroger syncing this driver with the NetBSD source at 25th June. 48659277Sroger 48762214Sroger2.14 28 Jun 2000 Add new Hauppauge Tuner Types, supplied by Hauppauge and 48862214Sroger required for Josef Karthauser <joe@pavilion.net> 48962214Sroger Change the structure of some of the #include files and 49062214Sroger merge in more NetBSD changes. 49165692Sroger 49265692Sroger2.15 10 Sep 2000 Add support for bktr_mem, a module to hold onto the bktr 49365692Sroger drives's contiguous memory buffers even when it is unloaded 49465692Sroger and reloaded. 49565692Sroger Simplify the use of the optional SMBUS i2c code by using a new 49665692Sroger #define called BKTR_USE_FREEBSD_SMBUS. 49765692Sroger Poul-Henning Kamp <phk@freebsd.org> changed the DEVFS code. 49865692Sroger Peter Wemm <peter@freebsd.org> fixed an SMBUS warning. 49965692Sroger Alexander Langer <alex@cichlids.com> fixed some FreeBSD newbus 50065692Sroger resource allocation problems (FreeBSD PR kern/18744). 50165692Sroger 50267306Sroger2.16 19 Sep 2000 Merge in NetBSD changes from Thomas Klausner <wiz@netbsd.org> 50367306Sroger 50467307Sroger2.17 19 Oct 2000 Alexander Langer <alex@big.endian.de> and 50567637Sroger Daniel O'Connor <doconnor@gsoft.com.au> 50667306Sroger both submitted fixes to devfs code. 50767306Sroger Fix PHK's commit so we only include machine/clock.h in 50867306Sroger FreeBSD 2.x, 3.x and 4.x systems 50967306Sroger 51068071Sroger2.18 30 Oct 2000 Roger Hardiman - Add new ioctls to allow userland programs 51168071Sroger fuller access to the I2C bus, BT848_MSP_READ BT848_MSP_WRITE 51268071Sroger and BT848_MSP_RESET. 51368071Sroger Add tuner type 0x2a. Remove 0x2c which was incorrect. 51468071Sroger Christian Gusenbauer <Christian.Gusenbauer@netway.at> added 51568071Sroger support for audio on Hauppauge cards without the audio mux. 51668071Sroger The MSP is used for audio selection. (the 44xxx models) 51768071Sroger 518139477Sjulian[see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bktr/ 519139477Sjulianfor newer change logs ] 520