diff options
| -rw-r--r-- | drivers/media/video/bttv-cards.c | 110 | ||||
| -rw-r--r-- | drivers/media/video/bttv-driver.c | 19 | ||||
| -rw-r--r-- | drivers/media/video/bttv-i2c.c | 26 | ||||
| -rw-r--r-- | drivers/media/video/bttv-risc.c | 9 |
4 files changed, 35 insertions, 129 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 251092e7f19f..2dbf5ec43abd 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | $Id: bttv-cards.c,v 1.49 2005/06/10 17:20:24 mchehab Exp $ | 2 | $Id: bttv-cards.c,v 1.53 2005/07/05 17:37:35 nsh Exp $ |
| 3 | 3 | ||
| 4 | bttv-cards.c | 4 | bttv-cards.c |
| 5 | 5 | ||
| @@ -39,9 +39,6 @@ | |||
| 39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
| 40 | 40 | ||
| 41 | #include "bttvp.h" | 41 | #include "bttvp.h" |
| 42 | #if 0 /* not working yet */ | ||
| 43 | #include "bt832.h" | ||
| 44 | #endif | ||
| 45 | 42 | ||
| 46 | /* fwd decl */ | 43 | /* fwd decl */ |
| 47 | static void boot_msp34xx(struct bttv *btv, int pin); | 44 | static void boot_msp34xx(struct bttv *btv, int pin); |
| @@ -513,13 +510,8 @@ struct tvcard bttv_tvcards[] = { | |||
| 513 | .svhs = 2, | 510 | .svhs = 2, |
| 514 | .gpiomask = 0x01fe00, | 511 | .gpiomask = 0x01fe00, |
| 515 | .muxsel = { 2, 3, 1, 1}, | 512 | .muxsel = { 2, 3, 1, 1}, |
| 516 | #if 0 | ||
| 517 | // old | ||
| 518 | .audiomux = { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 }, | ||
| 519 | #else | ||
| 520 | // 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> | 513 | // 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> |
| 521 | .audiomux = { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 }, | 514 | .audiomux = { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 }, |
| 522 | #endif | ||
| 523 | .needs_tvaudio = 1, | 515 | .needs_tvaudio = 1, |
| 524 | .pll = PLL_28, | 516 | .pll = PLL_28, |
| 525 | .tuner_type = -1, | 517 | .tuner_type = -1, |
| @@ -766,14 +758,9 @@ struct tvcard bttv_tvcards[] = { | |||
| 766 | .tuner = 0, | 758 | .tuner = 0, |
| 767 | .svhs = 2, | 759 | .svhs = 2, |
| 768 | .muxsel = { 2, 3, 1, 1, 0}, // TV, CVid, SVid, CVid over SVid connector | 760 | .muxsel = { 2, 3, 1, 1, 0}, // TV, CVid, SVid, CVid over SVid connector |
| 769 | #if 0 | ||
| 770 | .gpiomask = 0xc33000, | ||
| 771 | .audiomux = { 0x422000,0x1000,0x0000,0x620000,0x800000 }, | ||
| 772 | #else | ||
| 773 | /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */ | 761 | /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */ |
| 774 | .gpiomask = 0xb33000, | 762 | .gpiomask = 0xb33000, |
| 775 | .audiomux = { 0x122000,0x1000,0x0000,0x620000,0x800000 }, | 763 | .audiomux = { 0x122000,0x1000,0x0000,0x620000,0x800000 }, |
| 776 | #endif | ||
| 777 | /* Audio Routing for "WinFast 2000 XP" (no tv stereo !) | 764 | /* Audio Routing for "WinFast 2000 XP" (no tv stereo !) |
| 778 | gpio23 -- hef4052:nEnable (0x800000) | 765 | gpio23 -- hef4052:nEnable (0x800000) |
| 779 | gpio12 -- hef4052:A1 | 766 | gpio12 -- hef4052:A1 |
| @@ -1603,20 +1590,11 @@ struct tvcard bttv_tvcards[] = { | |||
| 1603 | .video_inputs = 4, | 1590 | .video_inputs = 4, |
| 1604 | .audio_inputs = 1, | 1591 | .audio_inputs = 1, |
| 1605 | .tuner = -1, | 1592 | .tuner = -1, |
| 1606 | #if 0 /* TODO ... */ | ||
| 1607 | .svhs = OSPREY540_SVID_ANALOG, | ||
| 1608 | .muxsel = { [OSPREY540_COMP_ANALOG] = 2, | ||
| 1609 | [OSPREY540_SVID_ANALOG] = 3, }, | ||
| 1610 | #endif | ||
| 1611 | .pll = PLL_28, | 1593 | .pll = PLL_28, |
| 1612 | .tuner_type = -1, | 1594 | .tuner_type = -1, |
| 1613 | .no_msp34xx = 1, | 1595 | .no_msp34xx = 1, |
| 1614 | .no_tda9875 = 1, | 1596 | .no_tda9875 = 1, |
| 1615 | .no_tda7432 = 1, | 1597 | .no_tda7432 = 1, |
| 1616 | #if 0 /* TODO ... */ | ||
| 1617 | .muxsel_hook = osprey_540_muxsel, | ||
| 1618 | .picture_hook = osprey_540_set_picture, | ||
| 1619 | #endif | ||
| 1620 | },{ | 1598 | },{ |
| 1621 | 1599 | ||
| 1622 | /* ---- card 0x5C ---------------------------------- */ | 1600 | /* ---- card 0x5C ---------------------------------- */ |
| @@ -2546,21 +2524,12 @@ static void eagle_muxsel(struct bttv *btv, unsigned int input) | |||
| 2546 | btaor((2)<<5, ~(3<<5), BT848_IFORM); | 2524 | btaor((2)<<5, ~(3<<5), BT848_IFORM); |
| 2547 | gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]); | 2525 | gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]); |
| 2548 | 2526 | ||
| 2549 | #if 0 | ||
| 2550 | /* svhs */ | ||
| 2551 | /* wake chroma ADC */ | ||
| 2552 | btand(~BT848_ADC_C_SLEEP, BT848_ADC); | ||
| 2553 | /* set to YC video */ | ||
| 2554 | btor(BT848_CONTROL_COMP, BT848_E_CONTROL); | ||
| 2555 | btor(BT848_CONTROL_COMP, BT848_O_CONTROL); | ||
| 2556 | #else | ||
| 2557 | /* composite */ | 2527 | /* composite */ |
| 2558 | /* set chroma ADC to sleep */ | 2528 | /* set chroma ADC to sleep */ |
| 2559 | btor(BT848_ADC_C_SLEEP, BT848_ADC); | 2529 | btor(BT848_ADC_C_SLEEP, BT848_ADC); |
| 2560 | /* set to composite video */ | 2530 | /* set to composite video */ |
| 2561 | btand(~BT848_CONTROL_COMP, BT848_E_CONTROL); | 2531 | btand(~BT848_CONTROL_COMP, BT848_E_CONTROL); |
| 2562 | btand(~BT848_CONTROL_COMP, BT848_O_CONTROL); | 2532 | btand(~BT848_CONTROL_COMP, BT848_O_CONTROL); |
| 2563 | #endif | ||
| 2564 | 2533 | ||
| 2565 | /* switch sync drive off */ | 2534 | /* switch sync drive off */ |
| 2566 | gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE); | 2535 | gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE); |
| @@ -2813,10 +2782,18 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
| 2813 | btv->tuner_type = tuner[btv->c.nr]; | 2782 | btv->tuner_type = tuner[btv->c.nr]; |
| 2814 | printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type); | 2783 | printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type); |
| 2815 | if (btv->pinnacle_id != UNSET) | 2784 | if (btv->pinnacle_id != UNSET) |
| 2816 | bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, | 2785 | bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE, |
| 2817 | &btv->pinnacle_id); | 2786 | &btv->pinnacle_id); |
| 2818 | if (btv->tuner_type != UNSET) | 2787 | if (btv->tuner_type != UNSET) { |
| 2819 | bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); | 2788 | struct tuner_setup tun_setup; |
| 2789 | |||
| 2790 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; | ||
| 2791 | tun_setup.type = btv->tuner_type; | ||
| 2792 | tun_setup.addr = ADDR_UNSET; | ||
| 2793 | |||
| 2794 | bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup); | ||
| 2795 | } | ||
| 2796 | |||
| 2820 | btv->svhs = bttv_tvcards[btv->c.type].svhs; | 2797 | btv->svhs = bttv_tvcards[btv->c.type].svhs; |
| 2821 | if (svhs[btv->c.nr] != UNSET) | 2798 | if (svhs[btv->c.nr] != UNSET) |
| 2822 | btv->svhs = svhs[btv->c.nr]; | 2799 | btv->svhs = svhs[btv->c.nr]; |
| @@ -3125,14 +3102,6 @@ static int tuner_0_table[] = { | |||
| 3125 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM, | 3102 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM, |
| 3126 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL, | 3103 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL, |
| 3127 | TUNER_PHILIPS_FM1216ME_MK3 }; | 3104 | TUNER_PHILIPS_FM1216ME_MK3 }; |
| 3128 | #if 0 | ||
| 3129 | int tuner_0_fm_table[] = { | ||
| 3130 | PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL, | ||
| 3131 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, | ||
| 3132 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, | ||
| 3133 | PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM, | ||
| 3134 | PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL}; | ||
| 3135 | #endif | ||
| 3136 | 3105 | ||
| 3137 | static int tuner_1_table[] = { | 3106 | static int tuner_1_table[] = { |
| 3138 | TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL, | 3107 | TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL, |
| @@ -3218,36 +3187,6 @@ static void __devinit boot_msp34xx(struct bttv *btv, int pin) | |||
| 3218 | 3187 | ||
| 3219 | static void __devinit boot_bt832(struct bttv *btv) | 3188 | static void __devinit boot_bt832(struct bttv *btv) |
| 3220 | { | 3189 | { |
| 3221 | #if 0 /* not working yet */ | ||
| 3222 | int resetbit=0; | ||
| 3223 | |||
| 3224 | switch (btv->c.type) { | ||
| 3225 | case BTTV_PXELVWPLTVPAK: | ||
| 3226 | resetbit = 0x400000; | ||
| 3227 | break; | ||
| 3228 | case BTTV_MODTEC_205: | ||
| 3229 | resetbit = 1<<9; | ||
| 3230 | break; | ||
| 3231 | default: | ||
| 3232 | BUG(); | ||
| 3233 | } | ||
| 3234 | |||
| 3235 | request_module("bt832"); | ||
| 3236 | bttv_call_i2c_clients(btv, BT832_HEXDUMP, NULL); | ||
| 3237 | |||
| 3238 | printk("bttv%d: Reset Bt832 [line=0x%x]\n",btv->c.nr,resetbit); | ||
| 3239 | gpio_write(0); | ||
| 3240 | gpio_inout(resetbit, resetbit); | ||
| 3241 | udelay(5); | ||
| 3242 | gpio_bits(resetbit, resetbit); | ||
| 3243 | udelay(5); | ||
| 3244 | gpio_bits(resetbit, 0); | ||
| 3245 | udelay(5); | ||
| 3246 | |||
| 3247 | // bt832 on pixelview changes from i2c 0x8a to 0x88 after | ||
| 3248 | // being reset as above. So we must follow by this: | ||
| 3249 | bttv_call_i2c_clients(btv, BT832_REATTACH, NULL); | ||
| 3250 | #endif | ||
| 3251 | } | 3190 | } |
| 3252 | 3191 | ||
| 3253 | /* ----------------------------------------------------------------------- */ | 3192 | /* ----------------------------------------------------------------------- */ |
| @@ -3572,11 +3511,6 @@ void tea5757_set_freq(struct bttv *btv, unsigned short freq) | |||
| 3572 | { | 3511 | { |
| 3573 | dprintk("tea5757_set_freq %d\n",freq); | 3512 | dprintk("tea5757_set_freq %d\n",freq); |
| 3574 | tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */ | 3513 | tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */ |
| 3575 | #if 0 | ||
| 3576 | /* breaks Miro PCTV */ | ||
| 3577 | value = tea5757_read(btv); | ||
| 3578 | dprintk("bttv%d: tea5757 readback=0x%x\n",btv->c.nr,value); | ||
| 3579 | #endif | ||
| 3580 | } | 3514 | } |
| 3581 | 3515 | ||
| 3582 | 3516 | ||
| @@ -3656,13 +3590,8 @@ gvbctv5pci_audio(struct bttv *btv, struct video_audio *v, int set) | |||
| 3656 | { | 3590 | { |
| 3657 | unsigned int val, con; | 3591 | unsigned int val, con; |
| 3658 | 3592 | ||
| 3659 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) | ||
| 3660 | if (btv->radio_user) | 3593 | if (btv->radio_user) |
| 3661 | return; | 3594 | return; |
| 3662 | #else | ||
| 3663 | if (btv->radio) | ||
| 3664 | return; | ||
| 3665 | #endif | ||
| 3666 | 3595 | ||
| 3667 | val = gpio_read(); | 3596 | val = gpio_read(); |
| 3668 | if (set) { | 3597 | if (set) { |
| @@ -3851,13 +3780,8 @@ pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set) | |||
| 3851 | { | 3780 | { |
| 3852 | unsigned int val = 0; | 3781 | unsigned int val = 0; |
| 3853 | 3782 | ||
| 3854 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) | ||
| 3855 | if (btv->radio_user) | 3783 | if (btv->radio_user) |
| 3856 | return; | 3784 | return; |
| 3857 | #else | ||
| 3858 | if (btv->radio) | ||
| 3859 | return; | ||
| 3860 | #endif | ||
| 3861 | 3785 | ||
| 3862 | if (set) { | 3786 | if (set) { |
| 3863 | if (v->mode & VIDEO_SOUND_MONO) { | 3787 | if (v->mode & VIDEO_SOUND_MONO) { |
| @@ -3888,13 +3812,8 @@ fv2000s_audio(struct bttv *btv, struct video_audio *v, int set) | |||
| 3888 | { | 3812 | { |
| 3889 | unsigned int val = 0xffff; | 3813 | unsigned int val = 0xffff; |
| 3890 | 3814 | ||
| 3891 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) | ||
| 3892 | if (btv->radio_user) | 3815 | if (btv->radio_user) |
| 3893 | return; | 3816 | return; |
| 3894 | #else | ||
| 3895 | if (btv->radio) | ||
| 3896 | return; | ||
| 3897 | #endif | ||
| 3898 | if (set) { | 3817 | if (set) { |
| 3899 | if (v->mode & VIDEO_SOUND_MONO) { | 3818 | if (v->mode & VIDEO_SOUND_MONO) { |
| 3900 | val = 0x0000; | 3819 | val = 0x0000; |
| @@ -4371,11 +4290,6 @@ void __devinit bttv_check_chipset(void) | |||
| 4371 | latency = 0x0A; | 4290 | latency = 0x0A; |
| 4372 | #endif | 4291 | #endif |
| 4373 | 4292 | ||
| 4374 | #if 0 | ||
| 4375 | /* print which chipset we have */ | ||
| 4376 | while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) | ||
| 4377 | printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev)); | ||
| 4378 | #endif | ||
| 4379 | 4293 | ||
| 4380 | /* print warnings about any quirks found */ | 4294 | /* print warnings about any quirks found */ |
| 4381 | if (triton1) | 4295 | if (triton1) |
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c index 7d62b394c509..51a0f6d68e73 100644 --- a/drivers/media/video/bttv-driver.c +++ b/drivers/media/video/bttv-driver.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | $Id: bttv-driver.c,v 1.40 2005/06/16 21:38:45 nsh Exp $ | 2 | $Id: bttv-driver.c,v 1.42 2005/07/05 17:37:35 nsh Exp $ |
| 3 | 3 | ||
| 4 | bttv - Bt848 frame grabber driver | 4 | bttv - Bt848 frame grabber driver |
| 5 | 5 | ||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
| 36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
| 37 | #include <linux/kdev_t.h> | 37 | #include <linux/kdev_t.h> |
| 38 | #include <linux/dma-mapping.h> | ||
| 38 | 39 | ||
| 39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
| 40 | #include <asm/byteorder.h> | 41 | #include <asm/byteorder.h> |
| @@ -698,12 +699,10 @@ int locked_btres(struct bttv *btv, int bit) | |||
| 698 | static | 699 | static |
| 699 | void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits) | 700 | void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits) |
| 700 | { | 701 | { |
| 701 | #if 1 /* DEBUG */ | ||
| 702 | if ((fh->resources & bits) != bits) { | 702 | if ((fh->resources & bits) != bits) { |
| 703 | /* trying to free ressources not allocated by us ... */ | 703 | /* trying to free ressources not allocated by us ... */ |
| 704 | printk("bttv: BUG! (btres)\n"); | 704 | printk("bttv: BUG! (btres)\n"); |
| 705 | } | 705 | } |
| 706 | #endif | ||
| 707 | down(&btv->reslock); | 706 | down(&btv->reslock); |
| 708 | fh->resources &= ~bits; | 707 | fh->resources &= ~bits; |
| 709 | btv->resources &= ~bits; | 708 | btv->resources &= ~bits; |
| @@ -943,11 +942,6 @@ audio_mux(struct bttv *btv, int mode) | |||
| 943 | i2c_mux = mux = (btv->audio & AUDIO_MUTE) ? AUDIO_OFF : btv->audio; | 942 | i2c_mux = mux = (btv->audio & AUDIO_MUTE) ? AUDIO_OFF : btv->audio; |
| 944 | if (btv->opt_automute && !signal && !btv->radio_user) | 943 | if (btv->opt_automute && !signal && !btv->radio_user) |
| 945 | mux = AUDIO_OFF; | 944 | mux = AUDIO_OFF; |
| 946 | #if 0 | ||
| 947 | printk("bttv%d: amux: mode=%d audio=%d signal=%s mux=%d/%d irq=%s\n", | ||
| 948 | btv->c.nr, mode, btv->audio, signal ? "yes" : "no", | ||
| 949 | mux, i2c_mux, in_interrupt() ? "yes" : "no"); | ||
| 950 | #endif | ||
| 951 | 945 | ||
| 952 | val = bttv_tvcards[btv->c.type].audiomux[mux]; | 946 | val = bttv_tvcards[btv->c.type].audiomux[mux]; |
| 953 | gpio_bits(bttv_tvcards[btv->c.type].gpiomask,val); | 947 | gpio_bits(bttv_tvcards[btv->c.type].gpiomask,val); |
| @@ -994,11 +988,6 @@ set_tvnorm(struct bttv *btv, unsigned int norm) | |||
| 994 | case BTTV_VOODOOTV_FM: | 988 | case BTTV_VOODOOTV_FM: |
| 995 | bttv_tda9880_setnorm(btv,norm); | 989 | bttv_tda9880_setnorm(btv,norm); |
| 996 | break; | 990 | break; |
| 997 | #if 0 | ||
| 998 | case BTTV_OSPREY540: | ||
| 999 | osprey_540_set_norm(btv,norm); | ||
| 1000 | break; | ||
| 1001 | #endif | ||
| 1002 | } | 991 | } |
| 1003 | return 0; | 992 | return 0; |
| 1004 | } | 993 | } |
| @@ -1849,7 +1838,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) | |||
| 1849 | 1838 | ||
| 1850 | if (unlikely(f->tuner != 0)) | 1839 | if (unlikely(f->tuner != 0)) |
| 1851 | return -EINVAL; | 1840 | return -EINVAL; |
| 1852 | if (unlikely(f->type != V4L2_TUNER_ANALOG_TV)) | 1841 | if (unlikely (f->type != V4L2_TUNER_ANALOG_TV)) |
| 1853 | return -EINVAL; | 1842 | return -EINVAL; |
| 1854 | down(&btv->lock); | 1843 | down(&btv->lock); |
| 1855 | btv->freq = f->frequency; | 1844 | btv->freq = f->frequency; |
| @@ -3865,7 +3854,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, | |||
| 3865 | btv->c.nr); | 3854 | btv->c.nr); |
| 3866 | return -EIO; | 3855 | return -EIO; |
| 3867 | } | 3856 | } |
| 3868 | if (pci_set_dma_mask(dev, 0xffffffff)) { | 3857 | if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { |
| 3869 | printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", | 3858 | printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", |
| 3870 | btv->c.nr); | 3859 | btv->c.nr); |
| 3871 | return -EIO; | 3860 | return -EIO; |
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index da448a5f9e9c..234a85563769 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | $Id: bttv-i2c.c,v 1.21 2005/06/10 17:20:24 mchehab Exp $ | 2 | $Id: bttv-i2c.c,v 1.25 2005/07/05 17:37:35 nsh Exp $ |
| 3 | 3 | ||
| 4 | bttv-i2c.c -- all the i2c code is here | 4 | bttv-i2c.c -- all the i2c code is here |
| 5 | 5 | ||
| @@ -295,14 +295,26 @@ static int attach_inform(struct i2c_client *client) | |||
| 295 | { | 295 | { |
| 296 | struct bttv *btv = i2c_get_adapdata(client->adapter); | 296 | struct bttv *btv = i2c_get_adapdata(client->adapter); |
| 297 | 297 | ||
| 298 | if (btv->tuner_type != UNSET) | 298 | if (bttv_debug) |
| 299 | bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); | 299 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", |
| 300 | btv->c.nr,client->driver->name,client->addr, | ||
| 301 | i2c_clientname(client)); | ||
| 302 | if (!client->driver->command) | ||
| 303 | return 0; | ||
| 304 | |||
| 305 | if (btv->tuner_type != UNSET) { | ||
| 306 | struct tuner_setup tun_setup; | ||
| 307 | |||
| 308 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; | ||
| 309 | tun_setup.type = btv->tuner_type; | ||
| 310 | tun_setup.addr = ADDR_UNSET; | ||
| 311 | |||
| 312 | client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup); | ||
| 313 | } | ||
| 314 | |||
| 300 | if (btv->pinnacle_id != UNSET) | 315 | if (btv->pinnacle_id != UNSET) |
| 301 | bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, | 316 | client->driver->command(client,AUDC_CONFIG_PINNACLE, |
| 302 | &btv->pinnacle_id); | 317 | &btv->pinnacle_id); |
| 303 | if (bttv_debug) | ||
| 304 | printk("bttv%d: i2c attach [client=%s]\n", | ||
| 305 | btv->c.nr, i2c_clientname(client)); | ||
| 306 | return 0; | 318 | return 0; |
| 307 | } | 319 | } |
| 308 | 320 | ||
diff --git a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c index bdc5ce6c43b9..9ed21fd190c6 100644 --- a/drivers/media/video/bttv-risc.c +++ b/drivers/media/video/bttv-risc.c | |||
| @@ -334,10 +334,6 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo, | |||
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | vdelay = tvnorm->vdelay; | 336 | vdelay = tvnorm->vdelay; |
| 337 | #if 0 /* FIXME */ | ||
| 338 | if (vdelay < btv->vbi.lines*2) | ||
| 339 | vdelay = btv->vbi.lines*2; | ||
| 340 | #endif | ||
| 341 | 337 | ||
| 342 | xsf = (width*scaledtwidth)/swidth; | 338 | xsf = (width*scaledtwidth)/swidth; |
| 343 | geo->hscale = ((totalwidth*4096UL)/xsf-4096); | 339 | geo->hscale = ((totalwidth*4096UL)/xsf-4096); |
| @@ -776,13 +772,8 @@ bttv_overlay_risc(struct bttv *btv, | |||
| 776 | bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 0, 0); | 772 | bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 0, 0); |
| 777 | break; | 773 | break; |
| 778 | case V4L2_FIELD_INTERLACED: | 774 | case V4L2_FIELD_INTERLACED: |
| 779 | #if 0 | ||
| 780 | bttv_risc_overlay(btv, &buf->top, fmt, ov, 1, 0); | ||
| 781 | bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 0, 1); | ||
| 782 | #else | ||
| 783 | bttv_risc_overlay(btv, &buf->top, fmt, ov, 0, 1); | 775 | bttv_risc_overlay(btv, &buf->top, fmt, ov, 0, 1); |
| 784 | bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 1, 0); | 776 | bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 1, 0); |
| 785 | #endif | ||
| 786 | break; | 777 | break; |
| 787 | default: | 778 | default: |
| 788 | BUG(); | 779 | BUG(); |
