| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) by Uros Bizjak <uros@kss-loka.si> |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Midi synth routines for OPL2/OPL3/OPL4 FM |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License |
|---|
| 17 | | - * along with this program; if not, write to the Free Software |
|---|
| 18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 19 | | - * |
|---|
| 20 | 6 | */ |
|---|
| 21 | 7 | |
|---|
| 22 | 8 | #undef DEBUG_ALLOC |
|---|
| .. | .. |
|---|
| 37 | 23 | * it saves a lot of log() calculations. (Rob Hooft <hooft@chem.ruu.nl>) |
|---|
| 38 | 24 | */ |
|---|
| 39 | 25 | |
|---|
| 40 | | -static char opl3_volume_table[128] = |
|---|
| 26 | +static const char opl3_volume_table[128] = |
|---|
| 41 | 27 | { |
|---|
| 42 | 28 | -63, -48, -40, -35, -32, -29, -27, -26, |
|---|
| 43 | 29 | -24, -23, -21, -20, -19, -18, -18, -17, |
|---|
| .. | .. |
|---|
| 83 | 69 | /* |
|---|
| 84 | 70 | * Converts the note frequency to block and fnum values for the FM chip |
|---|
| 85 | 71 | */ |
|---|
| 86 | | -static short opl3_note_table[16] = |
|---|
| 72 | +static const short opl3_note_table[16] = |
|---|
| 87 | 73 | { |
|---|
| 88 | 74 | 305, 323, /* for pitch bending, -2 semitones */ |
|---|
| 89 | 75 | 343, 363, 385, 408, 432, 458, 485, 514, 544, 577, 611, 647, |
|---|
| .. | .. |
|---|
| 280 | 266 | /* ------------------------------ */ |
|---|
| 281 | 267 | |
|---|
| 282 | 268 | |
|---|
| 283 | | -static int snd_opl3_oss_map[MAX_OPL3_VOICES] = { |
|---|
| 269 | +static const int snd_opl3_oss_map[MAX_OPL3_VOICES] = { |
|---|
| 284 | 270 | 0, 1, 2, 9, 10, 11, 6, 7, 8, 15, 16, 17, 3, 4 ,5, 12, 13, 14 |
|---|
| 285 | 271 | }; |
|---|
| 286 | 272 | |
|---|
| .. | .. |
|---|
| 368 | 354 | instr_4op = 1; |
|---|
| 369 | 355 | break; |
|---|
| 370 | 356 | } |
|---|
| 371 | | - /* fall through */ |
|---|
| 357 | + fallthrough; |
|---|
| 372 | 358 | default: |
|---|
| 373 | 359 | spin_unlock_irqrestore(&opl3->voice_lock, flags); |
|---|
| 374 | 360 | return; |
|---|
| .. | .. |
|---|
| 457 | 443 | switch (connection) { |
|---|
| 458 | 444 | case 0x03: |
|---|
| 459 | 445 | snd_opl3_calc_volume(&vol_op[2], vel, chan); |
|---|
| 460 | | - /* fallthru */ |
|---|
| 446 | + fallthrough; |
|---|
| 461 | 447 | case 0x02: |
|---|
| 462 | 448 | snd_opl3_calc_volume(&vol_op[0], vel, chan); |
|---|
| 463 | 449 | break; |
|---|