| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Yamaha OPL3-SA[2,3] soundcards |
|---|
| 3 | 4 | * 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 | | - * |
|---|
| 20 | 5 | */ |
|---|
| 21 | 6 | |
|---|
| 22 | 7 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 472 | 457 | static const DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0); |
|---|
| 473 | 458 | static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0); |
|---|
| 474 | 459 | |
|---|
| 475 | | -static struct snd_kcontrol_new snd_opl3sa2_controls[] = { |
|---|
| 460 | +static const struct snd_kcontrol_new snd_opl3sa2_controls[] = { |
|---|
| 476 | 461 | OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1), |
|---|
| 477 | 462 | OPL3SA2_DOUBLE_TLV("Master Playback Volume", 0, 0x07, 0x08, 0, 0, 15, 1, |
|---|
| 478 | 463 | db_scale_master), |
|---|
| .. | .. |
|---|
| 482 | 467 | OPL3SA2_SINGLE("ZV Port Switch", 0, 0x02, 0, 1, 0), |
|---|
| 483 | 468 | }; |
|---|
| 484 | 469 | |
|---|
| 485 | | -static struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = { |
|---|
| 470 | +static const struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = { |
|---|
| 486 | 471 | OPL3SA2_DOUBLE("3D Control - Wide", 0, 0x14, 0x14, 4, 0, 7, 0), |
|---|
| 487 | 472 | OPL3SA2_DOUBLE("Tone Control - Bass", 0, 0x15, 0x15, 4, 0, 7, 0), |
|---|
| 488 | 473 | OPL3SA2_DOUBLE("Tone Control - Treble", 0, 0x16, 0x16, 4, 0, 7, 0) |
|---|
| .. | .. |
|---|
| 674 | 659 | return -ENODEV; |
|---|
| 675 | 660 | } |
|---|
| 676 | 661 | chip->irq = xirq; |
|---|
| 662 | + card->sync_irq = chip->irq; |
|---|
| 677 | 663 | err = snd_wss_create(card, |
|---|
| 678 | 664 | wss_port[dev] + 4, -1, |
|---|
| 679 | 665 | xirq, xdma1, xdma2, |
|---|