hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/sound/isa/gus/gus_volume.c
....@@ -1,21 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
3
- *
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
- *
194 */
205
216 #include <linux/time.h>
....@@ -77,7 +62,7 @@
7762 unsigned short end,
7863 unsigned int us)
7964 {
80
- static unsigned char vol_rates[19] =
65
+ static const unsigned char vol_rates[19] =
8166 {
8267 23, 24, 26, 28, 29, 31, 32, 34,
8368 36, 37, 39, 40, 42, 44, 45, 47,
....@@ -128,7 +113,7 @@
128113
129114 short snd_gf1_compute_vibrato(short cents, unsigned short fc_register)
130115 {
131
- static short vibrato_table[] =
116
+ static const short vibrato_table[] =
132117 {
133118 0, 0, 32, 592, 61, 1175, 93, 1808,
134119 124, 2433, 152, 3007, 182, 3632, 213, 4290,
....@@ -136,7 +121,8 @@
136121 };
137122
138123 long depth;
139
- short *vi1, *vi2, pcents, v1;
124
+ const short *vi1, *vi2;
125
+ short pcents, v1;
140126
141127 pcents = cents < 0 ? -cents : cents;
142128 for (vi1 = vibrato_table, vi2 = vi1 + 2; pcents > *vi2; vi1 = vi2, vi2 += 2);
....@@ -160,7 +146,7 @@
160146
161147 unsigned short snd_gf1_compute_pitchbend(unsigned short pitchbend, unsigned short sens)
162148 {
163
- static long log_table[] = {1024, 1085, 1149, 1218, 1290, 1367, 1448, 1534, 1625, 1722, 1825, 1933};
149
+ static const long log_table[] = {1024, 1085, 1149, 1218, 1290, 1367, 1448, 1534, 1625, 1722, 1825, 1933};
164150 int wheel, sensitivity;
165151 unsigned int mantissa, f1, f2;
166152 unsigned short semitones, f1_index, f2_index, f1_power, f2_power;