bktr_os.c (115556) | bktr_os.c (118819) |
---|---|
1/* $FreeBSD: head/sys/dev/bktr/bktr_os.c 115556 2003-05-31 20:41:52Z phk $ */ | 1/* $FreeBSD: head/sys/dev/bktr/bktr_os.c 118819 2003-08-12 09:45:34Z alex $ */ |
2 3/* 4 * This is part of the Driver for Video Capture Cards (Frame grabbers) 5 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 6 * chipset. 7 * Copyright Roger Hardiman and Amancio Hasty. 8 * 9 * bktr_os : This has all the Operating System dependant code, --- 92 unchanged lines hidden (view full) --- 102#include <pci/pcireg.h> 103 104#include <sys/sysctl.h> 105int bt848_card = -1; 106int bt848_tuner = -1; 107int bt848_reverse_mute = -1; 108int bt848_format = -1; 109int bt848_slow_msp_audio = -1; | 2 3/* 4 * This is part of the Driver for Video Capture Cards (Frame grabbers) 5 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 6 * chipset. 7 * Copyright Roger Hardiman and Amancio Hasty. 8 * 9 * bktr_os : This has all the Operating System dependant code, --- 92 unchanged lines hidden (view full) --- 102#include <pci/pcireg.h> 103 104#include <sys/sysctl.h> 105int bt848_card = -1; 106int bt848_tuner = -1; 107int bt848_reverse_mute = -1; 108int bt848_format = -1; 109int bt848_slow_msp_audio = -1; |
110#ifdef BKTR_NEW_MSP34XX_DRIVER 111int bt848_stereo_once = 0; /* no continuous stereo monitoring */ 112int bt848_amsound = 0; /* hard-wire AM sound at 6.5 Hz (france), 113 the autoscan seems work well only with FM... */ 114int bt848_dolby = 0; 115#endif |
|
110 111SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt"); 112SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); 113SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); 114SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); 115SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, ""); 116SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, ""); | 116 117SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt"); 118SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); 119SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); 120SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); 121SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, ""); 122SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, ""); |
123#ifdef BKTR_NEW_MSP34XX_DRIVER 124SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, ""); 125SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, ""); 126SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, ""); 127#endif |
|
117 118#endif /* end freebsd section */ 119 120 121 122/****************/ 123/* *** BSDI *** */ 124/****************/ --- 343 unchanged lines hidden (view full) --- 468/* 469 * the detach routine. 470 */ 471static int 472bktr_detach( device_t dev ) 473{ 474 struct bktr_softc *bktr = device_get_softc(dev); 475 | 128 129#endif /* end freebsd section */ 130 131 132 133/****************/ 134/* *** BSDI *** */ 135/****************/ --- 343 unchanged lines hidden (view full) --- 479/* 480 * the detach routine. 481 */ 482static int 483bktr_detach( device_t dev ) 484{ 485 struct bktr_softc *bktr = device_get_softc(dev); 486 |
487#ifdef BKTR_NEW_MSP34XX_DRIVER 488 /* Disable the soundchip and kernel thread */ 489 if (bktr->msp3400c_info != NULL) 490 msp_detach(bktr); 491#endif 492 |
|
476 /* Disable the brooktree device */ 477 OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); 478 OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); 479 480#if defined(BKTR_USE_FREEBSD_SMBUS) 481 if (bt848_i2c_detach(dev)) 482 printf("bktr%d: i2c_attach: can't attach\n", 483 device_get_unit(dev)); --- 122 unchanged lines hidden (view full) --- 606 } 607 608 if (bt848_slow_msp_audio != -1) { 609 if ((bt848_slow_msp_audio >> 8) == unit ) { 610 bktr->slow_msp_audio = (bt848_slow_msp_audio & 0xff); 611 } 612 } 613 | 493 /* Disable the brooktree device */ 494 OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED); 495 OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED); 496 497#if defined(BKTR_USE_FREEBSD_SMBUS) 498 if (bt848_i2c_detach(dev)) 499 printf("bktr%d: i2c_attach: can't attach\n", 500 device_get_unit(dev)); --- 122 unchanged lines hidden (view full) --- 623 } 624 625 if (bt848_slow_msp_audio != -1) { 626 if ((bt848_slow_msp_audio >> 8) == unit ) { 627 bktr->slow_msp_audio = (bt848_slow_msp_audio & 0xff); 628 } 629 } 630 |
631#ifdef BKTR_NEW_MSP34XX_DRIVER 632 if (bt848_stereo_once != 0) { 633 if ((bt848_stereo_once >> 8) == unit ) { 634 bktr->stereo_once = (bt848_stereo_once & 0xff); 635 } 636 } 637 638 if (bt848_amsound != -1) { 639 if ((bt848_amsound >> 8) == unit ) { 640 bktr->amsound = (bt848_amsound & 0xff); 641 } 642 } 643 644 if (bt848_dolby != -1) { 645 if ((bt848_dolby >> 8) == unit ) { 646 bktr->dolby = (bt848_dolby & 0xff); 647 } 648 } 649#endif 650 |
|
614 switch ( FUNCTION( minor(dev) ) ) { 615 case VIDEO_DEV: 616 result = video_open( bktr ); 617 break; 618 case TUNER_DEV: 619 result = tuner_open( bktr ); 620 break; 621 case VBI_DEV: --- 667 unchanged lines hidden --- | 651 switch ( FUNCTION( minor(dev) ) ) { 652 case VIDEO_DEV: 653 result = video_open( bktr ); 654 break; 655 case TUNER_DEV: 656 result = tuner_open( bktr ); 657 break; 658 case VBI_DEV: --- 667 unchanged lines hidden --- |