forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/synth/emux/emux_synth.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Midi synth routines for the Emu8k/Emu10k1
34 *
....@@ -5,21 +6,6 @@
56 * Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
67 *
78 * Contains code based on awe_wave.c by Takashi Iwai
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
- *
239 */
2410
2511 #include <linux/export.h>
....@@ -543,7 +529,7 @@
543529
544530 #if 0 // not used
545531 /* table for volume target calculation */
546
-static unsigned short voltarget[16] = {
532
+static const unsigned short voltarget[16] = {
547533 0xEAC0, 0xE0C8, 0xD740, 0xCE20, 0xC560, 0xBD08, 0xB500, 0xAD58,
548534 0xA5F8, 0x9EF0, 0x9830, 0x91C0, 0x8B90, 0x85A8, 0x8000, 0x7A90
549535 };
....@@ -630,7 +616,7 @@
630616 /*
631617 * calculate pitch parameter
632618 */
633
-static unsigned char pan_volumes[256] = {
619
+static const unsigned char pan_volumes[256] = {
634620 0x00,0x03,0x06,0x09,0x0c,0x0f,0x12,0x14,0x17,0x1a,0x1d,0x20,0x22,0x25,0x28,0x2a,
635621 0x2d,0x30,0x32,0x35,0x37,0x3a,0x3c,0x3f,0x41,0x44,0x46,0x49,0x4b,0x4d,0x50,0x52,
636622 0x54,0x57,0x59,0x5b,0x5d,0x60,0x62,0x64,0x66,0x68,0x6a,0x6c,0x6f,0x71,0x73,0x75,
....@@ -698,7 +684,7 @@
698684 */
699685
700686 /* tables for volume->attenuation calculation */
701
-static unsigned char voltab1[128] = {
687
+static const unsigned char voltab1[128] = {
702688 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63,
703689 0x63, 0x2b, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22,
704690 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a,
....@@ -714,7 +700,7 @@
714700 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
715701 };
716702
717
-static unsigned char voltab2[128] = {
703
+static const unsigned char voltab2[128] = {
718704 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x2a,
719705 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x24, 0x23, 0x22, 0x21,
720706 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1c, 0x1b, 0x1a,
....@@ -730,7 +716,7 @@
730716 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
731717 };
732718
733
-static unsigned char expressiontab[128] = {
719
+static const unsigned char expressiontab[128] = {
734720 0x7f, 0x6c, 0x62, 0x5a, 0x54, 0x50, 0x4b, 0x48, 0x45, 0x42,
735721 0x40, 0x3d, 0x3b, 0x39, 0x38, 0x36, 0x34, 0x33, 0x31, 0x30,
736722 0x2f, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, 0x27, 0x26, 0x25,