aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 05:34:20 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-02 06:20:28 -0400
commit779d065983f30b952d66e34d230b244f44a4e032 (patch)
tree1cf01cc2babbf0dab3e7af0abe3637bdbf562865 /sound
parent498f5b175b90597608e48390183933d3875d5429 (diff)
ALSA: hda - Constify fixup and other array data in patch_cmedia.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cmedia.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 1f8bbcd0f802..ab3308daa960 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -53,7 +53,7 @@ struct cmi_spec {
53 int num_dacs; 53 int num_dacs;
54 54
55 /* capture */ 55 /* capture */
56 hda_nid_t *adc_nids; 56 const hda_nid_t *adc_nids;
57 hda_nid_t dig_in_nid; 57 hda_nid_t dig_in_nid;
58 58
59 /* capture source */ 59 /* capture source */
@@ -110,7 +110,7 @@ static int cmi_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
110 */ 110 */
111 111
112/* 3-stack / 2 channel */ 112/* 3-stack / 2 channel */
113static struct hda_verb cmi9880_ch2_init[] = { 113static const struct hda_verb cmi9880_ch2_init[] = {
114 /* set line-in PIN for input */ 114 /* set line-in PIN for input */
115 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, 115 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
116 /* set mic PIN for input, also enable vref */ 116 /* set mic PIN for input, also enable vref */
@@ -121,7 +121,7 @@ static struct hda_verb cmi9880_ch2_init[] = {
121}; 121};
122 122
123/* 3-stack / 6 channel */ 123/* 3-stack / 6 channel */
124static struct hda_verb cmi9880_ch6_init[] = { 124static const struct hda_verb cmi9880_ch6_init[] = {
125 /* set line-in PIN for output */ 125 /* set line-in PIN for output */
126 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, 126 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
127 /* set mic PIN for output */ 127 /* set mic PIN for output */
@@ -132,7 +132,7 @@ static struct hda_verb cmi9880_ch6_init[] = {
132}; 132};
133 133
134/* 3-stack+front / 8 channel */ 134/* 3-stack+front / 8 channel */
135static struct hda_verb cmi9880_ch8_init[] = { 135static const struct hda_verb cmi9880_ch8_init[] = {
136 /* set line-in PIN for output */ 136 /* set line-in PIN for output */
137 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, 137 { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
138 /* set mic PIN for output */ 138 /* set mic PIN for output */
@@ -142,7 +142,7 @@ static struct hda_verb cmi9880_ch8_init[] = {
142 {} 142 {}
143}; 143};
144 144
145static struct hda_channel_mode cmi9880_channel_modes[3] = { 145static const struct hda_channel_mode cmi9880_channel_modes[3] = {
146 { 2, cmi9880_ch2_init }, 146 { 2, cmi9880_ch2_init },
147 { 6, cmi9880_ch6_init }, 147 { 6, cmi9880_ch6_init },
148 { 8, cmi9880_ch8_init }, 148 { 8, cmi9880_ch8_init },
@@ -174,7 +174,7 @@ static int cmi_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
174 174
175/* 175/*
176 */ 176 */
177static struct snd_kcontrol_new cmi9880_basic_mixer[] = { 177static const struct snd_kcontrol_new cmi9880_basic_mixer[] = {
178 /* CMI9880 has no playback volumes! */ 178 /* CMI9880 has no playback volumes! */
179 HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */ 179 HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */
180 HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT), 180 HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT),
@@ -205,7 +205,7 @@ static struct snd_kcontrol_new cmi9880_basic_mixer[] = {
205/* 205/*
206 * shared I/O pins 206 * shared I/O pins
207 */ 207 */
208static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = { 208static const struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
209 { 209 {
210 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 210 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
211 .name = "Channel Mode", 211 .name = "Channel Mode",
@@ -219,7 +219,7 @@ static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
219/* AUD-in selections: 219/* AUD-in selections:
220 * 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x1f 0x20 220 * 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x1f 0x20
221 */ 221 */
222static struct hda_input_mux cmi9880_basic_mux = { 222static const struct hda_input_mux cmi9880_basic_mux = {
223 .num_items = 4, 223 .num_items = 4,
224 .items = { 224 .items = {
225 { "Front Mic", 0x5 }, 225 { "Front Mic", 0x5 },
@@ -229,7 +229,7 @@ static struct hda_input_mux cmi9880_basic_mux = {
229 } 229 }
230}; 230};
231 231
232static struct hda_input_mux cmi9880_no_line_mux = { 232static const struct hda_input_mux cmi9880_no_line_mux = {
233 .num_items = 3, 233 .num_items = 3,
234 .items = { 234 .items = {
235 { "Front Mic", 0x5 }, 235 { "Front Mic", 0x5 },
@@ -239,11 +239,11 @@ static struct hda_input_mux cmi9880_no_line_mux = {
239}; 239};
240 240
241/* front, rear, clfe, rear_surr */ 241/* front, rear, clfe, rear_surr */
242static hda_nid_t cmi9880_dac_nids[4] = { 242static const hda_nid_t cmi9880_dac_nids[4] = {
243 0x03, 0x04, 0x05, 0x06 243 0x03, 0x04, 0x05, 0x06
244}; 244};
245/* ADC0, ADC1 */ 245/* ADC0, ADC1 */
246static hda_nid_t cmi9880_adc_nids[2] = { 246static const hda_nid_t cmi9880_adc_nids[2] = {
247 0x08, 0x09 247 0x08, 0x09
248}; 248};
249 249
@@ -252,7 +252,7 @@ static hda_nid_t cmi9880_adc_nids[2] = {
252 252
253/* 253/*
254 */ 254 */
255static struct hda_verb cmi9880_basic_init[] = { 255static const struct hda_verb cmi9880_basic_init[] = {
256 /* port-D for line out (rear panel) */ 256 /* port-D for line out (rear panel) */
257 { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, 257 { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
258 /* port-E for HP out (front panel) */ 258 /* port-E for HP out (front panel) */
@@ -281,7 +281,7 @@ static struct hda_verb cmi9880_basic_init[] = {
281 {} /* terminator */ 281 {} /* terminator */
282}; 282};
283 283
284static struct hda_verb cmi9880_allout_init[] = { 284static const struct hda_verb cmi9880_allout_init[] = {
285 /* port-D for line out (rear panel) */ 285 /* port-D for line out (rear panel) */
286 { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, 286 { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
287 /* port-E for HP out (front panel) */ 287 /* port-E for HP out (front panel) */
@@ -528,7 +528,7 @@ static int cmi9880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
528 528
529/* 529/*
530 */ 530 */
531static struct hda_pcm_stream cmi9880_pcm_analog_playback = { 531static const struct hda_pcm_stream cmi9880_pcm_analog_playback = {
532 .substreams = 1, 532 .substreams = 1,
533 .channels_min = 2, 533 .channels_min = 2,
534 .channels_max = 8, 534 .channels_max = 8,
@@ -540,7 +540,7 @@ static struct hda_pcm_stream cmi9880_pcm_analog_playback = {
540 }, 540 },
541}; 541};
542 542
543static struct hda_pcm_stream cmi9880_pcm_analog_capture = { 543static const struct hda_pcm_stream cmi9880_pcm_analog_capture = {
544 .substreams = 2, 544 .substreams = 2,
545 .channels_min = 2, 545 .channels_min = 2,
546 .channels_max = 2, 546 .channels_max = 2,
@@ -551,7 +551,7 @@ static struct hda_pcm_stream cmi9880_pcm_analog_capture = {
551 }, 551 },
552}; 552};
553 553
554static struct hda_pcm_stream cmi9880_pcm_digital_playback = { 554static const struct hda_pcm_stream cmi9880_pcm_digital_playback = {
555 .substreams = 1, 555 .substreams = 1,
556 .channels_min = 2, 556 .channels_min = 2,
557 .channels_max = 2, 557 .channels_max = 2,
@@ -563,7 +563,7 @@ static struct hda_pcm_stream cmi9880_pcm_digital_playback = {
563 }, 563 },
564}; 564};
565 565
566static struct hda_pcm_stream cmi9880_pcm_digital_capture = { 566static const struct hda_pcm_stream cmi9880_pcm_digital_capture = {
567 .substreams = 1, 567 .substreams = 1,
568 .channels_min = 2, 568 .channels_min = 2,
569 .channels_max = 2, 569 .channels_max = 2,
@@ -617,14 +617,14 @@ static const char * const cmi9880_models[CMI_MODELS] = {
617 [CMI_AUTO] = "auto", 617 [CMI_AUTO] = "auto",
618}; 618};
619 619
620static struct snd_pci_quirk cmi9880_cfg_tbl[] = { 620static const struct snd_pci_quirk cmi9880_cfg_tbl[] = {
621 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG), 621 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG),
622 SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL), 622 SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL),
623 SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG), 623 SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG),
624 {} /* terminator */ 624 {} /* terminator */
625}; 625};
626 626
627static struct hda_codec_ops cmi9880_patch_ops = { 627static const struct hda_codec_ops cmi9880_patch_ops = {
628 .build_controls = cmi9880_build_controls, 628 .build_controls = cmi9880_build_controls,
629 .build_pcms = cmi9880_build_pcms, 629 .build_pcms = cmi9880_build_pcms,
630 .init = cmi9880_init, 630 .init = cmi9880_init,
@@ -745,7 +745,7 @@ static int patch_cmi9880(struct hda_codec *codec)
745/* 745/*
746 * patch entries 746 * patch entries
747 */ 747 */
748static struct hda_codec_preset snd_hda_preset_cmedia[] = { 748static const struct hda_codec_preset snd_hda_preset_cmedia[] = {
749 { .id = 0x13f69880, .name = "CMI9880", .patch = patch_cmi9880 }, 749 { .id = 0x13f69880, .name = "CMI9880", .patch = patch_cmi9880 },
750 { .id = 0x434d4980, .name = "CMI9880", .patch = patch_cmi9880 }, 750 { .id = 0x434d4980, .name = "CMI9880", .patch = patch_cmi9880 },
751 {} /* terminator */ 751 {} /* terminator */