1*b3eb2770Smickey /* $OpenBSD: bktr_audio.h,v 1.2 2004/03/19 09:14:15 mickey Exp $ */ 2c6a4c0dbSfgsch /* $FreeBSD: src/sys/dev/bktr/bktr_audio.h,v 1.2 1999/10/28 13:58:14 roger Exp $ */ 3c6a4c0dbSfgsch 4c6a4c0dbSfgsch /* 5c6a4c0dbSfgsch * This is part of the Driver for Video Capture Cards (Frame grabbers) 6c6a4c0dbSfgsch * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 7c6a4c0dbSfgsch * chipset. 8c6a4c0dbSfgsch * Copyright Roger Hardiman and Amancio Hasty. 9c6a4c0dbSfgsch * 10c6a4c0dbSfgsch * bktr_audio : This deals with controlling the audio on TV cards, 11c6a4c0dbSfgsch * controlling the Audio Multiplexer (audio source selector). 12c6a4c0dbSfgsch * controlling any MSP34xx stereo audio decoders. 13*b3eb2770Smickey * controlling any DPL35xx dolby surround sound audio decoders. 14c6a4c0dbSfgsch * initialising TDA98xx audio devices. 15c6a4c0dbSfgsch * 16c6a4c0dbSfgsch */ 17c6a4c0dbSfgsch 18c6a4c0dbSfgsch /* 19c6a4c0dbSfgsch * 1. Redistributions of source code must retain the 20c6a4c0dbSfgsch * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman 21c6a4c0dbSfgsch * All rights reserved. 22c6a4c0dbSfgsch * 23c6a4c0dbSfgsch * Redistribution and use in source and binary forms, with or without 24c6a4c0dbSfgsch * modification, are permitted provided that the following conditions 25c6a4c0dbSfgsch * are met: 26c6a4c0dbSfgsch * 1. Redistributions of source code must retain the above copyright 27c6a4c0dbSfgsch * notice, this list of conditions and the following disclaimer. 28c6a4c0dbSfgsch * 2. Redistributions in binary form must reproduce the above copyright 29c6a4c0dbSfgsch * notice, this list of conditions and the following disclaimer in the 30c6a4c0dbSfgsch * documentation and/or other materials provided with the distribution. 31c6a4c0dbSfgsch * 3. All advertising materials mentioning features or use of this software 32c6a4c0dbSfgsch * must display the following acknowledgement: 33c6a4c0dbSfgsch * This product includes software developed by Amancio Hasty and 34c6a4c0dbSfgsch * Roger Hardiman 35c6a4c0dbSfgsch * 4. The name of the author may not be used to endorse or promote products 36c6a4c0dbSfgsch * derived from this software without specific prior written permission. 37c6a4c0dbSfgsch * 38c6a4c0dbSfgsch * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 39c6a4c0dbSfgsch * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 40c6a4c0dbSfgsch * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 41c6a4c0dbSfgsch * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 42c6a4c0dbSfgsch * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 43c6a4c0dbSfgsch * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 44c6a4c0dbSfgsch * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 45c6a4c0dbSfgsch * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 46c6a4c0dbSfgsch * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 47c6a4c0dbSfgsch * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 48c6a4c0dbSfgsch * POSSIBILITY OF SUCH DAMAGE. 49c6a4c0dbSfgsch */ 50c6a4c0dbSfgsch 51c6a4c0dbSfgsch /* 52c6a4c0dbSfgsch * Select Audio source, and allow muting 53c6a4c0dbSfgsch */ 54c6a4c0dbSfgsch int set_audio( bktr_ptr_t bktr, int mode ); 55c6a4c0dbSfgsch void temp_mute( bktr_ptr_t bktr, int flag ); 56c6a4c0dbSfgsch 57c6a4c0dbSfgsch 58c6a4c0dbSfgsch /* 59c6a4c0dbSfgsch * Initialise any MSP or TDA devices 60c6a4c0dbSfgsch */ 61c6a4c0dbSfgsch void init_audio_devices( bktr_ptr_t bktr ); 62c6a4c0dbSfgsch 63c6a4c0dbSfgsch 64c6a4c0dbSfgsch /* 65c6a4c0dbSfgsch * MSP34xx Audio Chip functions. 66c6a4c0dbSfgsch */ 67c6a4c0dbSfgsch void msp_autodetect( bktr_ptr_t bktr ); 68c6a4c0dbSfgsch void msp_read_id( bktr_ptr_t bktr ); 69c6a4c0dbSfgsch 70c6a4c0dbSfgsch 71c6a4c0dbSfgsch /* 72c6a4c0dbSfgsch * DPL35xx Audio Chip functions. 73c6a4c0dbSfgsch */ 74c6a4c0dbSfgsch void dpl_autodetect( bktr_ptr_t bktr ); 75c6a4c0dbSfgsch void dpl_read_id( bktr_ptr_t bktr ); 76c6a4c0dbSfgsch 77c6a4c0dbSfgsch 78c6a4c0dbSfgsch /* 79c6a4c0dbSfgsch * TDA98xx Audio Chip functions. 80c6a4c0dbSfgsch */ 81c6a4c0dbSfgsch void init_BTSC( bktr_ptr_t bktr ); 82c6a4c0dbSfgsch int set_BTSC( bktr_ptr_t bktr, int control ); 83c6a4c0dbSfgsch 84c6a4c0dbSfgsch 85c6a4c0dbSfgsch 86