| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Midi synth routines for the Emu8k/Emu10k1 |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * 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 | | - * |
|---|
| 23 | 9 | */ |
|---|
| 24 | 10 | |
|---|
| 25 | 11 | #include <linux/export.h> |
|---|
| .. | .. |
|---|
| 543 | 529 | |
|---|
| 544 | 530 | #if 0 // not used |
|---|
| 545 | 531 | /* table for volume target calculation */ |
|---|
| 546 | | -static unsigned short voltarget[16] = { |
|---|
| 532 | +static const unsigned short voltarget[16] = { |
|---|
| 547 | 533 | 0xEAC0, 0xE0C8, 0xD740, 0xCE20, 0xC560, 0xBD08, 0xB500, 0xAD58, |
|---|
| 548 | 534 | 0xA5F8, 0x9EF0, 0x9830, 0x91C0, 0x8B90, 0x85A8, 0x8000, 0x7A90 |
|---|
| 549 | 535 | }; |
|---|
| .. | .. |
|---|
| 630 | 616 | /* |
|---|
| 631 | 617 | * calculate pitch parameter |
|---|
| 632 | 618 | */ |
|---|
| 633 | | -static unsigned char pan_volumes[256] = { |
|---|
| 619 | +static const unsigned char pan_volumes[256] = { |
|---|
| 634 | 620 | 0x00,0x03,0x06,0x09,0x0c,0x0f,0x12,0x14,0x17,0x1a,0x1d,0x20,0x22,0x25,0x28,0x2a, |
|---|
| 635 | 621 | 0x2d,0x30,0x32,0x35,0x37,0x3a,0x3c,0x3f,0x41,0x44,0x46,0x49,0x4b,0x4d,0x50,0x52, |
|---|
| 636 | 622 | 0x54,0x57,0x59,0x5b,0x5d,0x60,0x62,0x64,0x66,0x68,0x6a,0x6c,0x6f,0x71,0x73,0x75, |
|---|
| .. | .. |
|---|
| 698 | 684 | */ |
|---|
| 699 | 685 | |
|---|
| 700 | 686 | /* tables for volume->attenuation calculation */ |
|---|
| 701 | | -static unsigned char voltab1[128] = { |
|---|
| 687 | +static const unsigned char voltab1[128] = { |
|---|
| 702 | 688 | 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, |
|---|
| 703 | 689 | 0x63, 0x2b, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, |
|---|
| 704 | 690 | 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1b, 0x1b, 0x1a, |
|---|
| .. | .. |
|---|
| 714 | 700 | 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
|---|
| 715 | 701 | }; |
|---|
| 716 | 702 | |
|---|
| 717 | | -static unsigned char voltab2[128] = { |
|---|
| 703 | +static const unsigned char voltab2[128] = { |
|---|
| 718 | 704 | 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x2a, |
|---|
| 719 | 705 | 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x24, 0x23, 0x22, 0x21, |
|---|
| 720 | 706 | 0x21, 0x20, 0x1f, 0x1e, 0x1e, 0x1d, 0x1c, 0x1c, 0x1b, 0x1a, |
|---|
| .. | .. |
|---|
| 730 | 716 | 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 |
|---|
| 731 | 717 | }; |
|---|
| 732 | 718 | |
|---|
| 733 | | -static unsigned char expressiontab[128] = { |
|---|
| 719 | +static const unsigned char expressiontab[128] = { |
|---|
| 734 | 720 | 0x7f, 0x6c, 0x62, 0x5a, 0x54, 0x50, 0x4b, 0x48, 0x45, 0x42, |
|---|
| 735 | 721 | 0x40, 0x3d, 0x3b, 0x39, 0x38, 0x36, 0x34, 0x33, 0x31, 0x30, |
|---|
| 736 | 722 | 0x2f, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, 0x27, 0x26, 0x25, |
|---|