diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 19:25:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 19:25:53 +0000 |
commit | 57445428488a2862840c4d7c96d7746c11031aaf (patch) | |
tree | 60b88b3a21896a33ee4dccc727d88b745a9ff731 /drivers/char | |
parent | 2e837819b1563679b55363d469239fdf4f17fbbb (diff) |
Merge with Linu 2.4.0-test6-pre6.
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/bttv-cards.c | 13 | ||||
-rw-r--r-- | drivers/char/bttv-driver.c | 16 | ||||
-rw-r--r-- | drivers/char/bttv.h | 2 | ||||
-rw-r--r-- | drivers/char/cpia.c | 7 | ||||
-rw-r--r-- | drivers/char/joystick/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/msp3400.c | 3 | ||||
-rw-r--r-- | drivers/char/pcmcia/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/tda9875.c | 72 |
8 files changed, 75 insertions, 40 deletions
diff --git a/drivers/char/bttv-cards.c b/drivers/char/bttv-cards.c index e4e26c92c..b2c26e35b 100644 --- a/drivers/char/bttv-cards.c +++ b/drivers/char/bttv-cards.c @@ -73,11 +73,9 @@ static struct CARD { { 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV/Radio+" }, { 0x1200bd11, BTTV_PINNACLERAVE, "Pinnacle PCTV Rave" }, { 0x13eb0070, BTTV_HAUPPAUGE878, "Hauppauge WinTV" }, -#if 0 /* probably wrong */ - { 0x14610002, BTTV_AVERMEDIA98, "Avermedia TVCapture 98" }, -#endif { 0x18501851, BTTV_CHRONOS_VS2, "Chronos Video Shuttle II" }, { 0x18521852, BTTV_TYPHOON_TVIEW, "Typhoon TView TV/FM Tuner" }, + { 0x217d6606, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, { 0x263610b4, BTTV_STB2, "STB TV PCI FM, P/N 6000704" }, { 0x3000144f, BTTV_MAGICTVIEW063, "TView 99 (CPH063)" }, { 0x300014ff, BTTV_MAGICTVIEW061, "TView 99 (CPH061)" }, @@ -85,7 +83,10 @@ static struct CARD { { 0x300214ff, BTTV_PHOEBE_TVMAS, "Phoebe TV Master" }, { 0x400a15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" }, { 0x402010fc, 0 /* no tvcards entry yet */, "I-O Data Co. GV-BCV3/PCI" }, +#if 0 /* probably wrong */ + { 0x14610002, BTTV_AVERMEDIA98, "Avermedia TVCapture 98" }, { 0x6606217d, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, +#endif { 0, -1, NULL } }; @@ -116,7 +117,7 @@ struct tvcard bttv_tvcards[] = 1,1,1,1,0,0,0,1, PLL_NONE, -1 }, { "AVerMedia TVPhone", 3, 1, 0, 3,15, { 2, 3, 1, 1}, {12, 4,11,11, 0},0, - 1,1,1,1,0,0,0,1, PLL_NONE, -1 }, + 1,1,1,1,0,0,0,1, PLL_28, -1 }, { "MATRIX-Vision MV-Delta", 5, 1, -1, 3, 0, { 2, 3, 1, 0, 0},{0 }, 0, 1,1,1,1,0,0,0,1, PLL_NONE, -1 }, @@ -218,7 +219,7 @@ struct tvcard bttv_tvcards[] = 1,1,1,1,0,0,0,1, PLL_NONE, -1 }, { "Leadtek WinFast 2000", 3, 1, 0, 2, 0xfff000, { 2, 3, 1, 1,0}, - { 0x621000,0x620100,0x621100,0x620000,0xE210000,0x620000},0, + { 0x621000,0x6ddf07,0x621100,0x620000,0xE210000,0x620000},0, 1,1,1,1,1,0,0,1, PLL_28, -1 }, { "Chronos Video Shuttle II", 3, 3, 0, 2, 0x1800, { 2, 3, 1, 1}, { 0, 0, 0x1000, 0x1000, 0x0800},0, @@ -266,7 +267,7 @@ struct tvcard bttv_tvcards[] = 0,0,0,0,0,0,0,0, PLL_28, 5 }, { "Terratec TV/Radio+", /* Radio ?? */ 3, 1, 0, 2, 0x1f0000, { 2, 3, 1, 1}, - { 0xe2ffff, 0, 0, 0, 0xe0ffff, 0xe2ffff },0, + { 0xe2ffff, 0xebffff, 0, 0, 0xe0ffff, 0xe2ffff },0, 0,0,0,0,0,0,0,0, PLL_35, 1 }, /* 0x30 */ diff --git a/drivers/char/bttv-driver.c b/drivers/char/bttv-driver.c index e635755a2..74d4188a2 100644 --- a/drivers/char/bttv-driver.c +++ b/drivers/char/bttv-driver.c @@ -132,8 +132,10 @@ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr) if (!pmd_none(*pmd)) { ptep = pte_offset(pmd, adr); pte = *ptep; - if(pte_present(pte)) - ret = (page_address(pte_page(pte))|(adr&(PAGE_SIZE-1))); + if(pte_present(pte)) { + ret = (unsigned long) page_address(pte_page(pte)); + ret |= (adr & (PAGE_SIZE - 1)); + } } } MDEBUG(printk("uv2kva(%lx-->%lx)", adr, ret)); @@ -1157,7 +1159,7 @@ static int make_vrisctab_kiobuf(struct bttv *btv, unsigned int *ro, offset = iobuf->offset; page = 0; - pageaddr = virt_to_bus((void*)page_address(iobuf->maplist[page])); + pageaddr = virt_to_bus(page_address(iobuf->maplist[page])); for (line=0; line < (height<<(1^inter)); line++) { if (inter) @@ -1178,13 +1180,13 @@ static int make_vrisctab_kiobuf(struct bttv *btv, unsigned int *ro, todo -= bl; offset = 0; page++; - pageaddr = virt_to_bus((void*)page_address(iobuf->maplist[page])); + pageaddr = virt_to_bus(page_address(iobuf->maplist[page])); while (todo>PAGE_SIZE) { *((*rp)++)=cpu_to_le32(BT848_RISC_WRITE|PAGE_SIZE); *((*rp)++)=cpu_to_le32(pageaddr); page++; - pageaddr = virt_to_bus((void*)page_address(iobuf->maplist[page])); + pageaddr = virt_to_bus(page_address(iobuf->maplist[page])); } *((*rp)++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|todo); *((*rp)++)=cpu_to_le32(pageaddr); @@ -2112,7 +2114,7 @@ static int bttv_ioctl(struct video_device *dev, unsigned int cmd, void *arg) iobuf->locked); printk("bttv%d: hack: pages (bus addr):",btv->nr); for (i = 0; i < iobuf->nr_pages; i++) { - printk(" %lx", virt_to_bus((void*)page_address(iobuf->maplist[i]))); + printk(" %lx", virt_to_bus(page_address(iobuf->maplist[i]))); } printk("\n"); @@ -3032,7 +3034,7 @@ static void __devinit bttv_remove(struct pci_dev *pci_dev) struct bttv *btv = PCI_GET_DRIVER_DATA(pci_dev); /* unregister i2c_bus */ - if (btv->i2c_ok) + if (0 == btv->i2c_ok) i2c_bit_del_bus(&btv->i2c_adap); /* turn off all capturing, DMA and IRQs */ diff --git a/drivers/char/bttv.h b/drivers/char/bttv.h index c3d3abcbe..6b35d23e5 100644 --- a/drivers/char/bttv.h +++ b/drivers/char/bttv.h @@ -21,7 +21,7 @@ #ifndef _BTTV_H_ #define _BTTV_H_ -#define BTTV_VERSION_CODE KERNEL_VERSION(0,7,37) +#define BTTV_VERSION_CODE KERNEL_VERSION(0,7,38) #ifndef PCI_GET_DRIVER_DATA # define PCI_GET_DRIVER_DATA(pdev) ((pdev)->driver_data) diff --git a/drivers/char/cpia.c b/drivers/char/cpia.c index e65b8ec25..c9ec988d1 100644 --- a/drivers/char/cpia.c +++ b/drivers/char/cpia.c @@ -199,9 +199,10 @@ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr) if (!pmd_none(*pmd)) { ptep = pte_offset(pmd, adr); pte = *ptep; - if (pte_present(pte)) - ret = page_address(pte_page(pte)) | - (adr & (PAGE_SIZE-1)); + if (pte_present(pte)) { + ret = (unsigned long) page_address(pte_page(pte)); + ret |= (adr & (PAGE_SIZE-1)); + } } } return ret; diff --git a/drivers/char/joystick/Makefile b/drivers/char/joystick/Makefile index 2ad452618..ae6a42cb8 100644 --- a/drivers/char/joystick/Makefile +++ b/drivers/char/joystick/Makefile @@ -14,7 +14,6 @@ ALL_SUB_DIRS := $(SUB_DIRS) O_TARGET := js.o M_OBJS := O_OBJS := -#MOD_LIST_NAME := INPUT_MODULES # Objects that export symbols. diff --git a/drivers/char/msp3400.c b/drivers/char/msp3400.c index b8390c520..2d2b1e89c 100644 --- a/drivers/char/msp3400.c +++ b/drivers/char/msp3400.c @@ -1168,7 +1168,8 @@ static int msp_attach(struct i2c_adapter *adap, int addr, if (simple == -1) { /* default mode */ - msp->simple = (((rev2>>8)&0xff) == 0) ? 0 : 1; + /* msp->simple = (((rev2>>8)&0xff) == 0) ? 0 : 1; */ + msp->simple = ((rev1&0xff)+'@' > 'C'); } else { /* use insmod option */ msp->simple = simple; diff --git a/drivers/char/pcmcia/Makefile b/drivers/char/pcmcia/Makefile index 198500763..a83e1f913 100644 --- a/drivers/char/pcmcia/Makefile +++ b/drivers/char/pcmcia/Makefile @@ -9,7 +9,6 @@ MOD_SUB_DIRS := $(SUB_DIRS) ALL_SUB_DIRS := $(SUB_DIRS) O_TARGET := pcmcia_char.o -MOD_LIST_NAME := PCMCIA_CHAR_MODULES obj-y := obj-m := diff --git a/drivers/char/tda9875.c b/drivers/char/tda9875.c index da3ceebfe..9f6ecd332 100644 --- a/drivers/char/tda9875.c +++ b/drivers/char/tda9875.c @@ -5,7 +5,7 @@ * This driver will not complain if used with any * other i2c device with the same address. * - * Copyright (c) 2000 Guillamue Delvit based on Gerd Knorr source and + * Copyright (c) 2000 Guillaume Delvit based on Gerd Knorr source and * Eric Sandeen * This code is placed under the terms of the GNU General Public License * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu) @@ -121,7 +121,7 @@ static struct i2c_client client_template; /* Begin code */ -static int tda9875_write(struct i2c_client *client, int subaddr, int val) +static int tda9875_write(struct i2c_client *client, int subaddr, unsigned char val) { unsigned char buffer[2]; dprintk("In tda9875_write\n"); @@ -153,12 +153,19 @@ static int tda9875_read(struct i2c_client *client) static void tda9875_set(struct i2c_client *client) { struct tda9875 *tda = client->data; - + unsigned char a; + dprintk(KERN_DEBUG "tda9875_set(%04x,%04x,%04x,%04x)\n",tda->lvol,tda->rvol,tda->bass,tda->treble); - tda9875_write(client, TDA9875_MVL, tda->lvol / 600 - 84); - tda9875_write(client, TDA9875_MVR, tda->rvol / 600 -84); - tda9875_write(client, TDA9875_MBA, tda->bass / 2340 -12); - tda9875_write(client, TDA9875_MTR, tda->treble / 2621 -12); + + + a = tda->lvol & 0xff; + tda9875_write(client, TDA9875_MVL, a); + a =tda->rvol & 0xff; + tda9875_write(client, TDA9875_MVR, a); + a =tda->bass & 0xff; + tda9875_write(client, TDA9875_MBA, a); + a =tda->treble & 0xff; + tda9875_write(client, TDA9875_MTR, a); } static void do_tda9875_init(struct i2c_client *client) @@ -198,10 +205,10 @@ static void do_tda9875_init(struct i2c_client *client) tda9875_write(client, TDA9875_MUT, 0xcc ); /* General mute */ - t->mode=AUDIO_MUTE; - t->lvol=t->rvol =51000; /* 0dB */ - t->bass=30420; /* 0dB */ - t->treble=34073; /* 0dB */ + t->mode=AUDIO_UNMUTE; + t->lvol=t->rvol =0; /* 0dB */ + t->bass=0; /* 0dB */ + t->treble=0; /* 0dB */ tda9875_set(client); } @@ -280,15 +287,15 @@ static int tda9875_command(struct i2c_client *client, VIDEO_AUDIO_TREBLE; /* min is -84 max is 24 */ - left = (t->lvol+85)*600; - right = (t->rvol+85)*600; + left = (t->lvol+84)*606; + right = (t->rvol+84)*606; va->volume=MAX(left,right); va->balance=(32768*MIN(left,right))/ (va->volume ? va->volume : 1); va->balance=(left<right)? (65535-va->balance) : va->balance; - va->bass = (t->bass+13)*2340; /* min -12 max +15 */ - va->treble = (t->treble+13)*2621;/* min -12 max +12 */ + va->bass = (t->bass+12)*2427; /* min -12 max +15 */ + va->treble = (t->treble+12)*2730;/* min -12 max +12 */ va->mode |= VIDEO_SOUND_MONO; @@ -306,11 +313,36 @@ static int tda9875_command(struct i2c_client *client, va->volume) / 32768; right = (MIN(va->balance,32768) * va->volume) / 32768; - t->lvol = left/600-84; - t->rvol = right/600-84; - t->bass = va->bass/2340-12; - t->treble = va->treble/2621-12; - tda9875_set(client); + t->lvol = ((left/606)-84) & 0xff; + if (t->lvol > 24) + t->lvol = 24; + if (t->lvol < -84) + t->lvol = -84 & 0xff; + + t->rvol = ((right/606)-84) & 0xff; + if (t->rvol > 24) + t->rvol = 24; + if (t->rvol < -84) + t->rvol = -84 & 0xff; + + t->bass = ((va->bass/2400)-12) & 0xff; + if (t->bass > 15) + t->bass = 15; + if (t->bass < -12) + t->bass = -12 & 0xff; + + t->treble = ((va->treble/2700)-12) & 0xff; + if (t->treble > 12) + t->treble = 12; + if (t->treble < -12) + t->treble = -12 & 0xff; + + + +//printk("tda9875 bal:%04x vol:%04x bass:%04x treble:%04x\n",va->balance,va->volume,va->bass,va->treble); + + + tda9875_set(client); break; |