xref: /openbmc/linux/sound/pci/au88x0/au88x0_xtalk.h (revision 60772e48)
1 /***************************************************************************
2  *            au88x0_cxtalk.h
3  *
4  *  Wed Nov 19 19:07:17 2003
5  *  Copyright  2003  mjander
6  *  mjander@users.sourceforge.org
7  ****************************************************************************/
8 
9 /*
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU Library General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23  */
24 
25 /* The crosstalk canceler supports 5 stereo input channels. The result is
26    available at one single output route pair (stereo). */
27 
28 #ifndef _AU88X0_CXTALK_H
29 #define _AU88X0_CXTALK_H
30 
31 #include "au88x0.h"
32 
33 #define XTDLINE_SZ 32
34 #define XTGAINS_SZ 10
35 #define XTINST_SZ 4
36 
37 #define XT_HEADPHONE	1
38 #define XT_SPEAKER0		2
39 #define XT_SPEAKER1		3
40 #define XT_DIAMOND		4
41 
42 typedef u32 xtalk_dline_t[XTDLINE_SZ];
43 typedef u16 xtalk_gains_t[XTGAINS_SZ];
44 typedef u16 xtalk_instate_t[XTINST_SZ];
45 typedef u16 xtalk_coefs_t[5][5];
46 typedef u16 xtalk_state_t[5][4];
47 
48 static void vortex_XtalkHw_SetGains(vortex_t * vortex,
49 				    xtalk_gains_t const gains);
50 static void vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex);
51 static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, u32 sr);
52 static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex);
53 static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex);
54 static void vortex_XtalkHw_ProgramXtalkWide(vortex_t * vortex);
55 static void vortex_XtalkHw_ProgramXtalkNarrow(vortex_t * vortex);
56 static void vortex_XtalkHw_ProgramDiamondXtalk(vortex_t * vortex);
57 static void vortex_XtalkHw_Enable(vortex_t * vortex);
58 static void vortex_XtalkHw_Disable(vortex_t * vortex);
59 static void vortex_XtalkHw_init(vortex_t * vortex);
60 
61 #endif				/* _AU88X0_CXTALK_H */
62