forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/au88x0/au88x0_xtalk.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /***************************************************************************
23 * au88x0_cxtalk.c
34 *
....@@ -7,19 +8,6 @@
78 ****************************************************************************/
89
910 /*
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.
2311 */
2412
2513 #include "au88x0_xtalk.h"
....@@ -29,35 +17,35 @@
2917 static short const sXtalkWideKLeftEq = 0x269C;
3018 static short const sXtalkWideKRightEq = 0x269C;
3119 static short const sXtalkWideKLeftXt = 0xF25E;
32
-static short const sXtalkWideKRightXt = 0xF25E;
20
+static __maybe_unused short const sXtalkWideKRightXt = 0xF25E;
3321 static short const sXtalkWideShiftLeftEq = 1;
3422 static short const sXtalkWideShiftRightEq = 1;
3523 static short const sXtalkWideShiftLeftXt = 0;
36
-static short const sXtalkWideShiftRightXt = 0;
24
+static __maybe_unused short const sXtalkWideShiftRightXt = 0;
3725 static unsigned short const wXtalkWideLeftDelay = 0xd;
3826 static unsigned short const wXtalkWideRightDelay = 0xd;
3927 static short const sXtalkNarrowKLeftEq = 0x468D;
4028 static short const sXtalkNarrowKRightEq = 0x468D;
4129 static short const sXtalkNarrowKLeftXt = 0xF82E;
42
-static short const sXtalkNarrowKRightXt = 0xF82E;
30
+static __maybe_unused short const sXtalkNarrowKRightXt = 0xF82E;
4331 static short const sXtalkNarrowShiftLeftEq = 0x3;
4432 static short const sXtalkNarrowShiftRightEq = 0x3;
4533 static short const sXtalkNarrowShiftLeftXt = 0;
46
-static short const sXtalkNarrowShiftRightXt = 0;
34
+static __maybe_unused short const sXtalkNarrowShiftRightXt = 0;
4735 static unsigned short const wXtalkNarrowLeftDelay = 0x7;
4836 static unsigned short const wXtalkNarrowRightDelay = 0x7;
4937
50
-static xtalk_gains_t const asXtalkGainsDefault = {
38
+static __maybe_unused xtalk_gains_t const asXtalkGainsDefault = {
5139 0x4000, 0x4000, 0x4000, 0x4000, 0x4000,
5240 0x4000, 0x4000, 0x4000, 0x4000, 0x4000
5341 };
5442
55
-static xtalk_gains_t const asXtalkGainsTest = {
43
+static __maybe_unused xtalk_gains_t const asXtalkGainsTest = {
5644 0x7fff, 0x8000, 0x0000, 0x0000, 0x0001,
5745 0xffff, 0x4000, 0xc000, 0x0002, 0xfffe
5846 };
5947
60
-static xtalk_gains_t const asXtalkGains1Chan = {
48
+static __maybe_unused xtalk_gains_t const asXtalkGains1Chan = {
6149 0x7FFF, 0, 0, 0, 0,
6250 0x7FFF, 0, 0, 0, 0,
6351 };
....@@ -76,7 +64,7 @@
7664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
7765 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7866 };
79
-static xtalk_dline_t const alXtalkDlineTest = {
67
+static __maybe_unused xtalk_dline_t const alXtalkDlineTest = {
8068 0x0000fc18, 0xfff03e8, 0x000186a0, 0xfffe7960, 1, 0xffffffff, 0, 0,
8169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8270 0, 0, 0, 0, 0, 0, 0, 0
....@@ -86,7 +74,7 @@
8674 0, 0, 0, 0
8775 };
8876
89
-static xtalk_instate_t const asXtalkInStateTest = {
77
+static __maybe_unused xtalk_instate_t const asXtalkInStateTest = {
9078 0x0080, 0xff80, 0x0001, 0xffff
9179 };
9280
....@@ -101,11 +89,11 @@
10189 static short const sDiamondKLeftEq = 0x401d;
10290 static short const sDiamondKRightEq = 0x401d;
10391 static short const sDiamondKLeftXt = 0xF90E;
104
-static short const sDiamondKRightXt = 0xF90E;
92
+static __maybe_unused short const sDiamondKRightXt = 0xF90E;
10593 static short const sDiamondShiftLeftEq = 1;
10694 static short const sDiamondShiftRightEq = 1;
10795 static short const sDiamondShiftLeftXt = 0;
108
-static short const sDiamondShiftRightXt = 0;
96
+static __maybe_unused short const sDiamondShiftRightXt = 0;
10997 static unsigned short const wDiamondLeftDelay = 0xb;
11098 static unsigned short const wDiamondRightDelay = 0xb;
11199
....@@ -130,7 +118,7 @@
130118 {0x77dc, 0xc79e, 0xffb8, 0x000a, 0},
131119 {0, 0, 0, 0, 0}
132120 };
133
-static xtalk_coefs_t const asXtalkWideCoefsRightXt = {
121
+static __maybe_unused xtalk_coefs_t const asXtalkWideCoefsRightXt = {
134122 {0x55c6, 0xc97b, 0x005b, 0x0047, 0},
135123 {0x6a60, 0xca20, 0xffc6, 0x0040, 0},
136124 {0x6411, 0xd711, 0xfca1, 0x0190, 0},
....@@ -161,7 +149,7 @@
161149 {0, 0, 0, 0, 0}
162150 };
163151
164
-static xtalk_coefs_t const asXtalkNarrowCoefsRightXt = {
152
+static __maybe_unused xtalk_coefs_t const asXtalkNarrowCoefsRightXt = {
165153 {0x3CB2, 0xDF49, 0xF6EA, 0x095B, 0},
166154 {0x6777, 0xC915, 0xFEAF, 0x00B1, 0},
167155 {0x7762, 0xC7D9, 0x025B, 0xFDA6, 0},
....@@ -184,7 +172,7 @@
184172 {0, 0, 0x0FA0, 0, 0},
185173 {0, 0, 0x1180, 0, 0},
186174 };
187
-static xtalk_coefs_t const asXtalkCoefsNegPipe = {
175
+static __maybe_unused xtalk_coefs_t const asXtalkCoefsNegPipe = {
188176 {0, 0, 0xF380, 0, 0},
189177 {0, 0, 0xF380, 0, 0},
190178 {0, 0, 0xF380, 0, 0},
....@@ -192,7 +180,7 @@
192180 {0, 0, 0xF200, 0, 0}
193181 };
194182
195
-static xtalk_coefs_t const asXtalkCoefsNumTest = {
183
+static __maybe_unused xtalk_coefs_t const asXtalkCoefsNumTest = {
196184 {0, 0, 0xF380, 0x8000, 0x6D60},
197185 {0, 0, 0, 0, 0},
198186 {0, 0, 0, 0, 0},
....@@ -200,7 +188,7 @@
200188 {0, 0, 0, 0, 0}
201189 };
202190
203
-static xtalk_coefs_t const asXtalkCoefsDenTest = {
191
+static __maybe_unused xtalk_coefs_t const asXtalkCoefsDenTest = {
204192 {0xC000, 0x2000, 0x4000, 0, 0},
205193 {0, 0, 0, 0, 0},
206194 {0, 0, 0, 0, 0},
....@@ -208,7 +196,7 @@
208196 {0, 0, 0, 0, 0}
209197 };
210198
211
-static xtalk_state_t const asXtalkOutStateTest = {
199
+static __maybe_unused xtalk_state_t const asXtalkOutStateTest = {
212200 {0x7FFF, 0x0004, 0xFFFC, 0},
213201 {0xFE00, 0x0008, 0xFFF8, 0x4000},
214202 {0x0200, 0x0010, 0xFFF0, 0xC000},
....@@ -240,7 +228,7 @@
240228 {0, 0, 0, 0, 0}
241229 };
242230
243
-static xtalk_coefs_t const asDiamondCoefsRightXt = {
231
+static __maybe_unused xtalk_coefs_t const asDiamondCoefsRightXt = {
244232 {0x3B50, 0xFE08, 0xF959, 0x0060, 0},
245233 {0x9FCB, 0xD8F1, 0x00A2, 0x003A, 0},
246234 {0, 0, 0, 0, 0},