hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/isa/opl3sa2.c
....@@ -1,22 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Yamaha OPL3-SA[2,3] soundcards
34 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
4
- *
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
- *
205 */
216
227 #include <linux/init.h>
....@@ -472,7 +457,7 @@
472457 static const DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0);
473458 static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
474459
475
-static struct snd_kcontrol_new snd_opl3sa2_controls[] = {
460
+static const struct snd_kcontrol_new snd_opl3sa2_controls[] = {
476461 OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1),
477462 OPL3SA2_DOUBLE_TLV("Master Playback Volume", 0, 0x07, 0x08, 0, 0, 15, 1,
478463 db_scale_master),
....@@ -482,7 +467,7 @@
482467 OPL3SA2_SINGLE("ZV Port Switch", 0, 0x02, 0, 1, 0),
483468 };
484469
485
-static struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = {
470
+static const struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = {
486471 OPL3SA2_DOUBLE("3D Control - Wide", 0, 0x14, 0x14, 4, 0, 7, 0),
487472 OPL3SA2_DOUBLE("Tone Control - Bass", 0, 0x15, 0x15, 4, 0, 7, 0),
488473 OPL3SA2_DOUBLE("Tone Control - Treble", 0, 0x16, 0x16, 4, 0, 7, 0)
....@@ -674,6 +659,7 @@
674659 return -ENODEV;
675660 }
676661 chip->irq = xirq;
662
+ card->sync_irq = chip->irq;
677663 err = snd_wss_create(card,
678664 wss_port[dev] + 4, -1,
679665 xirq, xdma1, xdma2,