aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 05:36:09 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-02 06:20:30 -0400
commitc42d47829a8e62bd00b551782760d836d65d8888 (patch)
tree1f888c3e7fc27d23af1c616c9abfd0f9576b42eb
parent728850a7f25f4f4b41f5685945b02579f6b19276 (diff)
ALSA: hda - Constify fixup and other array data in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_cirrus.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 067982f4f182..8b735052bc10 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -51,7 +51,7 @@ struct cs_spec {
51 unsigned int cur_adc_format; 51 unsigned int cur_adc_format;
52 hda_nid_t dig_in; 52 hda_nid_t dig_in;
53 53
54 struct hda_bind_ctls *capture_bind[2]; 54 const struct hda_bind_ctls *capture_bind[2];
55 55
56 unsigned int gpio_mask; 56 unsigned int gpio_mask;
57 unsigned int gpio_dir; 57 unsigned int gpio_dir;
@@ -231,7 +231,7 @@ static int cs_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
231 231
232/* 232/*
233 */ 233 */
234static struct hda_pcm_stream cs_pcm_analog_playback = { 234static const struct hda_pcm_stream cs_pcm_analog_playback = {
235 .substreams = 1, 235 .substreams = 1,
236 .channels_min = 2, 236 .channels_min = 2,
237 .channels_max = 2, 237 .channels_max = 2,
@@ -242,7 +242,7 @@ static struct hda_pcm_stream cs_pcm_analog_playback = {
242 }, 242 },
243}; 243};
244 244
245static struct hda_pcm_stream cs_pcm_analog_capture = { 245static const struct hda_pcm_stream cs_pcm_analog_capture = {
246 .substreams = 1, 246 .substreams = 1,
247 .channels_min = 2, 247 .channels_min = 2,
248 .channels_max = 2, 248 .channels_max = 2,
@@ -252,7 +252,7 @@ static struct hda_pcm_stream cs_pcm_analog_capture = {
252 }, 252 },
253}; 253};
254 254
255static struct hda_pcm_stream cs_pcm_digital_playback = { 255static const struct hda_pcm_stream cs_pcm_digital_playback = {
256 .substreams = 1, 256 .substreams = 1,
257 .channels_min = 2, 257 .channels_min = 2,
258 .channels_max = 2, 258 .channels_max = 2,
@@ -264,7 +264,7 @@ static struct hda_pcm_stream cs_pcm_digital_playback = {
264 }, 264 },
265}; 265};
266 266
267static struct hda_pcm_stream cs_pcm_digital_capture = { 267static const struct hda_pcm_stream cs_pcm_digital_capture = {
268 .substreams = 1, 268 .substreams = 1,
269 .channels_min = 2, 269 .channels_min = 2,
270 .channels_max = 2, 270 .channels_max = 2,
@@ -559,10 +559,10 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx,
559 const char *name; 559 const char *name;
560 int err, index; 560 int err, index;
561 struct snd_kcontrol *kctl; 561 struct snd_kcontrol *kctl;
562 static char *speakers[] = { 562 static const char * const speakers[] = {
563 "Front Speaker", "Surround Speaker", "Bass Speaker" 563 "Front Speaker", "Surround Speaker", "Bass Speaker"
564 }; 564 };
565 static char *line_outs[] = { 565 static const char * const line_outs[] = {
566 "Front Line-Out", "Surround Line-Out", "Bass Line-Out" 566 "Front Line-Out", "Surround Line-Out", "Bass Line-Out"
567 }; 567 };
568 568
@@ -642,7 +642,7 @@ static int build_output(struct hda_codec *codec)
642/* 642/*
643 */ 643 */
644 644
645static struct snd_kcontrol_new cs_capture_ctls[] = { 645static const struct snd_kcontrol_new cs_capture_ctls[] = {
646 HDA_BIND_SW("Capture Switch", 0), 646 HDA_BIND_SW("Capture Switch", 0),
647 HDA_BIND_VOL("Capture Volume", 0), 647 HDA_BIND_VOL("Capture Volume", 0),
648}; 648};
@@ -710,7 +710,7 @@ static int cs_capture_source_put(struct snd_kcontrol *kcontrol,
710 return change_cur_input(codec, idx, 0); 710 return change_cur_input(codec, idx, 0);
711} 711}
712 712
713static struct snd_kcontrol_new cs_capture_source = { 713static const struct snd_kcontrol_new cs_capture_source = {
714 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 714 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
715 .name = "Capture Source", 715 .name = "Capture Source",
716 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 716 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -719,7 +719,7 @@ static struct snd_kcontrol_new cs_capture_source = {
719 .put = cs_capture_source_put, 719 .put = cs_capture_source_put,
720}; 720};
721 721
722static struct hda_bind_ctls *make_bind_capture(struct hda_codec *codec, 722static const struct hda_bind_ctls *make_bind_capture(struct hda_codec *codec,
723 struct hda_ctl_ops *ops) 723 struct hda_ctl_ops *ops)
724{ 724{
725 struct cs_spec *spec = codec->spec; 725 struct cs_spec *spec = codec->spec;
@@ -983,7 +983,7 @@ static void init_input(struct hda_codec *codec)
983 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); 983 cs_vendor_coef_set(codec, IDX_ADC_CFG, coef);
984} 984}
985 985
986static struct hda_verb cs_coef_init_verbs[] = { 986static const struct hda_verb cs_coef_init_verbs[] = {
987 {0x11, AC_VERB_SET_PROC_STATE, 1}, 987 {0x11, AC_VERB_SET_PROC_STATE, 1},
988 {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, 988 {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG},
989 {0x11, AC_VERB_SET_PROC_COEF, 989 {0x11, AC_VERB_SET_PROC_COEF,
@@ -1017,7 +1017,7 @@ static struct hda_verb cs_coef_init_verbs[] = {
1017 * blocks, which will alleviate the issue. 1017 * blocks, which will alleviate the issue.
1018 */ 1018 */
1019 1019
1020static struct hda_verb cs_errata_init_verbs[] = { 1020static const struct hda_verb cs_errata_init_verbs[] = {
1021 {0x01, AC_VERB_SET_POWER_STATE, 0x00}, /* AFG: D0 */ 1021 {0x01, AC_VERB_SET_POWER_STATE, 0x00}, /* AFG: D0 */
1022 {0x11, AC_VERB_SET_PROC_STATE, 0x01}, /* VPW: processing on */ 1022 {0x11, AC_VERB_SET_PROC_STATE, 0x01}, /* VPW: processing on */
1023 1023
@@ -1126,7 +1126,7 @@ static void cs_unsol_event(struct hda_codec *codec, unsigned int res)
1126 } 1126 }
1127} 1127}
1128 1128
1129static struct hda_codec_ops cs_patch_ops = { 1129static const struct hda_codec_ops cs_patch_ops = {
1130 .build_controls = cs_build_controls, 1130 .build_controls = cs_build_controls,
1131 .build_pcms = cs_build_pcms, 1131 .build_pcms = cs_build_pcms,
1132 .init = cs_init, 1132 .init = cs_init,
@@ -1166,7 +1166,7 @@ static const char * const cs420x_models[CS420X_MODELS] = {
1166}; 1166};
1167 1167
1168 1168
1169static struct snd_pci_quirk cs420x_cfg_tbl[] = { 1169static const struct snd_pci_quirk cs420x_cfg_tbl[] = {
1170 SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), 1170 SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
1171 SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), 1171 SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
1172 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), 1172 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
@@ -1180,7 +1180,7 @@ struct cs_pincfg {
1180 u32 val; 1180 u32 val;
1181}; 1181};
1182 1182
1183static struct cs_pincfg mbp53_pincfgs[] = { 1183static const struct cs_pincfg mbp53_pincfgs[] = {
1184 { 0x09, 0x012b4050 }, 1184 { 0x09, 0x012b4050 },
1185 { 0x0a, 0x90100141 }, 1185 { 0x0a, 0x90100141 },
1186 { 0x0b, 0x90100140 }, 1186 { 0x0b, 0x90100140 },
@@ -1194,7 +1194,7 @@ static struct cs_pincfg mbp53_pincfgs[] = {
1194 {} /* terminator */ 1194 {} /* terminator */
1195}; 1195};
1196 1196
1197static struct cs_pincfg mbp55_pincfgs[] = { 1197static const struct cs_pincfg mbp55_pincfgs[] = {
1198 { 0x09, 0x012b4030 }, 1198 { 0x09, 0x012b4030 },
1199 { 0x0a, 0x90100121 }, 1199 { 0x0a, 0x90100121 },
1200 { 0x0b, 0x90100120 }, 1200 { 0x0b, 0x90100120 },
@@ -1208,7 +1208,7 @@ static struct cs_pincfg mbp55_pincfgs[] = {
1208 {} /* terminator */ 1208 {} /* terminator */
1209}; 1209};
1210 1210
1211static struct cs_pincfg imac27_pincfgs[] = { 1211static const struct cs_pincfg imac27_pincfgs[] = {
1212 { 0x09, 0x012b4050 }, 1212 { 0x09, 0x012b4050 },
1213 { 0x0a, 0x90100140 }, 1213 { 0x0a, 0x90100140 },
1214 { 0x0b, 0x90100142 }, 1214 { 0x0b, 0x90100142 },
@@ -1222,7 +1222,7 @@ static struct cs_pincfg imac27_pincfgs[] = {
1222 {} /* terminator */ 1222 {} /* terminator */
1223}; 1223};
1224 1224
1225static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { 1225static const struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = {
1226 [CS420X_MBP53] = mbp53_pincfgs, 1226 [CS420X_MBP53] = mbp53_pincfgs,
1227 [CS420X_MBP55] = mbp55_pincfgs, 1227 [CS420X_MBP55] = mbp55_pincfgs,
1228 [CS420X_IMAC27] = imac27_pincfgs, 1228 [CS420X_IMAC27] = imac27_pincfgs,
@@ -1283,7 +1283,7 @@ static int patch_cs420x(struct hda_codec *codec)
1283/* 1283/*
1284 * patch entries 1284 * patch entries
1285 */ 1285 */
1286static struct hda_codec_preset snd_hda_preset_cirrus[] = { 1286static const struct hda_codec_preset snd_hda_preset_cirrus[] = {
1287 { .id = 0x10134206, .name = "CS4206", .patch = patch_cs420x }, 1287 { .id = 0x10134206, .name = "CS4206", .patch = patch_cs420x },
1288 { .id = 0x10134207, .name = "CS4207", .patch = patch_cs420x }, 1288 { .id = 0x10134207, .name = "CS4207", .patch = patch_cs420x },
1289 {} /* terminator */ 1289 {} /* terminator */