diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-01-29 09:26:36 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:03:16 -0500 |
commit | 32b47da03541f97e40f1af5488ef88250459f388 (patch) | |
tree | 7945a4e7337924b602c9ff5dc027fe0beb0ffb75 /sound/pci/ice1712/aureon.c | |
parent | 189bc171434e84797f586130fca8eb4df3746e3f (diff) |
[ALSA] Add 'const' to files in pci/ice1712/
Mark a lot of data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712/aureon.c')
-rw-r--r-- | sound/pci/ice1712/aureon.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 041d2f07572b..625a9a32b7c7 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
@@ -294,7 +294,7 @@ static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short r | |||
294 | static int aureon_ac97_init (struct snd_ice1712 *ice) | 294 | static int aureon_ac97_init (struct snd_ice1712 *ice) |
295 | { | 295 | { |
296 | int i; | 296 | int i; |
297 | static unsigned short ac97_defaults[] = { | 297 | static const unsigned short ac97_defaults[] = { |
298 | 0x00, 0x9640, | 298 | 0x00, 0x9640, |
299 | 0x02, 0x8000, | 299 | 0x02, 0x8000, |
300 | 0x04, 0x8000, | 300 | 0x04, 0x8000, |
@@ -674,7 +674,7 @@ static DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0); | |||
674 | * Logarithmic volume values for WM8770 | 674 | * Logarithmic volume values for WM8770 |
675 | * Computed as 20 * Log10(255 / x) | 675 | * Computed as 20 * Log10(255 / x) |
676 | */ | 676 | */ |
677 | static unsigned char wm_vol[256] = { | 677 | static const unsigned char wm_vol[256] = { |
678 | 127, 48, 42, 39, 36, 34, 33, 31, 30, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, | 678 | 127, 48, 42, 39, 36, 34, 33, 31, 30, 29, 28, 27, 27, 26, 25, 25, 24, 24, 23, |
679 | 23, 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, 18, 18, 17, 17, 17, | 679 | 23, 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, 18, 18, 17, 17, 17, |
680 | 17, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, | 680 | 17, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, |
@@ -1067,14 +1067,14 @@ static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
1067 | */ | 1067 | */ |
1068 | static int wm_adc_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1068 | static int wm_adc_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1069 | { | 1069 | { |
1070 | static char *texts[] = { | 1070 | static const char * const texts[] = { |
1071 | "CD", //AIN1 | 1071 | "CD", //AIN1 |
1072 | "Aux", //AIN2 | 1072 | "Aux", //AIN2 |
1073 | "Line", //AIN3 | 1073 | "Line", //AIN3 |
1074 | "Mic", //AIN4 | 1074 | "Mic", //AIN4 |
1075 | "AC97" //AIN5 | 1075 | "AC97" //AIN5 |
1076 | }; | 1076 | }; |
1077 | static char *universe_texts[] = { | 1077 | static const char * const universe_texts[] = { |
1078 | "Aux1", //AIN1 | 1078 | "Aux1", //AIN1 |
1079 | "CD", //AIN2 | 1079 | "CD", //AIN2 |
1080 | "Phono", //AIN3 | 1080 | "Phono", //AIN3 |
@@ -1140,11 +1140,11 @@ static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
1140 | static int aureon_cs8415_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1140 | static int aureon_cs8415_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1141 | { | 1141 | { |
1142 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); | 1142 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
1143 | static char *aureon_texts[] = { | 1143 | static const char * const aureon_texts[] = { |
1144 | "CD", //RXP0 | 1144 | "CD", //RXP0 |
1145 | "Optical" //RXP1 | 1145 | "Optical" //RXP1 |
1146 | }; | 1146 | }; |
1147 | static char *prodigy_texts[] = { | 1147 | static const char * const prodigy_texts[] = { |
1148 | "CD", | 1148 | "CD", |
1149 | "Coax" | 1149 | "Coax" |
1150 | }; | 1150 | }; |
@@ -1368,7 +1368,7 @@ static int aureon_deemp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v | |||
1368 | */ | 1368 | */ |
1369 | static int aureon_oversampling_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) | 1369 | static int aureon_oversampling_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) |
1370 | { | 1370 | { |
1371 | static char *texts[2] = { "128x", "64x" }; | 1371 | static const char * const texts[2] = { "128x", "64x" }; |
1372 | 1372 | ||
1373 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 1373 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
1374 | uinfo->count = 1; | 1374 | uinfo->count = 1; |
@@ -1411,7 +1411,7 @@ static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl | |||
1411 | * mixers | 1411 | * mixers |
1412 | */ | 1412 | */ |
1413 | 1413 | ||
1414 | static struct snd_kcontrol_new aureon_dac_controls[] __devinitdata = { | 1414 | static const struct snd_kcontrol_new aureon_dac_controls[] __devinitdata = { |
1415 | { | 1415 | { |
1416 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1416 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1417 | .name = "Master Playback Switch", | 1417 | .name = "Master Playback Switch", |
@@ -1526,7 +1526,7 @@ static struct snd_kcontrol_new aureon_dac_controls[] __devinitdata = { | |||
1526 | } | 1526 | } |
1527 | }; | 1527 | }; |
1528 | 1528 | ||
1529 | static struct snd_kcontrol_new wm_controls[] __devinitdata = { | 1529 | static const struct snd_kcontrol_new wm_controls[] __devinitdata = { |
1530 | { | 1530 | { |
1531 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1531 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1532 | .name = "PCM Playback Switch", | 1532 | .name = "PCM Playback Switch", |
@@ -1592,7 +1592,7 @@ static struct snd_kcontrol_new wm_controls[] __devinitdata = { | |||
1592 | } | 1592 | } |
1593 | }; | 1593 | }; |
1594 | 1594 | ||
1595 | static struct snd_kcontrol_new ac97_controls[] __devinitdata = { | 1595 | static const struct snd_kcontrol_new ac97_controls[] __devinitdata = { |
1596 | { | 1596 | { |
1597 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1597 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1598 | .name = "AC97 Playback Switch", | 1598 | .name = "AC97 Playback Switch", |
@@ -1697,7 +1697,7 @@ static struct snd_kcontrol_new ac97_controls[] __devinitdata = { | |||
1697 | } | 1697 | } |
1698 | }; | 1698 | }; |
1699 | 1699 | ||
1700 | static struct snd_kcontrol_new universe_ac97_controls[] __devinitdata = { | 1700 | static const struct snd_kcontrol_new universe_ac97_controls[] __devinitdata = { |
1701 | { | 1701 | { |
1702 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1702 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1703 | .name = "AC97 Playback Switch", | 1703 | .name = "AC97 Playback Switch", |
@@ -1829,8 +1829,7 @@ static struct snd_kcontrol_new universe_ac97_controls[] __devinitdata = { | |||
1829 | 1829 | ||
1830 | }; | 1830 | }; |
1831 | 1831 | ||
1832 | 1832 | static const struct snd_kcontrol_new cs8415_controls[] __devinitdata = { | |
1833 | static struct snd_kcontrol_new cs8415_controls[] __devinitdata = { | ||
1834 | { | 1833 | { |
1835 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1834 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1836 | .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), | 1835 | .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), |
@@ -1875,7 +1874,6 @@ static struct snd_kcontrol_new cs8415_controls[] __devinitdata = { | |||
1875 | } | 1874 | } |
1876 | }; | 1875 | }; |
1877 | 1876 | ||
1878 | |||
1879 | static int __devinit aureon_add_controls(struct snd_ice1712 *ice) | 1877 | static int __devinit aureon_add_controls(struct snd_ice1712 *ice) |
1880 | { | 1878 | { |
1881 | unsigned int i, counts; | 1879 | unsigned int i, counts; |
@@ -1943,7 +1941,7 @@ static int __devinit aureon_add_controls(struct snd_ice1712 *ice) | |||
1943 | */ | 1941 | */ |
1944 | static int __devinit aureon_init(struct snd_ice1712 *ice) | 1942 | static int __devinit aureon_init(struct snd_ice1712 *ice) |
1945 | { | 1943 | { |
1946 | static unsigned short wm_inits_aureon[] = { | 1944 | static const unsigned short wm_inits_aureon[] = { |
1947 | /* These come first to reduce init pop noise */ | 1945 | /* These come first to reduce init pop noise */ |
1948 | 0x1b, 0x044, /* ADC Mux (AC'97 source) */ | 1946 | 0x1b, 0x044, /* ADC Mux (AC'97 source) */ |
1949 | 0x1c, 0x00B, /* Out Mux1 (VOUT1 = DAC+AUX, VOUT2 = DAC) */ | 1947 | 0x1c, 0x00B, /* Out Mux1 (VOUT1 = DAC+AUX, VOUT2 = DAC) */ |
@@ -1979,7 +1977,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
1979 | 0x1a, 0x000, /* -12dB ADC/R */ | 1977 | 0x1a, 0x000, /* -12dB ADC/R */ |
1980 | (unsigned short)-1 | 1978 | (unsigned short)-1 |
1981 | }; | 1979 | }; |
1982 | static unsigned short wm_inits_prodigy[] = { | 1980 | static const unsigned short wm_inits_prodigy[] = { |
1983 | 1981 | ||
1984 | /* These come first to reduce init pop noise */ | 1982 | /* These come first to reduce init pop noise */ |
1985 | 0x1b, 0x000, /* ADC Mux */ | 1983 | 0x1b, 0x000, /* ADC Mux */ |
@@ -2021,7 +2019,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
2021 | (unsigned short)-1 | 2019 | (unsigned short)-1 |
2022 | 2020 | ||
2023 | }; | 2021 | }; |
2024 | static unsigned short cs_inits[] = { | 2022 | static const unsigned short cs_inits[] = { |
2025 | 0x0441, /* RUN */ | 2023 | 0x0441, /* RUN */ |
2026 | 0x0180, /* no mute, OMCK output on RMCK pin */ | 2024 | 0x0180, /* no mute, OMCK output on RMCK pin */ |
2027 | 0x0201, /* S/PDIF source on RXP1 */ | 2025 | 0x0201, /* S/PDIF source on RXP1 */ |
@@ -2029,7 +2027,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
2029 | (unsigned short)-1 | 2027 | (unsigned short)-1 |
2030 | }; | 2028 | }; |
2031 | unsigned int tmp; | 2029 | unsigned int tmp; |
2032 | unsigned short *p; | 2030 | const unsigned short *p; |
2033 | int err, i; | 2031 | int err, i; |
2034 | 2032 | ||
2035 | if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) { | 2033 | if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) { |
@@ -2109,7 +2107,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
2109 | * hence the driver needs to sets up it properly. | 2107 | * hence the driver needs to sets up it properly. |
2110 | */ | 2108 | */ |
2111 | 2109 | ||
2112 | static unsigned char aureon51_eeprom[] __devinitdata = { | 2110 | static const unsigned char aureon51_eeprom[] __devinitdata = { |
2113 | [ICE_EEP2_SYSCONF] = 0x0a, /* clock 512, spdif-in/ADC, 3DACs */ | 2111 | [ICE_EEP2_SYSCONF] = 0x0a, /* clock 512, spdif-in/ADC, 3DACs */ |
2114 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ | 2112 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
2115 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ | 2113 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
@@ -2125,7 +2123,7 @@ static unsigned char aureon51_eeprom[] __devinitdata = { | |||
2125 | [ICE_EEP2_GPIO_STATE2] = 0x00, | 2123 | [ICE_EEP2_GPIO_STATE2] = 0x00, |
2126 | }; | 2124 | }; |
2127 | 2125 | ||
2128 | static unsigned char aureon71_eeprom[] __devinitdata = { | 2126 | static const unsigned char aureon71_eeprom[] __devinitdata = { |
2129 | [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */ | 2127 | [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */ |
2130 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ | 2128 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
2131 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ | 2129 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
@@ -2142,7 +2140,7 @@ static unsigned char aureon71_eeprom[] __devinitdata = { | |||
2142 | }; | 2140 | }; |
2143 | #define prodigy71_eeprom aureon71_eeprom | 2141 | #define prodigy71_eeprom aureon71_eeprom |
2144 | 2142 | ||
2145 | static unsigned char prodigy71lt_eeprom[] __devinitdata = { | 2143 | static const unsigned char prodigy71lt_eeprom[] __devinitdata = { |
2146 | [ICE_EEP2_SYSCONF] = 0x4b, /* clock 384, spdif-in/ADC, 4DACs */ | 2144 | [ICE_EEP2_SYSCONF] = 0x4b, /* clock 384, spdif-in/ADC, 4DACs */ |
2147 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ | 2145 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
2148 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ | 2146 | [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ |
@@ -2160,7 +2158,7 @@ static unsigned char prodigy71lt_eeprom[] __devinitdata = { | |||
2160 | #define prodigy71xt_eeprom prodigy71lt_eeprom | 2158 | #define prodigy71xt_eeprom prodigy71lt_eeprom |
2161 | 2159 | ||
2162 | /* entry point */ | 2160 | /* entry point */ |
2163 | struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { | 2161 | const struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { |
2164 | { | 2162 | { |
2165 | .subvendor = VT1724_SUBDEVICE_AUREON51_SKY, | 2163 | .subvendor = VT1724_SUBDEVICE_AUREON51_SKY, |
2166 | .name = "Terratec Aureon 5.1-Sky", | 2164 | .name = "Terratec Aureon 5.1-Sky", |