.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /*************************************************************************** |
---|
2 | 3 | * au88x0_eq.c |
---|
3 | 4 | * Aureal Vortex Hardware EQ control/access. |
---|
.. | .. |
---|
15 | 16 | ****************************************************************************/ |
---|
16 | 17 | |
---|
17 | 18 | /* |
---|
18 | | - * This program is free software; you can redistribute it and/or modify |
---|
19 | | - * it under the terms of the GNU General Public License as published by |
---|
20 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
21 | | - * (at your option) any later version. |
---|
22 | | - * |
---|
23 | | - * This program is distributed in the hope that it will be useful, |
---|
24 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
25 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
26 | | - * GNU Library General Public License for more details. |
---|
27 | | - * |
---|
28 | | - * You should have received a copy of the GNU General Public License |
---|
29 | | - * along with this program; if not, write to the Free Software |
---|
30 | | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
31 | 19 | */ |
---|
32 | 20 | |
---|
33 | 21 | /* |
---|
.. | .. |
---|
63 | 51 | return -a; |
---|
64 | 52 | } |
---|
65 | 53 | |
---|
66 | | -static void vortex_EqHw_SetLeftCoefs(vortex_t * vortex, u16 coefs[]) |
---|
| 54 | +static void vortex_EqHw_SetLeftCoefs(vortex_t *vortex, const u16 coefs[]) |
---|
67 | 55 | { |
---|
68 | 56 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
69 | 57 | int i = 0, n /*esp2c */; |
---|
.. | .. |
---|
85 | 73 | } |
---|
86 | 74 | } |
---|
87 | 75 | |
---|
88 | | -static void vortex_EqHw_SetRightCoefs(vortex_t * vortex, u16 coefs[]) |
---|
| 76 | +static void vortex_EqHw_SetRightCoefs(vortex_t *vortex, const u16 coefs[]) |
---|
89 | 77 | { |
---|
90 | 78 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
91 | 79 | int i = 0, n /*esp2c */; |
---|
.. | .. |
---|
108 | 96 | |
---|
109 | 97 | } |
---|
110 | 98 | |
---|
111 | | -static void vortex_EqHw_SetLeftStates(vortex_t * vortex, u16 a[], u16 b[]) |
---|
| 99 | +static void vortex_EqHw_SetLeftStates(vortex_t *vortex, const u16 a[], const u16 b[]) |
---|
112 | 100 | { |
---|
113 | 101 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
114 | 102 | int i = 0, ebx; |
---|
.. | .. |
---|
125 | 113 | } |
---|
126 | 114 | } |
---|
127 | 115 | |
---|
128 | | -static void vortex_EqHw_SetRightStates(vortex_t * vortex, u16 a[], u16 b[]) |
---|
| 116 | +static void vortex_EqHw_SetRightStates(vortex_t *vortex, const u16 a[], const u16 b[]) |
---|
129 | 117 | { |
---|
130 | 118 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
131 | 119 | int i = 0, ebx; |
---|
.. | .. |
---|
218 | 206 | hwwrite(vortex->mmio, 0x2b20c + (index * 0x30), b); |
---|
219 | 207 | } |
---|
220 | 208 | |
---|
221 | | -static void vortex_EqHw_SetLeftGainsTarget(vortex_t * vortex, u16 a[]) |
---|
| 209 | +static void vortex_EqHw_SetLeftGainsTarget(vortex_t *vortex, const u16 a[]) |
---|
222 | 210 | { |
---|
223 | 211 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
224 | 212 | int ebx; |
---|
.. | .. |
---|
228 | 216 | } |
---|
229 | 217 | } |
---|
230 | 218 | |
---|
231 | | -static void vortex_EqHw_SetRightGainsTarget(vortex_t * vortex, u16 a[]) |
---|
| 219 | +static void vortex_EqHw_SetRightGainsTarget(vortex_t *vortex, const u16 a[]) |
---|
232 | 220 | { |
---|
233 | 221 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
234 | 222 | int ebx; |
---|
.. | .. |
---|
238 | 226 | } |
---|
239 | 227 | } |
---|
240 | 228 | |
---|
241 | | -static void vortex_EqHw_SetLeftGainsCurrent(vortex_t * vortex, u16 a[]) |
---|
| 229 | +static void vortex_EqHw_SetLeftGainsCurrent(vortex_t *vortex, const u16 a[]) |
---|
242 | 230 | { |
---|
243 | 231 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
244 | 232 | int ebx; |
---|
.. | .. |
---|
248 | 236 | } |
---|
249 | 237 | } |
---|
250 | 238 | |
---|
251 | | -static void vortex_EqHw_SetRightGainsCurrent(vortex_t * vortex, u16 a[]) |
---|
| 239 | +static void vortex_EqHw_SetRightGainsCurrent(vortex_t *vortex, const u16 a[]) |
---|
252 | 240 | { |
---|
253 | 241 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
254 | 242 | int ebx; |
---|
.. | .. |
---|
321 | 309 | |
---|
322 | 310 | #endif |
---|
323 | 311 | /* EQ band levels settings */ |
---|
324 | | -static void vortex_EqHw_SetLevels(vortex_t * vortex, u16 peaks[]) |
---|
| 312 | +static void vortex_EqHw_SetLevels(vortex_t *vortex, const u16 peaks[]) |
---|
325 | 313 | { |
---|
326 | 314 | eqhw_t *eqhw = &(vortex->eq.this04); |
---|
327 | 315 | int i; |
---|
.. | .. |
---|
586 | 574 | } |
---|
587 | 575 | |
---|
588 | 576 | static int |
---|
589 | | -vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], s32 count) |
---|
| 577 | +vortex_Eqlzr_SetAllBands(vortex_t *vortex, const u16 gains[], s32 count) |
---|
590 | 578 | { |
---|
591 | 579 | eqlzr_t *eq = &(vortex->eq); |
---|
592 | 580 | int i; |
---|
.. | .. |
---|
864 | 852 | }; |
---|
865 | 853 | |
---|
866 | 854 | /* EQ band gain labels. */ |
---|
867 | | -static char *EqBandLabels[10] = { |
---|
| 855 | +static const char * const EqBandLabels[10] = { |
---|
868 | 856 | "EQ0 31Hz\0", |
---|
869 | 857 | "EQ1 63Hz\0", |
---|
870 | 858 | "EQ2 125Hz\0", |
---|