.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for Digigram VX222 V2/Mic PCI soundcards |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> |
---|
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 | 6 | */ |
---|
20 | 7 | |
---|
21 | 8 | #include <linux/init.h> |
---|
.. | .. |
---|
75 | 62 | static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0); |
---|
76 | 63 | static const DECLARE_TLV_DB_SCALE(db_scale_akm, -7350, 50, 0); |
---|
77 | 64 | |
---|
78 | | -static struct snd_vx_hardware vx222_old_hw = { |
---|
| 65 | +static const struct snd_vx_hardware vx222_old_hw = { |
---|
79 | 66 | |
---|
80 | 67 | .name = "VX222/Old", |
---|
81 | 68 | .type = VX_TYPE_BOARD, |
---|
.. | .. |
---|
87 | 74 | .output_level_db_scale = db_scale_old_vol, |
---|
88 | 75 | }; |
---|
89 | 76 | |
---|
90 | | -static struct snd_vx_hardware vx222_v2_hw = { |
---|
| 77 | +static const struct snd_vx_hardware vx222_v2_hw = { |
---|
91 | 78 | |
---|
92 | 79 | .name = "VX222/v2", |
---|
93 | 80 | .type = VX_TYPE_V2, |
---|
.. | .. |
---|
99 | 86 | .output_level_db_scale = db_scale_akm, |
---|
100 | 87 | }; |
---|
101 | 88 | |
---|
102 | | -static struct snd_vx_hardware vx222_mic_hw = { |
---|
| 89 | +static const struct snd_vx_hardware vx222_mic_hw = { |
---|
103 | 90 | |
---|
104 | 91 | .name = "VX222/Mic", |
---|
105 | 92 | .type = VX_TYPE_MIC, |
---|
.. | .. |
---|
135 | 122 | |
---|
136 | 123 | |
---|
137 | 124 | static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, |
---|
138 | | - struct snd_vx_hardware *hw, |
---|
| 125 | + const struct snd_vx_hardware *hw, |
---|
139 | 126 | struct snd_vx222 **rchip) |
---|
140 | 127 | { |
---|
141 | 128 | struct vx_core *chip; |
---|
142 | 129 | struct snd_vx222 *vx; |
---|
143 | 130 | int i, err; |
---|
144 | | - static struct snd_device_ops ops = { |
---|
| 131 | + static const struct snd_device_ops ops = { |
---|
145 | 132 | .dev_free = snd_vx222_dev_free, |
---|
146 | 133 | }; |
---|
147 | | - struct snd_vx_ops *vx_ops; |
---|
| 134 | + const struct snd_vx_ops *vx_ops; |
---|
148 | 135 | |
---|
149 | 136 | /* enable PCI device */ |
---|
150 | 137 | if ((err = pci_enable_device(pci)) < 0) |
---|
.. | .. |
---|
176 | 163 | return -EBUSY; |
---|
177 | 164 | } |
---|
178 | 165 | chip->irq = pci->irq; |
---|
| 166 | + card->sync_irq = chip->irq; |
---|
179 | 167 | |
---|
180 | 168 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { |
---|
181 | 169 | snd_vx222_free(chip); |
---|
.. | .. |
---|
192 | 180 | { |
---|
193 | 181 | static int dev; |
---|
194 | 182 | struct snd_card *card; |
---|
195 | | - struct snd_vx_hardware *hw; |
---|
| 183 | + const struct snd_vx_hardware *hw; |
---|
196 | 184 | struct snd_vx222 *vx; |
---|
197 | 185 | int err; |
---|
198 | 186 | |
---|