forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/vx222/vx222.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Digigram VX222 V2/Mic PCI soundcards
34 *
45 * 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
196 */
207
218 #include <linux/init.h>
....@@ -75,7 +62,7 @@
7562 static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
7663 static const DECLARE_TLV_DB_SCALE(db_scale_akm, -7350, 50, 0);
7764
78
-static struct snd_vx_hardware vx222_old_hw = {
65
+static const struct snd_vx_hardware vx222_old_hw = {
7966
8067 .name = "VX222/Old",
8168 .type = VX_TYPE_BOARD,
....@@ -87,7 +74,7 @@
8774 .output_level_db_scale = db_scale_old_vol,
8875 };
8976
90
-static struct snd_vx_hardware vx222_v2_hw = {
77
+static const struct snd_vx_hardware vx222_v2_hw = {
9178
9279 .name = "VX222/v2",
9380 .type = VX_TYPE_V2,
....@@ -99,7 +86,7 @@
9986 .output_level_db_scale = db_scale_akm,
10087 };
10188
102
-static struct snd_vx_hardware vx222_mic_hw = {
89
+static const struct snd_vx_hardware vx222_mic_hw = {
10390
10491 .name = "VX222/Mic",
10592 .type = VX_TYPE_MIC,
....@@ -135,16 +122,16 @@
135122
136123
137124 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,
139126 struct snd_vx222 **rchip)
140127 {
141128 struct vx_core *chip;
142129 struct snd_vx222 *vx;
143130 int i, err;
144
- static struct snd_device_ops ops = {
131
+ static const struct snd_device_ops ops = {
145132 .dev_free = snd_vx222_dev_free,
146133 };
147
- struct snd_vx_ops *vx_ops;
134
+ const struct snd_vx_ops *vx_ops;
148135
149136 /* enable PCI device */
150137 if ((err = pci_enable_device(pci)) < 0)
....@@ -176,6 +163,7 @@
176163 return -EBUSY;
177164 }
178165 chip->irq = pci->irq;
166
+ card->sync_irq = chip->irq;
179167
180168 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
181169 snd_vx222_free(chip);
....@@ -192,7 +180,7 @@
192180 {
193181 static int dev;
194182 struct snd_card *card;
195
- struct snd_vx_hardware *hw;
183
+ const struct snd_vx_hardware *hw;
196184 struct snd_vx222 *vx;
197185 int err;
198186