.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * ALSA driver for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST audio |
---|
3 | 4 | * interfaces |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Thanks to Henk Hesselink <henk@anda.nl> for the analog volume control |
---|
8 | 9 | * 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 | | - * |
---|
24 | 10 | */ |
---|
25 | 11 | |
---|
26 | 12 | #include <linux/delay.h> |
---|
.. | .. |
---|
1522 | 1508 | static const struct snd_pcm_ops snd_rme96_playback_spdif_ops = { |
---|
1523 | 1509 | .open = snd_rme96_playback_spdif_open, |
---|
1524 | 1510 | .close = snd_rme96_playback_close, |
---|
1525 | | - .ioctl = snd_pcm_lib_ioctl, |
---|
1526 | 1511 | .hw_params = snd_rme96_playback_hw_params, |
---|
1527 | 1512 | .prepare = snd_rme96_playback_prepare, |
---|
1528 | 1513 | .trigger = snd_rme96_playback_trigger, |
---|
.. | .. |
---|
1536 | 1521 | static const struct snd_pcm_ops snd_rme96_capture_spdif_ops = { |
---|
1537 | 1522 | .open = snd_rme96_capture_spdif_open, |
---|
1538 | 1523 | .close = snd_rme96_capture_close, |
---|
1539 | | - .ioctl = snd_pcm_lib_ioctl, |
---|
1540 | 1524 | .hw_params = snd_rme96_capture_hw_params, |
---|
1541 | 1525 | .prepare = snd_rme96_capture_prepare, |
---|
1542 | 1526 | .trigger = snd_rme96_capture_trigger, |
---|
.. | .. |
---|
1549 | 1533 | static const struct snd_pcm_ops snd_rme96_playback_adat_ops = { |
---|
1550 | 1534 | .open = snd_rme96_playback_adat_open, |
---|
1551 | 1535 | .close = snd_rme96_playback_close, |
---|
1552 | | - .ioctl = snd_pcm_lib_ioctl, |
---|
1553 | 1536 | .hw_params = snd_rme96_playback_hw_params, |
---|
1554 | 1537 | .prepare = snd_rme96_playback_prepare, |
---|
1555 | 1538 | .trigger = snd_rme96_playback_trigger, |
---|
.. | .. |
---|
1563 | 1546 | static const struct snd_pcm_ops snd_rme96_capture_adat_ops = { |
---|
1564 | 1547 | .open = snd_rme96_capture_adat_open, |
---|
1565 | 1548 | .close = snd_rme96_capture_close, |
---|
1566 | | - .ioctl = snd_pcm_lib_ioctl, |
---|
1567 | 1549 | .hw_params = snd_rme96_capture_hw_params, |
---|
1568 | 1550 | .prepare = snd_rme96_capture_prepare, |
---|
1569 | 1551 | .trigger = snd_rme96_capture_trigger, |
---|
.. | .. |
---|
1633 | 1615 | return err; |
---|
1634 | 1616 | rme96->port = pci_resource_start(rme96->pci, 0); |
---|
1635 | 1617 | |
---|
1636 | | - rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE); |
---|
| 1618 | + rme96->iobase = ioremap(rme96->port, RME96_IO_SIZE); |
---|
1637 | 1619 | if (!rme96->iobase) { |
---|
1638 | 1620 | dev_err(rme96->card->dev, |
---|
1639 | 1621 | "unable to remap memory region 0x%lx-0x%lx\n", |
---|
.. | .. |
---|
1647 | 1629 | return -EBUSY; |
---|
1648 | 1630 | } |
---|
1649 | 1631 | rme96->irq = pci->irq; |
---|
| 1632 | + rme96->card->sync_irq = rme96->irq; |
---|
1650 | 1633 | |
---|
1651 | 1634 | /* read the card's revision number */ |
---|
1652 | 1635 | pci_read_config_byte(pci, 8, &rme96->rev); |
---|
.. | .. |
---|
1868 | 1851 | |
---|
1869 | 1852 | static void snd_rme96_proc_init(struct rme96 *rme96) |
---|
1870 | 1853 | { |
---|
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); |
---|
1875 | 1855 | } |
---|
1876 | 1856 | |
---|
1877 | 1857 | /* |
---|
.. | .. |
---|
2273 | 2253 | return change; |
---|
2274 | 2254 | } |
---|
2275 | 2255 | |
---|
2276 | | -static struct snd_kcontrol_new snd_rme96_controls[] = { |
---|
| 2256 | +static const struct snd_kcontrol_new snd_rme96_controls[] = { |
---|
2277 | 2257 | { |
---|
2278 | 2258 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
---|
2279 | 2259 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), |
---|
.. | .. |
---|
2388 | 2368 | struct rme96 *rme96 = card->private_data; |
---|
2389 | 2369 | |
---|
2390 | 2370 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
---|
2391 | | - snd_pcm_suspend(rme96->playback_substream); |
---|
2392 | | - snd_pcm_suspend(rme96->capture_substream); |
---|
2393 | 2371 | |
---|
2394 | 2372 | /* save capture & playback pointers */ |
---|
2395 | 2373 | rme96->playback_pointer = readl(rme96->iobase + RME96_IO_GET_PLAY_POS) |
---|