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