forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/au88x0/au88x0_eq.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /***************************************************************************
23 * au88x0_eq.c
34 * Aureal Vortex Hardware EQ control/access.
....@@ -15,19 +16,6 @@
1516 ****************************************************************************/
1617
1718 /*
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.
3119 */
3220
3321 /*
....@@ -63,7 +51,7 @@
6351 return -a;
6452 }
6553
66
-static void vortex_EqHw_SetLeftCoefs(vortex_t * vortex, u16 coefs[])
54
+static void vortex_EqHw_SetLeftCoefs(vortex_t *vortex, const u16 coefs[])
6755 {
6856 eqhw_t *eqhw = &(vortex->eq.this04);
6957 int i = 0, n /*esp2c */;
....@@ -85,7 +73,7 @@
8573 }
8674 }
8775
88
-static void vortex_EqHw_SetRightCoefs(vortex_t * vortex, u16 coefs[])
76
+static void vortex_EqHw_SetRightCoefs(vortex_t *vortex, const u16 coefs[])
8977 {
9078 eqhw_t *eqhw = &(vortex->eq.this04);
9179 int i = 0, n /*esp2c */;
....@@ -108,7 +96,7 @@
10896
10997 }
11098
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[])
112100 {
113101 eqhw_t *eqhw = &(vortex->eq.this04);
114102 int i = 0, ebx;
....@@ -125,7 +113,7 @@
125113 }
126114 }
127115
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[])
129117 {
130118 eqhw_t *eqhw = &(vortex->eq.this04);
131119 int i = 0, ebx;
....@@ -218,7 +206,7 @@
218206 hwwrite(vortex->mmio, 0x2b20c + (index * 0x30), b);
219207 }
220208
221
-static void vortex_EqHw_SetLeftGainsTarget(vortex_t * vortex, u16 a[])
209
+static void vortex_EqHw_SetLeftGainsTarget(vortex_t *vortex, const u16 a[])
222210 {
223211 eqhw_t *eqhw = &(vortex->eq.this04);
224212 int ebx;
....@@ -228,7 +216,7 @@
228216 }
229217 }
230218
231
-static void vortex_EqHw_SetRightGainsTarget(vortex_t * vortex, u16 a[])
219
+static void vortex_EqHw_SetRightGainsTarget(vortex_t *vortex, const u16 a[])
232220 {
233221 eqhw_t *eqhw = &(vortex->eq.this04);
234222 int ebx;
....@@ -238,7 +226,7 @@
238226 }
239227 }
240228
241
-static void vortex_EqHw_SetLeftGainsCurrent(vortex_t * vortex, u16 a[])
229
+static void vortex_EqHw_SetLeftGainsCurrent(vortex_t *vortex, const u16 a[])
242230 {
243231 eqhw_t *eqhw = &(vortex->eq.this04);
244232 int ebx;
....@@ -248,7 +236,7 @@
248236 }
249237 }
250238
251
-static void vortex_EqHw_SetRightGainsCurrent(vortex_t * vortex, u16 a[])
239
+static void vortex_EqHw_SetRightGainsCurrent(vortex_t *vortex, const u16 a[])
252240 {
253241 eqhw_t *eqhw = &(vortex->eq.this04);
254242 int ebx;
....@@ -321,7 +309,7 @@
321309
322310 #endif
323311 /* 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[])
325313 {
326314 eqhw_t *eqhw = &(vortex->eq.this04);
327315 int i;
....@@ -586,7 +574,7 @@
586574 }
587575
588576 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)
590578 {
591579 eqlzr_t *eq = &(vortex->eq);
592580 int i;
....@@ -864,7 +852,7 @@
864852 };
865853
866854 /* EQ band gain labels. */
867
-static char *EqBandLabels[10] = {
855
+static const char * const EqBandLabels[10] = {
868856 "EQ0 31Hz\0",
869857 "EQ1 63Hz\0",
870858 "EQ2 125Hz\0",