bktr_core.c (47625) | bktr_core.c (47640) |
---|---|
1/* $Id: brooktree848.c,v 1.81 1999/05/25 12:43:40 roger Exp $ */ | 1/* $Id: brooktree848.c,v 1.82 1999/05/30 16:53:32 phk Exp $ */ |
2/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards. 3 The Brooktree BT848 Driver driver is based upon Mark Tinguely and 4 Jim Lowe's driver for the Matrox Meteor PCI card . The 5 Philips SAA 7116 and SAA 7196 are very different chipsets than 6 the BT848. For starters, the BT848 is a one chipset solution and 7 it incorporates a RISC engine to control the DMA transfers -- 8 that is it the actual dma process is control by a program which 9 resides in the hosts memory also the register definitions between --- 653 unchanged lines hidden (view full) --- 663pci_devres_t bktr_res; /* XXX only remembers last one, helps debug */ 664 665static int 666bktr_probe(struct device *parent, struct cfdata *cf, void *aux) 667{ 668 pci_devaddr_t *pa; 669 pci_devres_t res; 670 struct isa_attach_args *ia = aux; | 2/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards. 3 The Brooktree BT848 Driver driver is based upon Mark Tinguely and 4 Jim Lowe's driver for the Matrox Meteor PCI card . The 5 Philips SAA 7116 and SAA 7196 are very different chipsets than 6 the BT848. For starters, the BT848 is a one chipset solution and 7 it incorporates a RISC engine to control the DMA transfers -- 8 that is it the actual dma process is control by a program which 9 resides in the hosts memory also the register definitions between --- 653 unchanged lines hidden (view full) --- 663pci_devres_t bktr_res; /* XXX only remembers last one, helps debug */ 664 665static int 666bktr_probe(struct device *parent, struct cfdata *cf, void *aux) 667{ 668 pci_devaddr_t *pa; 669 pci_devres_t res; 670 struct isa_attach_args *ia = aux; |
671 static int once; |
|
671 | 672 |
673 if (!once++) 674 cdevsw_add(&bktr_cdevsw); 675 |
|
672 if (ia->ia_bustype != BUS_PCI) 673 return (0); 674 675 if ((pa = pci_scan(bktr_pci_match)) == NULL) 676 return (0); 677 678 pci_getres(pa, &bktr_res, 1, ia); 679 if (ia->ia_maddr == 0) { --- 6332 unchanged lines hidden (view full) --- 7012static void msp_autodetect( bktr_ptr_t bktr ) { 7013 msp_write(bktr, 0x12, 0x0000,0x7300); /* Set volume to 0db gain */ 7014 msp_write(bktr, 0x10, 0x0020,0x0001); /* Enable Auto format detection */ 7015 msp_write(bktr, 0x10, 0x0021,0x0001); /* Auto selection of NICAM/MONO mode */ 7016 /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ 7017 /* msp_write(bktr, 0x12, 0x0014, 0x7f40); */ 7018} 7019 | 676 if (ia->ia_bustype != BUS_PCI) 677 return (0); 678 679 if ((pa = pci_scan(bktr_pci_match)) == NULL) 680 return (0); 681 682 pci_getres(pa, &bktr_res, 1, ia); 683 if (ia->ia_maddr == 0) { --- 6332 unchanged lines hidden (view full) --- 7016static void msp_autodetect( bktr_ptr_t bktr ) { 7017 msp_write(bktr, 0x12, 0x0000,0x7300); /* Set volume to 0db gain */ 7018 msp_write(bktr, 0x10, 0x0020,0x0001); /* Enable Auto format detection */ 7019 msp_write(bktr, 0x10, 0x0021,0x0001); /* Auto selection of NICAM/MONO mode */ 7020 /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ 7021 /* msp_write(bktr, 0x12, 0x0014, 0x7f40); */ 7022} 7023 |
7020/****************************************************************************** 7021 * magic: 7022 */ 7023 7024 7025#ifdef __FreeBSD__ 7026static int bktr_devsw_installed; 7027 7028static void 7029bktr_drvinit( void *unused ) 7030{ 7031 dev_t dev; 7032 7033 if ( ! bktr_devsw_installed ) { 7034 dev = makedev(CDEV_MAJOR, 0); 7035 cdevsw_add(&dev,&bktr_cdevsw, NULL); 7036 bktr_devsw_installed = 1; 7037 } 7038} 7039 7040SYSINIT(bktrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bktr_drvinit,NULL) 7041 7042#endif /* __FreeBSD__ */ | |
7043#endif /* !defined(__FreeBSD__) || (NBKTR > 0 && NPCI > 0) */ 7044 7045/* Local Variables: */ 7046/* mode: C */ 7047/* c-indent-level: 8 */ 7048/* c-brace-offset: -8 */ 7049/* c-argdecl-indent: 8 */ 7050/* c-label-offset: -8 */ 7051/* c-continued-statement-offset: 8 */ 7052/* c-tab-always-indent: nil */ 7053/* tab-width: 8 */ 7054/* End: */ | 7024#endif /* !defined(__FreeBSD__) || (NBKTR > 0 && NPCI > 0) */ 7025 7026/* Local Variables: */ 7027/* mode: C */ 7028/* c-indent-level: 8 */ 7029/* c-brace-offset: -8 */ 7030/* c-argdecl-indent: 8 */ 7031/* c-label-offset: -8 */ 7032/* c-continued-statement-offset: 8 */ 7033/* c-tab-always-indent: nil */ 7034/* tab-width: 8 */ 7035/* End: */ |