Update to driver 2.14. Adds new Tuner types for Hauppauge WinTV cards

This commit is contained in:
Roger Hardiman 2000-06-28 15:09:12 +00:00
parent e7919a4303
commit 231b1f331e
4 changed files with 154 additions and 105 deletions

View File

@ -487,3 +487,7 @@
2.13 26 Jun 2000 Merge in more changes from Thomas Klausner <wiz@netbsd.org>
syncing this driver with the NetBSD source at 25th June.
2.14 28 Jun 2000 Add new Hauppauge Tuner Types, supplied by Hauppauge and
required for Josef Karthauser <joe@pavilion.net>
Change the structure of some of the #include files and
merge in more NetBSD changes.

View File

@ -824,43 +824,56 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
/* Hauppauge kindly supplied the following Tuner Table */
/* FIXME: I think the tuners the driver selects for types */
/* 0x08 and 0x15 may be incorrect but no one has complained. */
/* Old Temic tuners had their own API, but newer Temic tuners */
/* have the same API as Philips tuners */
/*
ID Tuner Model Format We select Format
0 NONE
1 EXTERNAL
2 OTHER
3 Philips FI1216 BG
4 Philips FI1216MF BGLL' PHILIPS_SECAM
5 Philips FI1236 MN PHILIPS_NTSC
6 Philips FI1246 I PHILIPS_PALI
7 Philips FI1256 DK
8 Philips FI1216 MK2 BG PHILIPS_PALI
9 Philips FI1216MF MK2 BGLL' PHILIPS_SECAM
a Philips FI1236 MK2 MN PHILIPS_NTSC
b Philips FI1246 MK2 I PHILIPS_PALI
c Philips FI1256 MK2 DK
d Temic 4032FY5 NTSC TEMIC_NTSC
e Temic 4002FH5 BG TEMIC_PAL
f Temic 4062FY5 I TEMIC_PALI
10 Philips FR1216 MK2 BG
11 Philips FR1216MF MK2 BGLL' PHILIPS_FR1236_SECAM
12 Philips FR1236 MK2 MN PHILIPS_FR1236_NTSC
13 Philips FR1246 MK2 I
14 Philips FR1256 MK2 DK
15 Philips FM1216 BG PHILIPS_FR1216_PAL
16 Philips FM1216MF BGLL' PHILIPS_FR1236_SECAM
17 Philips FM1236 MN PHILIPS_FR1236_NTSC
18 Philips FM1246 I
19 Philips FM1256 DK
1a Temic 4036FY5 MN - FI1236 MK2 clone PHILIPS_NTSC
1b Samsung TCPN9082D MN
1c Samsung TCPM9092P Pal BG/I/DK
1d Temic 4006FH5 BG PHILIPS_PALI clone
1e Samsung TCPN9085D MN/Radio
1f Samsung TCPB9085P Pal BG/I/DK / Radio
20 Samsung TCPL9091P Pal BG & Secam L/L'
21 Temic 4039FY5 NTSC Radio
ID Tuner Model Format We select Format
0x00 NONE
0x01 EXTERNAL
0x02 OTHER
0x03 Philips FI1216 BG
0x04 Philips FI1216MF BGLL' PHILIPS_SECAM
0x05 Philips FI1236 MN PHILIPS_NTSC
0x06 Philips FI1246 I PHILIPS_PALI
0x07 Philips FI1256 DK
0x08 Philips FI1216 MK2 BG PHILIPS_PALI
0x09 Philips FI1216MF MK2 BGLL' PHILIPS_SECAM
0x0a Philips FI1236 MK2 MN PHILIPS_NTSC
0x0b Philips FI1246 MK2 I PHILIPS_PALI
0x0c Philips FI1256 MK2 DK
0x0d Temic 4032FY5 NTSC TEMIC_NTSC
0x0e Temic 4002FH5 BG TEMIC_PAL
0x0f Temic 4062FY5 I TEMIC_PALI
0x10 Philips FR1216 MK2 BG
0x11 Philips FR1216MF MK2 BGLL' PHILIPS_FR1236_SECAM
0x12 Philips FR1236 MK2 MN PHILIPS_FR1236_NTSC
0x13 Philips FR1246 MK2 I
0x14 Philips FR1256 MK2 DK
0x15 Philips FM1216 BG PHILIPS_FR1216_PAL
0x16 Philips FM1216MF BGLL' PHILIPS_FR1236_SECAM
0x17 Philips FM1236 MN PHILIPS_FR1236_NTSC
0x18 Philips FM1246 I
0x19 Philips FM1256 DK
0x1a Temic 4036FY5 MN (FI1236 MK2 clone) PHILIPS_NTSC
0x1b Samsung TCPN9082D MN
0x1c Samsung TCPM9092P Pal BG/I/DK
0x1d Temic 4006FH5 BG PHILIPS_PALI
0x1e Samsung TCPN9085D MN/Radio
0x1f Samsung TCPB9085P Pal BG/I/DK / Radio
0x20 Samsung TCPL9091P Pal BG & Secam L/L'
0x21 Temic 4039FY5 NTSC Radio
0x22 Philips FQ1216ME Pal BGIDK & Secam L/L'
0x23 Temic 4066FY5 Pal I (FI1246 MK2 clone) PHILIPS_PALI
0x24 Philips TD1536 MN/ATSCDigital
0x25 Philips TD1536D MN/ATSCDigital DUAL INPUT
0x26 Philips FMR1236 M/N FM(no demod)
0x27 Philips FI1256MP B/G, D/K
0x28 Samsung TCPQ9091P BG/I/DK, L/L'
0x29 Temic 4006FN5 BG/I/DK
0x2a Temic 4009FR5 BG FM
0x2b Temic 4046FM5 B/G, I, D/K, L/L'
0x2c Temic 4009FN5 B/G, I, D/K, FM (no demod)
0x2d Philips TD1536D_FH_44 MN/ATSCDigital DUAL INPUT
*/
@ -912,6 +925,7 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit )
case 0x8:
case 0xb:
case 0x1d:
case 0x23:
select_tuner( bktr, PHILIPS_PALI );
goto checkDBX;

View File

@ -108,6 +108,12 @@
|| (defined(__NetBSD__)) \
)
/*******************/
/* *** FreeBSD *** */
/*******************/
#ifdef __FreeBSD__
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -119,11 +125,6 @@
#include <vm/pmap.h>
#include <vm/vm_extern.h>
/*******************/
/* *** FreeBSD *** */
/*******************/
#ifdef __FreeBSD__
#if (__FreeBSD_version >=400000) || (NSMBUS > 0)
#include <sys/bus.h> /* used by smbus and newbus */
#endif
@ -179,6 +180,21 @@ typedef unsigned int uintptr_t;
/**************************/
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/signalvar.h>
#include <sys/vnode.h>
#ifdef __NetBSD__
#include <uvm/uvm_extern.h>
#else
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#endif
#include <sys/inttypes.h> /* uintptr_t */
#include <dev/ic/bt8xx.h>
#include <dev/pci/bktr/bktr_reg.h>

View File

@ -58,6 +58,12 @@
#define FIFO_RISC_DISABLED 0
#define ALL_INTS_DISABLED 0
/*******************/
/* *** FreeBSD *** */
/*******************/
#ifdef __FreeBSD__
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -74,11 +80,6 @@
#include <vm/pmap.h>
#include <vm/vm_extern.h>
/*******************/
/* *** FreeBSD *** */
/*******************/
#ifdef __FreeBSD__
#if (__FreeBSD_version < 400000)
#ifdef DEVFS
#include <sys/devfsext.h>
@ -104,8 +105,79 @@
#include <machine/clock.h> /* for DELAY */
#include <pci/pcivar.h>
#include <pci/pcireg.h>
#if (NSMBUS > 0)
#include <dev/bktr/bktr_i2c.h>
#endif
#include <sys/sysctl.h>
int bt848_card = -1;
int bt848_tuner = -1;
int bt848_reverse_mute = -1;
int bt848_format = -1;
int bt848_slow_msp_audio = -1;
SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt");
SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, "");
#if (__FreeBSD__ == 2)
#define PCIR_REVID PCI_CLASS_REG
#endif
#endif /* end freebsd section */
/****************/
/* *** BSDI *** */
/****************/
#ifdef __bsdi__
#endif /* __bsdi__ */
/**************************/
/* *** OpenBSD/NetBSD *** */
/**************************/
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/signalvar.h>
#include <sys/mman.h>
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/vnode.h>
#include <vm/vm.h>
#ifndef __NetBSD__
#include <vm/vm_kern.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#endif
#include <sys/device.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
#define BKTR_DEBUG
#ifdef BKTR_DEBUG
int bktr_debug = 0;
#define DPR(x) (bktr_debug ? printf x : 0)
#else
#define DPR(x)
#endif
#endif /* __NetBSD__ || __OpenBSD__ */
#ifdef __NetBSD__
#include <dev/ic/bt8xx.h> /* NetBSD location for .h files */
#include <dev/pci/bktr/bktr_reg.h>
@ -125,56 +197,6 @@
#include <dev/bktr/bktr_os.h>
#endif
#if defined(__FreeBSD__)
#if (NSMBUS > 0)
#include <dev/bktr/bktr_i2c.h>
#endif
#include <sys/sysctl.h>
int bt848_card = -1;
int bt848_tuner = -1;
int bt848_reverse_mute = -1;
int bt848_format = -1;
int bt848_slow_msp_audio = -1;
SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt");
SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, "");
SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, "");
#endif
#if (__FreeBSD__ == 2)
#define PCIR_REVID PCI_CLASS_REG
#endif
/****************/
/* *** BSDI *** */
/****************/
#ifdef __bsdi__
#endif /* __bsdi__ */
/**************************/
/* *** OpenBSD/NetBSD *** */
/**************************/
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/device.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
#define BKTR_DEBUG
#ifdef BKTR_DEBUG
int bktr_debug = 0;
#define DPR(x) (bktr_debug ? printf x : 0)
#else
#define DPR(x)
#endif
#endif /* __NetBSD__ || __OpenBSD__ */
/****************************/
@ -1240,13 +1262,6 @@ static int bktr_intr(void *arg) { return common_bktr_intr(arg); }
#define bktr_ioctl bktrioctl
#define bktr_mmap bktrmmap
int bktr_open __P((dev_t, int, int, struct proc *));
int bktr_close __P((dev_t, int, int, struct proc *));
int bktr_read __P((dev_t, struct uio *, int));
int bktr_write __P((dev_t, struct uio *, int));
int bktr_ioctl __P((dev_t, ioctl_cmd_t, caddr_t, int, struct proc*));
int bktr_mmap __P((dev_t, int, int));
vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_offset_t,
vm_offset_t, vm_offset_t);
@ -1667,8 +1682,8 @@ bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr)
/*
*
*/
int
bktr_mmap(dev_t dev, int offset, int nprot)
paddr_t
bktr_mmap(dev_t dev, off_t offset, int nprot)
{
int unit;
bktr_ptr_t bktr;