.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /** |
---|
2 | 3 | * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. |
---|
3 | | - * |
---|
4 | | - * This source file is released under GPL v2 license (no other versions). |
---|
5 | | - * See the COPYING file included in the main directory of this source |
---|
6 | | - * distribution for the license terms and conditions. |
---|
7 | 4 | * |
---|
8 | 5 | * @File ctatc.c |
---|
9 | 6 | * |
---|
.. | .. |
---|
38 | 35 | | (0x10 << 16) \ |
---|
39 | 36 | | ((IEC958_AES3_CON_FS_48000) << 24)) |
---|
40 | 37 | |
---|
41 | | -static struct snd_pci_quirk subsys_20k1_list[] = { |
---|
| 38 | +static const struct snd_pci_quirk subsys_20k1_list[] = { |
---|
| 39 | + SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0021, "SB046x", CTSB046X), |
---|
42 | 40 | SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0022, "SB055x", CTSB055X), |
---|
43 | 41 | SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X), |
---|
44 | 42 | SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0029, "SB073x", CTSB073X), |
---|
.. | .. |
---|
48 | 46 | { } /* terminator */ |
---|
49 | 47 | }; |
---|
50 | 48 | |
---|
51 | | -static struct snd_pci_quirk subsys_20k2_list[] = { |
---|
| 49 | +static const struct snd_pci_quirk subsys_20k2_list[] = { |
---|
52 | 50 | SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB0760, |
---|
53 | 51 | "SB0760", CTSB0760), |
---|
54 | 52 | SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB1270, |
---|
.. | .. |
---|
67 | 65 | |
---|
68 | 66 | static const char *ct_subsys_name[NUM_CTCARDS] = { |
---|
69 | 67 | /* 20k1 models */ |
---|
| 68 | + [CTSB046X] = "SB046x", |
---|
70 | 69 | [CTSB055X] = "SB055x", |
---|
71 | 70 | [CTSB073X] = "SB073x", |
---|
72 | 71 | [CTUAA] = "UAA", |
---|
.. | .. |
---|
1285 | 1284 | if (p) { |
---|
1286 | 1285 | if (p->value < 0) { |
---|
1287 | 1286 | dev_err(atc->card->dev, |
---|
1288 | | - "Device %04x:%04x is black-listed\n", |
---|
| 1287 | + "Device %04x:%04x is on the denylist\n", |
---|
1289 | 1288 | vendor_id, device_id); |
---|
1290 | 1289 | return -ENOENT; |
---|
1291 | 1290 | } |
---|
.. | .. |
---|
1548 | 1547 | #ifdef CONFIG_PM_SLEEP |
---|
1549 | 1548 | static int atc_suspend(struct ct_atc *atc) |
---|
1550 | 1549 | { |
---|
1551 | | - int i; |
---|
1552 | 1550 | struct hw *hw = atc->hw; |
---|
1553 | 1551 | |
---|
1554 | 1552 | snd_power_change_state(atc->card, SNDRV_CTL_POWER_D3hot); |
---|
1555 | | - |
---|
1556 | | - for (i = FRONT; i < NUM_PCMS; i++) { |
---|
1557 | | - if (!atc->pcms[i]) |
---|
1558 | | - continue; |
---|
1559 | | - |
---|
1560 | | - snd_pcm_suspend_all(atc->pcms[i]); |
---|
1561 | | - } |
---|
1562 | 1553 | |
---|
1563 | 1554 | atc_release_resources(atc); |
---|
1564 | 1555 | |
---|
.. | .. |
---|
1666 | 1657 | * ct_atc_create - create and initialize a hardware manager |
---|
1667 | 1658 | * @card: corresponding alsa card object |
---|
1668 | 1659 | * @pci: corresponding kernel pci device object |
---|
| 1660 | + * @rsr: reference sampling rate |
---|
| 1661 | + * @msr: master sampling rate |
---|
| 1662 | + * @chip_type: CHIPTYP enum values |
---|
| 1663 | + * @ssid: vendor ID (upper 16 bits) and device ID (lower 16 bits) |
---|
1669 | 1664 | * @ratc: return created object address in it |
---|
1670 | 1665 | * |
---|
1671 | 1666 | * Creates and initializes a hardware manager. |
---|
.. | .. |
---|
1680 | 1675 | struct ct_atc **ratc) |
---|
1681 | 1676 | { |
---|
1682 | 1677 | struct ct_atc *atc; |
---|
1683 | | - static struct snd_device_ops ops = { |
---|
| 1678 | + static const struct snd_device_ops ops = { |
---|
1684 | 1679 | .dev_free = atc_dev_free, |
---|
1685 | 1680 | }; |
---|
1686 | 1681 | int err; |
---|