forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/sound/pci/ctxfi/ctatc.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /**
23 * 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.
74 *
85 * @File ctatc.c
96 *
....@@ -38,7 +35,8 @@
3835 | (0x10 << 16) \
3936 | ((IEC958_AES3_CON_FS_48000) << 24))
4037
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),
4240 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0022, "SB055x", CTSB055X),
4341 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X),
4442 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0029, "SB073x", CTSB073X),
....@@ -48,7 +46,7 @@
4846 { } /* terminator */
4947 };
5048
51
-static struct snd_pci_quirk subsys_20k2_list[] = {
49
+static const struct snd_pci_quirk subsys_20k2_list[] = {
5250 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB0760,
5351 "SB0760", CTSB0760),
5452 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB1270,
....@@ -67,6 +65,7 @@
6765
6866 static const char *ct_subsys_name[NUM_CTCARDS] = {
6967 /* 20k1 models */
68
+ [CTSB046X] = "SB046x",
7069 [CTSB055X] = "SB055x",
7170 [CTSB073X] = "SB073x",
7271 [CTUAA] = "UAA",
....@@ -1285,7 +1284,7 @@
12851284 if (p) {
12861285 if (p->value < 0) {
12871286 dev_err(atc->card->dev,
1288
- "Device %04x:%04x is black-listed\n",
1287
+ "Device %04x:%04x is on the denylist\n",
12891288 vendor_id, device_id);
12901289 return -ENOENT;
12911290 }
....@@ -1548,17 +1547,9 @@
15481547 #ifdef CONFIG_PM_SLEEP
15491548 static int atc_suspend(struct ct_atc *atc)
15501549 {
1551
- int i;
15521550 struct hw *hw = atc->hw;
15531551
15541552 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
- }
15621553
15631554 atc_release_resources(atc);
15641555
....@@ -1666,6 +1657,10 @@
16661657 * ct_atc_create - create and initialize a hardware manager
16671658 * @card: corresponding alsa card object
16681659 * @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)
16691664 * @ratc: return created object address in it
16701665 *
16711666 * Creates and initializes a hardware manager.
....@@ -1680,7 +1675,7 @@
16801675 struct ct_atc **ratc)
16811676 {
16821677 struct ct_atc *atc;
1683
- static struct snd_device_ops ops = {
1678
+ static const struct snd_device_ops ops = {
16841679 .dev_free = atc_dev_free,
16851680 };
16861681 int err;