hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/pci/rme96.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ALSA driver for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST audio
34 * interfaces
....@@ -6,21 +7,6 @@
67 *
78 * Thanks to Henk Hesselink <henk@anda.nl> for the analog volume control
89 * code.
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
- *
2410 */
2511
2612 #include <linux/delay.h>
....@@ -1522,7 +1508,6 @@
15221508 static const struct snd_pcm_ops snd_rme96_playback_spdif_ops = {
15231509 .open = snd_rme96_playback_spdif_open,
15241510 .close = snd_rme96_playback_close,
1525
- .ioctl = snd_pcm_lib_ioctl,
15261511 .hw_params = snd_rme96_playback_hw_params,
15271512 .prepare = snd_rme96_playback_prepare,
15281513 .trigger = snd_rme96_playback_trigger,
....@@ -1536,7 +1521,6 @@
15361521 static const struct snd_pcm_ops snd_rme96_capture_spdif_ops = {
15371522 .open = snd_rme96_capture_spdif_open,
15381523 .close = snd_rme96_capture_close,
1539
- .ioctl = snd_pcm_lib_ioctl,
15401524 .hw_params = snd_rme96_capture_hw_params,
15411525 .prepare = snd_rme96_capture_prepare,
15421526 .trigger = snd_rme96_capture_trigger,
....@@ -1549,7 +1533,6 @@
15491533 static const struct snd_pcm_ops snd_rme96_playback_adat_ops = {
15501534 .open = snd_rme96_playback_adat_open,
15511535 .close = snd_rme96_playback_close,
1552
- .ioctl = snd_pcm_lib_ioctl,
15531536 .hw_params = snd_rme96_playback_hw_params,
15541537 .prepare = snd_rme96_playback_prepare,
15551538 .trigger = snd_rme96_playback_trigger,
....@@ -1563,7 +1546,6 @@
15631546 static const struct snd_pcm_ops snd_rme96_capture_adat_ops = {
15641547 .open = snd_rme96_capture_adat_open,
15651548 .close = snd_rme96_capture_close,
1566
- .ioctl = snd_pcm_lib_ioctl,
15671549 .hw_params = snd_rme96_capture_hw_params,
15681550 .prepare = snd_rme96_capture_prepare,
15691551 .trigger = snd_rme96_capture_trigger,
....@@ -1633,7 +1615,7 @@
16331615 return err;
16341616 rme96->port = pci_resource_start(rme96->pci, 0);
16351617
1636
- rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE);
1618
+ rme96->iobase = ioremap(rme96->port, RME96_IO_SIZE);
16371619 if (!rme96->iobase) {
16381620 dev_err(rme96->card->dev,
16391621 "unable to remap memory region 0x%lx-0x%lx\n",
....@@ -1647,6 +1629,7 @@
16471629 return -EBUSY;
16481630 }
16491631 rme96->irq = pci->irq;
1632
+ rme96->card->sync_irq = rme96->irq;
16501633
16511634 /* read the card's revision number */
16521635 pci_read_config_byte(pci, 8, &rme96->rev);
....@@ -1868,10 +1851,7 @@
18681851
18691852 static void snd_rme96_proc_init(struct rme96 *rme96)
18701853 {
1871
- struct snd_info_entry *entry;
1872
-
1873
- if (! snd_card_proc_new(rme96->card, "rme96", &entry))
1874
- snd_info_set_text_ops(entry, rme96, snd_rme96_proc_read);
1854
+ snd_card_ro_proc_new(rme96->card, "rme96", rme96, snd_rme96_proc_read);
18751855 }
18761856
18771857 /*
....@@ -2273,7 +2253,7 @@
22732253 return change;
22742254 }
22752255
2276
-static struct snd_kcontrol_new snd_rme96_controls[] = {
2256
+static const struct snd_kcontrol_new snd_rme96_controls[] = {
22772257 {
22782258 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
22792259 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
....@@ -2388,8 +2368,6 @@
23882368 struct rme96 *rme96 = card->private_data;
23892369
23902370 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2391
- snd_pcm_suspend(rme96->playback_substream);
2392
- snd_pcm_suspend(rme96->capture_substream);
23932371
23942372 /* save capture & playback pointers */
23952373 rme96->playback_pointer = readl(rme96->iobase + RME96_IO_GET_PLAY_POS)