bktr_audio.c (110237) | bktr_audio.c (118819) |
---|---|
1/* $FreeBSD: head/sys/dev/bktr/bktr_audio.c 110237 2003-02-02 17:46:00Z orion $ */ | 1/* $FreeBSD: head/sys/dev/bktr/bktr_audio.c 118819 2003-08-12 09:45:34Z alex $ */ |
2/* 3 * This is part of the Driver for Video Capture Cards (Frame grabbers) 4 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 5 * chipset. 6 * Copyright Roger Hardiman and Amancio Hasty. 7 * 8 * bktr_audio : This deals with controlling the audio on TV cards, 9 * controlling the Audio Multiplexer (audio source selector). --- 31 unchanged lines hidden (view full) --- 41 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 42 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 45 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 46 * POSSIBILITY OF SUCH DAMAGE. 47 */ 48 | 2/* 3 * This is part of the Driver for Video Capture Cards (Frame grabbers) 4 * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 5 * chipset. 6 * Copyright Roger Hardiman and Amancio Hasty. 7 * 8 * bktr_audio : This deals with controlling the audio on TV cards, 9 * controlling the Audio Multiplexer (audio source selector). --- 31 unchanged lines hidden (view full) --- 41 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 42 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 45 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 46 * POSSIBILITY OF SUCH DAMAGE. 47 */ 48 |
49#include "opt_bktr.h" /* Include any kernel config options */ 50 |
|
49#include <sys/param.h> 50#include <sys/systm.h> 51#include <sys/kernel.h> 52#include <sys/vnode.h> 53 54#ifdef __FreeBSD__ 55 56#if (__FreeBSD_version < 500000) --- 410 unchanged lines hidden (view full) --- 467 * For the MSP3430G, we use fast autodetect mode 468 * For the MSP3410/3415 there are two schemes for this 469 * a) Fast autodetection - the chip is put into autodetect mode, and the function 470 * returns immediatly. This works in most cases and is the Default Mode. 471 * b) Slow mode. The function sets the MSP3410/3415 chip, then waits for feedback from 472 * the chip and re-programs it if needed. 473 */ 474void msp_autodetect( bktr_ptr_t bktr ) { | 51#include <sys/param.h> 52#include <sys/systm.h> 53#include <sys/kernel.h> 54#include <sys/vnode.h> 55 56#ifdef __FreeBSD__ 57 58#if (__FreeBSD_version < 500000) --- 410 unchanged lines hidden (view full) --- 469 * For the MSP3430G, we use fast autodetect mode 470 * For the MSP3410/3415 there are two schemes for this 471 * a) Fast autodetection - the chip is put into autodetect mode, and the function 472 * returns immediatly. This works in most cases and is the Default Mode. 473 * b) Slow mode. The function sets the MSP3410/3415 chip, then waits for feedback from 474 * the chip and re-programs it if needed. 475 */ 476void msp_autodetect( bktr_ptr_t bktr ) { |
477 478#ifdef BKTR_NEW_MSP34XX_DRIVER 479 480 /* Just wake up the (maybe) sleeping thread, it'll do everything for us */ 481 msp_wake_thread(bktr); 482 483#else |
|
475 int auto_detect, loops; 476 int stereo; 477 478 /* MSP3430G - countries with mono and DBX stereo */ 479 if (strncmp("3430G", bktr->msp_version_string, 5) == 0){ 480 481 msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0030,0x2003);/* Enable Auto format detection */ 482 msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0020,0x0020);/* Standard Select Reg. = BTSC-Stereo*/ --- 108 unchanged lines hidden (view full) --- 591 } 592 593 } 594 595 596 /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ 597 /* turn your speaker volume down low before trying this */ 598 /* msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0014, 0x7f40); */ | 484 int auto_detect, loops; 485 int stereo; 486 487 /* MSP3430G - countries with mono and DBX stereo */ 488 if (strncmp("3430G", bktr->msp_version_string, 5) == 0){ 489 490 msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0030,0x2003);/* Enable Auto format detection */ 491 msp_dpl_write(bktr, bktr->msp_addr, 0x10, 0x0020,0x0020);/* Standard Select Reg. = BTSC-Stereo*/ --- 108 unchanged lines hidden (view full) --- 600 } 601 602 } 603 604 605 /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ 606 /* turn your speaker volume down low before trying this */ 607 /* msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0014, 0x7f40); */ |
608 609#endif /* BKTR_NEW_MSP34XX_DRIVER */ |
|
599} 600 601/* Read the DPL version string */ 602void dpl_read_id( bktr_ptr_t bktr ){ 603 int rev1=0, rev2=0; 604 rev1 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001e); 605 rev2 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001f); 606 --- 25 unchanged lines hidden --- | 610} 611 612/* Read the DPL version string */ 613void dpl_read_id( bktr_ptr_t bktr ){ 614 int rev1=0, rev2=0; 615 rev1 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001e); 616 rev2 = msp_dpl_read(bktr, bktr->dpl_addr, 0x12, 0x001f); 617 --- 25 unchanged lines hidden --- |