forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/ice1712/aureon.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
34 *
45 * Lowlevel functions for Terratec Aureon cards
56 *
67 * Copyright (c) 2003 Takashi Iwai <tiwai@suse.de>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
- *
228 *
239 * NOTES:
2410 *
....@@ -1403,7 +1389,7 @@
14031389 * mixers
14041390 */
14051391
1406
-static struct snd_kcontrol_new aureon_dac_controls[] = {
1392
+static const struct snd_kcontrol_new aureon_dac_controls[] = {
14071393 {
14081394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
14091395 .name = "Master Playback Switch",
....@@ -1518,7 +1504,7 @@
15181504 }
15191505 };
15201506
1521
-static struct snd_kcontrol_new wm_controls[] = {
1507
+static const struct snd_kcontrol_new wm_controls[] = {
15221508 {
15231509 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
15241510 .name = "PCM Playback Switch",
....@@ -1584,7 +1570,7 @@
15841570 }
15851571 };
15861572
1587
-static struct snd_kcontrol_new ac97_controls[] = {
1573
+static const struct snd_kcontrol_new ac97_controls[] = {
15881574 {
15891575 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
15901576 .name = "AC97 Playback Switch",
....@@ -1689,7 +1675,7 @@
16891675 }
16901676 };
16911677
1692
-static struct snd_kcontrol_new universe_ac97_controls[] = {
1678
+static const struct snd_kcontrol_new universe_ac97_controls[] = {
16931679 {
16941680 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
16951681 .name = "AC97 Playback Switch",
....@@ -1821,7 +1807,7 @@
18211807
18221808 };
18231809
1824
-static struct snd_kcontrol_new cs8415_controls[] = {
1810
+static const struct snd_kcontrol_new cs8415_controls[] = {
18251811 {
18261812 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
18271813 .name = SNDRV_CTL_NAME_IEC958("", CAPTURE, SWITCH),
....@@ -1906,6 +1892,7 @@
19061892 unsigned char id;
19071893 snd_ice1712_save_gpio_status(ice);
19081894 id = aureon_cs8415_get(ice, CS8415_ID);
1895
+ snd_ice1712_restore_gpio_status(ice);
19091896 if (id != 0x41)
19101897 dev_info(ice->card->dev,
19111898 "No CS8415 chip. Skipping CS8415 controls.\n");
....@@ -1923,7 +1910,6 @@
19231910 kctl->id.device = ice->pcm->device;
19241911 }
19251912 }
1926
- snd_ice1712_restore_gpio_status(ice);
19271913 }
19281914
19291915 return 0;
....@@ -2147,7 +2133,7 @@
21472133 * hence the driver needs to sets up it properly.
21482134 */
21492135
2150
-static unsigned char aureon51_eeprom[] = {
2136
+static const unsigned char aureon51_eeprom[] = {
21512137 [ICE_EEP2_SYSCONF] = 0x0a, /* clock 512, spdif-in/ADC, 3DACs */
21522138 [ICE_EEP2_ACLINK] = 0x80, /* I2S */
21532139 [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */
....@@ -2163,7 +2149,7 @@
21632149 [ICE_EEP2_GPIO_STATE2] = 0x00,
21642150 };
21652151
2166
-static unsigned char aureon71_eeprom[] = {
2152
+static const unsigned char aureon71_eeprom[] = {
21672153 [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */
21682154 [ICE_EEP2_ACLINK] = 0x80, /* I2S */
21692155 [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */
....@@ -2180,7 +2166,7 @@
21802166 };
21812167 #define prodigy71_eeprom aureon71_eeprom
21822168
2183
-static unsigned char aureon71_universe_eeprom[] = {
2169
+static const unsigned char aureon71_universe_eeprom[] = {
21842170 [ICE_EEP2_SYSCONF] = 0x2b, /* clock 512, mpu401, spdif-in/ADC,
21852171 * 4DACs
21862172 */
....@@ -2198,7 +2184,7 @@
21982184 [ICE_EEP2_GPIO_STATE2] = 0x00,
21992185 };
22002186
2201
-static unsigned char prodigy71lt_eeprom[] = {
2187
+static const unsigned char prodigy71lt_eeprom[] = {
22022188 [ICE_EEP2_SYSCONF] = 0x4b, /* clock 384, spdif-in/ADC, 4DACs */
22032189 [ICE_EEP2_ACLINK] = 0x80, /* I2S */
22042190 [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */