.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * ALSA driver for ICEnsemble VT1724 (Envy24HT) |
---|
3 | 4 | * |
---|
4 | 5 | * Lowlevel functions for Terratec Aureon cards |
---|
5 | 6 | * |
---|
6 | 7 | * 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 | | - * |
---|
22 | 8 | * |
---|
23 | 9 | * NOTES: |
---|
24 | 10 | * |
---|
.. | .. |
---|
1403 | 1389 | * mixers |
---|
1404 | 1390 | */ |
---|
1405 | 1391 | |
---|
1406 | | -static struct snd_kcontrol_new aureon_dac_controls[] = { |
---|
| 1392 | +static const struct snd_kcontrol_new aureon_dac_controls[] = { |
---|
1407 | 1393 | { |
---|
1408 | 1394 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
1409 | 1395 | .name = "Master Playback Switch", |
---|
.. | .. |
---|
1518 | 1504 | } |
---|
1519 | 1505 | }; |
---|
1520 | 1506 | |
---|
1521 | | -static struct snd_kcontrol_new wm_controls[] = { |
---|
| 1507 | +static const struct snd_kcontrol_new wm_controls[] = { |
---|
1522 | 1508 | { |
---|
1523 | 1509 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
1524 | 1510 | .name = "PCM Playback Switch", |
---|
.. | .. |
---|
1584 | 1570 | } |
---|
1585 | 1571 | }; |
---|
1586 | 1572 | |
---|
1587 | | -static struct snd_kcontrol_new ac97_controls[] = { |
---|
| 1573 | +static const struct snd_kcontrol_new ac97_controls[] = { |
---|
1588 | 1574 | { |
---|
1589 | 1575 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
1590 | 1576 | .name = "AC97 Playback Switch", |
---|
.. | .. |
---|
1689 | 1675 | } |
---|
1690 | 1676 | }; |
---|
1691 | 1677 | |
---|
1692 | | -static struct snd_kcontrol_new universe_ac97_controls[] = { |
---|
| 1678 | +static const struct snd_kcontrol_new universe_ac97_controls[] = { |
---|
1693 | 1679 | { |
---|
1694 | 1680 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
1695 | 1681 | .name = "AC97 Playback Switch", |
---|
.. | .. |
---|
1821 | 1807 | |
---|
1822 | 1808 | }; |
---|
1823 | 1809 | |
---|
1824 | | -static struct snd_kcontrol_new cs8415_controls[] = { |
---|
| 1810 | +static const struct snd_kcontrol_new cs8415_controls[] = { |
---|
1825 | 1811 | { |
---|
1826 | 1812 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
1827 | 1813 | .name = SNDRV_CTL_NAME_IEC958("", CAPTURE, SWITCH), |
---|
.. | .. |
---|
1906 | 1892 | unsigned char id; |
---|
1907 | 1893 | snd_ice1712_save_gpio_status(ice); |
---|
1908 | 1894 | id = aureon_cs8415_get(ice, CS8415_ID); |
---|
| 1895 | + snd_ice1712_restore_gpio_status(ice); |
---|
1909 | 1896 | if (id != 0x41) |
---|
1910 | 1897 | dev_info(ice->card->dev, |
---|
1911 | 1898 | "No CS8415 chip. Skipping CS8415 controls.\n"); |
---|
.. | .. |
---|
1923 | 1910 | kctl->id.device = ice->pcm->device; |
---|
1924 | 1911 | } |
---|
1925 | 1912 | } |
---|
1926 | | - snd_ice1712_restore_gpio_status(ice); |
---|
1927 | 1913 | } |
---|
1928 | 1914 | |
---|
1929 | 1915 | return 0; |
---|
.. | .. |
---|
2147 | 2133 | * hence the driver needs to sets up it properly. |
---|
2148 | 2134 | */ |
---|
2149 | 2135 | |
---|
2150 | | -static unsigned char aureon51_eeprom[] = { |
---|
| 2136 | +static const unsigned char aureon51_eeprom[] = { |
---|
2151 | 2137 | [ICE_EEP2_SYSCONF] = 0x0a, /* clock 512, spdif-in/ADC, 3DACs */ |
---|
2152 | 2138 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
---|
2153 | 2139 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
---|
.. | .. |
---|
2163 | 2149 | [ICE_EEP2_GPIO_STATE2] = 0x00, |
---|
2164 | 2150 | }; |
---|
2165 | 2151 | |
---|
2166 | | -static unsigned char aureon71_eeprom[] = { |
---|
| 2152 | +static const unsigned char aureon71_eeprom[] = { |
---|
2167 | 2153 | [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */ |
---|
2168 | 2154 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
---|
2169 | 2155 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
---|
.. | .. |
---|
2180 | 2166 | }; |
---|
2181 | 2167 | #define prodigy71_eeprom aureon71_eeprom |
---|
2182 | 2168 | |
---|
2183 | | -static unsigned char aureon71_universe_eeprom[] = { |
---|
| 2169 | +static const unsigned char aureon71_universe_eeprom[] = { |
---|
2184 | 2170 | [ICE_EEP2_SYSCONF] = 0x2b, /* clock 512, mpu401, spdif-in/ADC, |
---|
2185 | 2171 | * 4DACs |
---|
2186 | 2172 | */ |
---|
.. | .. |
---|
2198 | 2184 | [ICE_EEP2_GPIO_STATE2] = 0x00, |
---|
2199 | 2185 | }; |
---|
2200 | 2186 | |
---|
2201 | | -static unsigned char prodigy71lt_eeprom[] = { |
---|
| 2187 | +static const unsigned char prodigy71lt_eeprom[] = { |
---|
2202 | 2188 | [ICE_EEP2_SYSCONF] = 0x4b, /* clock 384, spdif-in/ADC, 4DACs */ |
---|
2203 | 2189 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
---|
2204 | 2190 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
---|