From 12504d0820e7e62e32d40a779016b5efef945606 Mon Sep 17 00:00:00 2001 From: Roger Hardiman Date: Mon, 24 Jan 2000 14:00:21 +0000 Subject: [PATCH] Update to driver 2.07 Update i2c code to build on FreeBSD 3.x and 4.x machines. Added GPIO audio values for the Askey/Dynalink TV card talken from postings on the V4L mailing list. Update Australian Channel Set. Submitted by John Birrell Add new Channel Set for France. Submitted by Daniel Dagneaux --- sys/dev/bktr/CHANGELOG.TXT | 9 +++++++++ sys/dev/bktr/bktr_card.c | 4 ++-- sys/dev/bktr/bktr_i2c.c | 8 ++++++++ sys/dev/bktr/bktr_tuner.c | 38 ++++++++++++++++++++++++++++---------- 4 files changed, 47 insertions(+), 12 deletions(-) diff --git a/sys/dev/bktr/CHANGELOG.TXT b/sys/dev/bktr/CHANGELOG.TXT index f6910414f003..ffa7dbdceda3 100755 --- a/sys/dev/bktr/CHANGELOG.TXT +++ b/sys/dev/bktr/CHANGELOG.TXT @@ -440,3 +440,12 @@ Backout the switch from rgb_prob to rgb_vbi_prog due to problems with NTSC users. +2.07 24 Jan 2000 Update i2c code to build on FreeBSD 3.x and 4.x machines. + Added GPIO audio values for the Askey/Dynalink TV card + taken from postings on the V4L mailing list. + Update Australian Channel Set. Submitted by + John Birrell + Add new Channel Set for France. Submitted by + Daniel Dagneaux + + diff --git a/sys/dev/bktr/bktr_card.c b/sys/dev/bktr/bktr_card.c index 6e1792388e91..1b2f41043301 100644 --- a/sys/dev/bktr/bktr_card.c +++ b/sys/dev/bktr/bktr_card.c @@ -288,8 +288,8 @@ static const struct CARDTYPE cards[] = { 0, 0, /* EEProm type */ 0, /* EEProm size */ - { 0x00, 0x00, 0x00, 0x00, 0 }, /* audio MUX values */ - 0x00 }, /* GPIO mask */ + { 0x400, 0xE00, 0x400, 0xC00, 1 }, /* audio MUX values */ + 0xE00 }, /* GPIO mask */ { CARD_LEADTEK, /* the card id */ "Leadtek Winfast TV 2000", /* the 'name' */ diff --git a/sys/dev/bktr/bktr_i2c.c b/sys/dev/bktr/bktr_i2c.c index 43a5f35a24e9..6f500ffdd504 100644 --- a/sys/dev/bktr/bktr_i2c.c +++ b/sys/dev/bktr/bktr_i2c.c @@ -159,10 +159,18 @@ bt848_i2c_attach(int unit, bt848_ptr_t base, struct bktr_i2c_softc *i2c_sc) btdata[unit].base = base; /* XXX add the I2C interface to the root_bus until pcibus is ready */ +#if (__FreeBSD_version < 400000) + interface = device_add_child(root_bus, "bti2c", unit, NULL); +#else interface = device_add_child(root_bus, "bti2c", unit); +#endif /* add bit-banging generic code onto bti2c interface */ +#if (__FreeBSD_version < 400000) + bitbang = device_add_child(interface, "iicbb", -1, NULL); +#else bitbang = device_add_child(interface, "iicbb", -1); +#endif /* probe and attach the interface, we need it NOW * bit-banging code is also probed and attached */ diff --git a/sys/dev/bktr/bktr_tuner.c b/sys/dev/bktr/bktr_tuner.c index 6f67fbb9187c..290975dbe13e 100644 --- a/sys/dev/bktr/bktr_tuner.c +++ b/sys/dev/bktr/bktr_tuner.c @@ -599,19 +599,36 @@ static int xussr[] = { * Australian broadcast channels */ #define OFFSET 7.00 +#define IF_FREQ 38.90 static int australia[] = { - 83, (int)( 45.00 * FREQFACTOR), 0, - 28, (int)(521.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - /* ch 14?? what's this, cable? Air channels are 0-11 and 28-69 */ - 14, (int)(471.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 10, (int)(203.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 6, (int)(169.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 4, (int)( 89.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 3, (int)( 80.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 1, (int)( 51.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), - 0 + 83, (int)(IF_FREQ * FREQFACTOR), 0, + 28, (int)(527.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 10, (int)(209.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 6, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 4, (int)( 95.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 3, (int)( 86.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 1, (int)( 57.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), + 0 }; #undef OFFSET +#undef IF_FREQ + +/* + * France broadcast channels + */ +#define OFFSET 8.00 +#define IF_FREQ 38.90 +static int france[] = { + 69, (int)(IF_FREQ * FREQFACTOR), 0, + 21, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 21 -> 69 */ + 5, (int)(176.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 5 -> 10 */ + 4, (int)( 63.75 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 4 */ + 3, (int)( 60.50 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 3 */ + 1, (int)( 47.75 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 1 2 */ + 0 +}; +#undef OFFSET +#undef IF_FREQ static struct { int *ptr; @@ -626,6 +643,7 @@ static struct { {jpncable, "jpncable"}, {xussr, "xussr"}, {australia, "australia"}, + {france, "france"}, };