bktr_core.c (118749) | bktr_core.c (118819) |
---|---|
1/* $FreeBSD: head/sys/dev/bktr/bktr_core.c 118749 2003-08-10 23:04:55Z nectar $ */ | 1/* $FreeBSD: head/sys/dev/bktr/bktr_core.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_core : This deals with the Bt848/849/878/879 PCI Frame Grabber, --- 456 unchanged lines hidden (view full) --- 466/* 467 * the common attach code, used by all OS versions. 468 */ 469void 470common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev ) 471{ 472 vm_offset_t buf = 0; 473 int need_to_allocate_memory = 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_core : This deals with the Bt848/849/878/879 PCI Frame Grabber, --- 456 unchanged lines hidden (view full) --- 466/* 467 * the common attach code, used by all OS versions. 468 */ 469void 470common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev ) 471{ 472 vm_offset_t buf = 0; 473 int need_to_allocate_memory = 1; |
474#ifdef BKTR_NEW_MSP34XX_DRIVER 475 int err; 476#endif |
|
474 475/***************************************/ 476/* *** OS Specific memory routines *** */ 477/***************************************/ 478#if defined(__NetBSD__) || defined(__OpenBSD__) 479 /* allocate space for dma program */ 480 bktr->dma_prog = get_bktr_mem(bktr, &bktr->dm_prog, 481 DMA_PROG_ALLOC); --- 125 unchanged lines hidden (view full) --- 607 bktr->bt848_card = -1; 608 bktr->bt848_tuner = -1; 609 bktr->reverse_mute = -1; 610 bktr->slow_msp_audio = 0; 611 bktr->msp_use_mono_source = 0; 612 bktr->msp_source_selected = -1; 613 bktr->audio_mux_present = 1; 614 | 477 478/***************************************/ 479/* *** OS Specific memory routines *** */ 480/***************************************/ 481#if defined(__NetBSD__) || defined(__OpenBSD__) 482 /* allocate space for dma program */ 483 bktr->dma_prog = get_bktr_mem(bktr, &bktr->dm_prog, 484 DMA_PROG_ALLOC); --- 125 unchanged lines hidden (view full) --- 610 bktr->bt848_card = -1; 611 bktr->bt848_tuner = -1; 612 bktr->reverse_mute = -1; 613 bktr->slow_msp_audio = 0; 614 bktr->msp_use_mono_source = 0; 615 bktr->msp_source_selected = -1; 616 bktr->audio_mux_present = 1; 617 |
618#if defined(__FreeBSD__) 619#ifdef BKTR_NEW_MSP34XX_DRIVER 620 /* get hint on short programming of the msp34xx, so we know */ 621 /* if the decision what thread to start should be overwritten */ 622 if ( (err = resource_int_value("bktr", unit, "mspsimple", 623 &(bktr->mspsimple)) ) != 0 ) 624 bktr->mspsimple = -1; /* fall back to default */ 625#endif 626#endif 627 |
|
615 probeCard( bktr, TRUE, unit ); 616 617 /* Initialise any MSP34xx or TDA98xx audio chips */ 618 init_audio_devices( bktr ); 619 | 628 probeCard( bktr, TRUE, unit ); 629 630 /* Initialise any MSP34xx or TDA98xx audio chips */ 631 init_audio_devices( bktr ); 632 |
633#ifdef BKTR_NEW_MSP34XX_DRIVER 634 /* setup the kenrel thread */ 635 err = msp_attach( bktr ); 636 if ( err != 0 ) /* error doing kernel thread stuff, disable msp3400c */ 637 bktr->card.msp3400c = 0; 638#endif 639 640 |
|
620} 621 622 623/* Copy the vbi lines from 'vbidata' into the circular buffer, 'vbibuffer'. 624 * The circular buffer holds 'n' fixed size data blocks. 625 * vbisize is the number of bytes in the circular buffer 626 * vbiread is the point we reading data out of the circular buffer 627 * vbiinsert is the point we insert data into the circular buffer --- 3634 unchanged lines hidden --- | 641} 642 643 644/* Copy the vbi lines from 'vbidata' into the circular buffer, 'vbibuffer'. 645 * The circular buffer holds 'n' fixed size data blocks. 646 * vbisize is the number of bytes in the circular buffer 647 * vbiread is the point we reading data out of the circular buffer 648 * vbiinsert is the point we insert data into the circular buffer --- 3634 unchanged lines hidden --- |