aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 05:38:21 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-02 06:20:31 -0400
commit34cbe3a6faa8715c4f9e07484248aa32c1c7577e (patch)
tree9ad69b96990c12b2c07503a9d1abd95ad347f15a /sound/pci/hda/patch_conexant.c
parentc42d47829a8e62bd00b551782760d836d65d8888 (diff)
ALSA: hda - Constify fixup and other array data in patch_conexant.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c190
1 files changed, 95 insertions, 95 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index ad97d937d3a8..35bebe59908d 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -57,7 +57,7 @@ struct pin_dac_pair {
57 57
58struct conexant_spec { 58struct conexant_spec {
59 59
60 struct snd_kcontrol_new *mixers[5]; 60 const struct snd_kcontrol_new *mixers[5];
61 int num_mixers; 61 int num_mixers;
62 hda_nid_t vmaster_nid; 62 hda_nid_t vmaster_nid;
63 63
@@ -81,7 +81,7 @@ struct conexant_spec {
81 81
82 /* capture */ 82 /* capture */
83 unsigned int num_adc_nids; 83 unsigned int num_adc_nids;
84 hda_nid_t *adc_nids; 84 const hda_nid_t *adc_nids;
85 hda_nid_t dig_in_nid; /* digital-in NID; optional */ 85 hda_nid_t dig_in_nid; /* digital-in NID; optional */
86 86
87 unsigned int cur_adc_idx; 87 unsigned int cur_adc_idx;
@@ -91,7 +91,7 @@ struct conexant_spec {
91 91
92 /* capture source */ 92 /* capture source */
93 const struct hda_input_mux *input_mux; 93 const struct hda_input_mux *input_mux;
94 hda_nid_t *capsrc_nids; 94 const hda_nid_t *capsrc_nids;
95 unsigned int cur_mux[3]; 95 unsigned int cur_mux[3];
96 96
97 /* channel model */ 97 /* channel model */
@@ -227,7 +227,7 @@ static int conexant_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
227 227
228 228
229 229
230static struct hda_pcm_stream conexant_pcm_analog_playback = { 230static const struct hda_pcm_stream conexant_pcm_analog_playback = {
231 .substreams = 1, 231 .substreams = 1,
232 .channels_min = 2, 232 .channels_min = 2,
233 .channels_max = 2, 233 .channels_max = 2,
@@ -239,7 +239,7 @@ static struct hda_pcm_stream conexant_pcm_analog_playback = {
239 }, 239 },
240}; 240};
241 241
242static struct hda_pcm_stream conexant_pcm_analog_capture = { 242static const struct hda_pcm_stream conexant_pcm_analog_capture = {
243 .substreams = 1, 243 .substreams = 1,
244 .channels_min = 2, 244 .channels_min = 2,
245 .channels_max = 2, 245 .channels_max = 2,
@@ -251,7 +251,7 @@ static struct hda_pcm_stream conexant_pcm_analog_capture = {
251}; 251};
252 252
253 253
254static struct hda_pcm_stream conexant_pcm_digital_playback = { 254static const struct hda_pcm_stream conexant_pcm_digital_playback = {
255 .substreams = 1, 255 .substreams = 1,
256 .channels_min = 2, 256 .channels_min = 2,
257 .channels_max = 2, 257 .channels_max = 2,
@@ -263,7 +263,7 @@ static struct hda_pcm_stream conexant_pcm_digital_playback = {
263 }, 263 },
264}; 264};
265 265
266static struct hda_pcm_stream conexant_pcm_digital_capture = { 266static const struct hda_pcm_stream conexant_pcm_digital_capture = {
267 .substreams = 1, 267 .substreams = 1,
268 .channels_min = 2, 268 .channels_min = 2,
269 .channels_max = 2, 269 .channels_max = 2,
@@ -294,7 +294,7 @@ static int cx5051_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
294 return 0; 294 return 0;
295} 295}
296 296
297static struct hda_pcm_stream cx5051_pcm_analog_capture = { 297static const struct hda_pcm_stream cx5051_pcm_analog_capture = {
298 .substreams = 1, 298 .substreams = 1,
299 .channels_min = 2, 299 .channels_min = 2,
300 .channels_max = 2, 300 .channels_max = 2,
@@ -433,7 +433,7 @@ static void conexant_free(struct hda_codec *codec)
433 kfree(codec->spec); 433 kfree(codec->spec);
434} 434}
435 435
436static struct snd_kcontrol_new cxt_capture_mixers[] = { 436static const struct snd_kcontrol_new cxt_capture_mixers[] = {
437 { 437 {
438 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 438 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
439 .name = "Capture Source", 439 .name = "Capture Source",
@@ -446,7 +446,7 @@ static struct snd_kcontrol_new cxt_capture_mixers[] = {
446 446
447#ifdef CONFIG_SND_HDA_INPUT_BEEP 447#ifdef CONFIG_SND_HDA_INPUT_BEEP
448/* additional beep mixers; the actual parameters are overwritten at build */ 448/* additional beep mixers; the actual parameters are overwritten at build */
449static struct snd_kcontrol_new cxt_beep_mixer[] = { 449static const struct snd_kcontrol_new cxt_beep_mixer[] = {
450 HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0, 1, 0, HDA_OUTPUT), 450 HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0, 1, 0, HDA_OUTPUT),
451 HDA_CODEC_MUTE_BEEP_MONO("Beep Playback Switch", 0, 1, 0, HDA_OUTPUT), 451 HDA_CODEC_MUTE_BEEP_MONO("Beep Playback Switch", 0, 1, 0, HDA_OUTPUT),
452 { } /* end */ 452 { } /* end */
@@ -521,7 +521,7 @@ static int conexant_build_controls(struct hda_codec *codec)
521#ifdef CONFIG_SND_HDA_INPUT_BEEP 521#ifdef CONFIG_SND_HDA_INPUT_BEEP
522 /* create beep controls if needed */ 522 /* create beep controls if needed */
523 if (spec->beep_amp) { 523 if (spec->beep_amp) {
524 struct snd_kcontrol_new *knew; 524 const struct snd_kcontrol_new *knew;
525 for (knew = cxt_beep_mixer; knew->name; knew++) { 525 for (knew = cxt_beep_mixer; knew->name; knew++) {
526 struct snd_kcontrol *kctl; 526 struct snd_kcontrol *kctl;
527 kctl = snd_ctl_new1(knew, codec); 527 kctl = snd_ctl_new1(knew, codec);
@@ -546,7 +546,7 @@ static int conexant_suspend(struct hda_codec *codec, pm_message_t state)
546} 546}
547#endif 547#endif
548 548
549static struct hda_codec_ops conexant_patch_ops = { 549static const struct hda_codec_ops conexant_patch_ops = {
550 .build_controls = conexant_build_controls, 550 .build_controls = conexant_build_controls,
551 .build_pcms = conexant_build_pcms, 551 .build_pcms = conexant_build_pcms,
552 .init = conexant_init, 552 .init = conexant_init,
@@ -662,16 +662,16 @@ static int conexant_ch_mode_put(struct snd_kcontrol *kcontrol,
662 662
663/* Conexant 5045 specific */ 663/* Conexant 5045 specific */
664 664
665static hda_nid_t cxt5045_dac_nids[1] = { 0x19 }; 665static const hda_nid_t cxt5045_dac_nids[1] = { 0x19 };
666static hda_nid_t cxt5045_adc_nids[1] = { 0x1a }; 666static const hda_nid_t cxt5045_adc_nids[1] = { 0x1a };
667static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a }; 667static const hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a };
668#define CXT5045_SPDIF_OUT 0x18 668#define CXT5045_SPDIF_OUT 0x18
669 669
670static struct hda_channel_mode cxt5045_modes[1] = { 670static const struct hda_channel_mode cxt5045_modes[1] = {
671 { 2, NULL }, 671 { 2, NULL },
672}; 672};
673 673
674static struct hda_input_mux cxt5045_capture_source = { 674static const struct hda_input_mux cxt5045_capture_source = {
675 .num_items = 2, 675 .num_items = 2,
676 .items = { 676 .items = {
677 { "IntMic", 0x1 }, 677 { "IntMic", 0x1 },
@@ -679,7 +679,7 @@ static struct hda_input_mux cxt5045_capture_source = {
679 } 679 }
680}; 680};
681 681
682static struct hda_input_mux cxt5045_capture_source_benq = { 682static const struct hda_input_mux cxt5045_capture_source_benq = {
683 .num_items = 5, 683 .num_items = 5,
684 .items = { 684 .items = {
685 { "IntMic", 0x1 }, 685 { "IntMic", 0x1 },
@@ -690,7 +690,7 @@ static struct hda_input_mux cxt5045_capture_source_benq = {
690 } 690 }
691}; 691};
692 692
693static struct hda_input_mux cxt5045_capture_source_hp530 = { 693static const struct hda_input_mux cxt5045_capture_source_hp530 = {
694 .num_items = 2, 694 .num_items = 2,
695 .items = { 695 .items = {
696 { "ExtMic", 0x1 }, 696 { "ExtMic", 0x1 },
@@ -723,7 +723,7 @@ static int cxt5045_hp_master_sw_put(struct snd_kcontrol *kcontrol,
723} 723}
724 724
725/* bind volumes of both NID 0x10 and 0x11 */ 725/* bind volumes of both NID 0x10 and 0x11 */
726static struct hda_bind_ctls cxt5045_hp_bind_master_vol = { 726static const struct hda_bind_ctls cxt5045_hp_bind_master_vol = {
727 .ops = &snd_hda_bind_vol, 727 .ops = &snd_hda_bind_vol,
728 .values = { 728 .values = {
729 HDA_COMPOSE_AMP_VAL(0x10, 3, 0, HDA_OUTPUT), 729 HDA_COMPOSE_AMP_VAL(0x10, 3, 0, HDA_OUTPUT),
@@ -735,12 +735,12 @@ static struct hda_bind_ctls cxt5045_hp_bind_master_vol = {
735/* toggle input of built-in and mic jack appropriately */ 735/* toggle input of built-in and mic jack appropriately */
736static void cxt5045_hp_automic(struct hda_codec *codec) 736static void cxt5045_hp_automic(struct hda_codec *codec)
737{ 737{
738 static struct hda_verb mic_jack_on[] = { 738 static const struct hda_verb mic_jack_on[] = {
739 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 739 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
740 {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 740 {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
741 {} 741 {}
742 }; 742 };
743 static struct hda_verb mic_jack_off[] = { 743 static const struct hda_verb mic_jack_off[] = {
744 {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 744 {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
745 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 745 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
746 {} 746 {}
@@ -784,7 +784,7 @@ static void cxt5045_hp_unsol_event(struct hda_codec *codec,
784 } 784 }
785} 785}
786 786
787static struct snd_kcontrol_new cxt5045_mixers[] = { 787static const struct snd_kcontrol_new cxt5045_mixers[] = {
788 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), 788 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
789 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), 789 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT),
790 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), 790 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
@@ -808,7 +808,7 @@ static struct snd_kcontrol_new cxt5045_mixers[] = {
808 {} 808 {}
809}; 809};
810 810
811static struct snd_kcontrol_new cxt5045_benq_mixers[] = { 811static const struct snd_kcontrol_new cxt5045_benq_mixers[] = {
812 HDA_CODEC_VOLUME("CD Capture Volume", 0x1a, 0x04, HDA_INPUT), 812 HDA_CODEC_VOLUME("CD Capture Volume", 0x1a, 0x04, HDA_INPUT),
813 HDA_CODEC_MUTE("CD Capture Switch", 0x1a, 0x04, HDA_INPUT), 813 HDA_CODEC_MUTE("CD Capture Switch", 0x1a, 0x04, HDA_INPUT),
814 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x4, HDA_INPUT), 814 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x4, HDA_INPUT),
@@ -825,7 +825,7 @@ static struct snd_kcontrol_new cxt5045_benq_mixers[] = {
825 {} 825 {}
826}; 826};
827 827
828static struct snd_kcontrol_new cxt5045_mixers_hp530[] = { 828static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = {
829 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), 829 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
830 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), 830 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT),
831 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), 831 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
@@ -849,7 +849,7 @@ static struct snd_kcontrol_new cxt5045_mixers_hp530[] = {
849 {} 849 {}
850}; 850};
851 851
852static struct hda_verb cxt5045_init_verbs[] = { 852static const struct hda_verb cxt5045_init_verbs[] = {
853 /* Line in, Mic */ 853 /* Line in, Mic */
854 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, 854 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
855 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, 855 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
@@ -875,7 +875,7 @@ static struct hda_verb cxt5045_init_verbs[] = {
875 { } /* end */ 875 { } /* end */
876}; 876};
877 877
878static struct hda_verb cxt5045_benq_init_verbs[] = { 878static const struct hda_verb cxt5045_benq_init_verbs[] = {
879 /* Internal Mic, Mic */ 879 /* Internal Mic, Mic */
880 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, 880 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
881 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, 881 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
@@ -901,13 +901,13 @@ static struct hda_verb cxt5045_benq_init_verbs[] = {
901 { } /* end */ 901 { } /* end */
902}; 902};
903 903
904static struct hda_verb cxt5045_hp_sense_init_verbs[] = { 904static const struct hda_verb cxt5045_hp_sense_init_verbs[] = {
905 /* pin sensing on HP jack */ 905 /* pin sensing on HP jack */
906 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT}, 906 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
907 { } /* end */ 907 { } /* end */
908}; 908};
909 909
910static struct hda_verb cxt5045_mic_sense_init_verbs[] = { 910static const struct hda_verb cxt5045_mic_sense_init_verbs[] = {
911 /* pin sensing on HP jack */ 911 /* pin sensing on HP jack */
912 {0x12, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT}, 912 {0x12, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT},
913 { } /* end */ 913 { } /* end */
@@ -917,7 +917,7 @@ static struct hda_verb cxt5045_mic_sense_init_verbs[] = {
917/* Test configuration for debugging, modelled after the ALC260 test 917/* Test configuration for debugging, modelled after the ALC260 test
918 * configuration. 918 * configuration.
919 */ 919 */
920static struct hda_input_mux cxt5045_test_capture_source = { 920static const struct hda_input_mux cxt5045_test_capture_source = {
921 .num_items = 5, 921 .num_items = 5,
922 .items = { 922 .items = {
923 { "MIXER", 0x0 }, 923 { "MIXER", 0x0 },
@@ -928,7 +928,7 @@ static struct hda_input_mux cxt5045_test_capture_source = {
928 }, 928 },
929}; 929};
930 930
931static struct snd_kcontrol_new cxt5045_test_mixer[] = { 931static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
932 932
933 /* Output controls */ 933 /* Output controls */
934 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT), 934 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT),
@@ -978,7 +978,7 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
978 { } /* end */ 978 { } /* end */
979}; 979};
980 980
981static struct hda_verb cxt5045_test_init_verbs[] = { 981static const struct hda_verb cxt5045_test_init_verbs[] = {
982 /* Set connections */ 982 /* Set connections */
983 { 0x10, AC_VERB_SET_CONNECT_SEL, 0x0 }, 983 { 0x10, AC_VERB_SET_CONNECT_SEL, 0x0 },
984 { 0x11, AC_VERB_SET_CONNECT_SEL, 0x0 }, 984 { 0x11, AC_VERB_SET_CONNECT_SEL, 0x0 },
@@ -1061,7 +1061,7 @@ static const char * const cxt5045_models[CXT5045_MODELS] = {
1061#endif 1061#endif
1062}; 1062};
1063 1063
1064static struct snd_pci_quirk cxt5045_cfg_tbl[] = { 1064static const struct snd_pci_quirk cxt5045_cfg_tbl[] = {
1065 SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HP530), 1065 SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HP530),
1066 SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series", 1066 SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series",
1067 CXT5045_LAPTOP_HPSENSE), 1067 CXT5045_LAPTOP_HPSENSE),
@@ -1196,15 +1196,15 @@ static int patch_cxt5045(struct hda_codec *codec)
1196/* Conexant 5047 specific */ 1196/* Conexant 5047 specific */
1197#define CXT5047_SPDIF_OUT 0x11 1197#define CXT5047_SPDIF_OUT 0x11
1198 1198
1199static hda_nid_t cxt5047_dac_nids[1] = { 0x10 }; /* 0x1c */ 1199static const hda_nid_t cxt5047_dac_nids[1] = { 0x10 }; /* 0x1c */
1200static hda_nid_t cxt5047_adc_nids[1] = { 0x12 }; 1200static const hda_nid_t cxt5047_adc_nids[1] = { 0x12 };
1201static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a }; 1201static const hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a };
1202 1202
1203static struct hda_channel_mode cxt5047_modes[1] = { 1203static const struct hda_channel_mode cxt5047_modes[1] = {
1204 { 2, NULL }, 1204 { 2, NULL },
1205}; 1205};
1206 1206
1207static struct hda_input_mux cxt5047_toshiba_capture_source = { 1207static const struct hda_input_mux cxt5047_toshiba_capture_source = {
1208 .num_items = 2, 1208 .num_items = 2,
1209 .items = { 1209 .items = {
1210 { "ExtMic", 0x2 }, 1210 { "ExtMic", 0x2 },
@@ -1256,12 +1256,12 @@ static void cxt5047_hp_automute(struct hda_codec *codec)
1256/* toggle input of built-in and mic jack appropriately */ 1256/* toggle input of built-in and mic jack appropriately */
1257static void cxt5047_hp_automic(struct hda_codec *codec) 1257static void cxt5047_hp_automic(struct hda_codec *codec)
1258{ 1258{
1259 static struct hda_verb mic_jack_on[] = { 1259 static const struct hda_verb mic_jack_on[] = {
1260 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 1260 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1261 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1261 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1262 {} 1262 {}
1263 }; 1263 };
1264 static struct hda_verb mic_jack_off[] = { 1264 static const struct hda_verb mic_jack_off[] = {
1265 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 1265 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1266 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1266 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1267 {} 1267 {}
@@ -1289,7 +1289,7 @@ static void cxt5047_hp_unsol_event(struct hda_codec *codec,
1289 } 1289 }
1290} 1290}
1291 1291
1292static struct snd_kcontrol_new cxt5047_base_mixers[] = { 1292static const struct snd_kcontrol_new cxt5047_base_mixers[] = {
1293 HDA_CODEC_VOLUME("Mic Playback Volume", 0x19, 0x02, HDA_INPUT), 1293 HDA_CODEC_VOLUME("Mic Playback Volume", 0x19, 0x02, HDA_INPUT),
1294 HDA_CODEC_MUTE("Mic Playback Switch", 0x19, 0x02, HDA_INPUT), 1294 HDA_CODEC_MUTE("Mic Playback Switch", 0x19, 0x02, HDA_INPUT),
1295 HDA_CODEC_VOLUME("Mic Boost Volume", 0x1a, 0x0, HDA_OUTPUT), 1295 HDA_CODEC_VOLUME("Mic Boost Volume", 0x1a, 0x0, HDA_OUTPUT),
@@ -1309,19 +1309,19 @@ static struct snd_kcontrol_new cxt5047_base_mixers[] = {
1309 {} 1309 {}
1310}; 1310};
1311 1311
1312static struct snd_kcontrol_new cxt5047_hp_spk_mixers[] = { 1312static const struct snd_kcontrol_new cxt5047_hp_spk_mixers[] = {
1313 /* See the note in cxt5047_hp_master_sw_put */ 1313 /* See the note in cxt5047_hp_master_sw_put */
1314 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x01, HDA_OUTPUT), 1314 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x01, HDA_OUTPUT),
1315 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x13, 0x00, HDA_OUTPUT), 1315 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x13, 0x00, HDA_OUTPUT),
1316 {} 1316 {}
1317}; 1317};
1318 1318
1319static struct snd_kcontrol_new cxt5047_hp_only_mixers[] = { 1319static const struct snd_kcontrol_new cxt5047_hp_only_mixers[] = {
1320 HDA_CODEC_VOLUME("Master Playback Volume", 0x13, 0x00, HDA_OUTPUT), 1320 HDA_CODEC_VOLUME("Master Playback Volume", 0x13, 0x00, HDA_OUTPUT),
1321 { } /* end */ 1321 { } /* end */
1322}; 1322};
1323 1323
1324static struct hda_verb cxt5047_init_verbs[] = { 1324static const struct hda_verb cxt5047_init_verbs[] = {
1325 /* Line in, Mic, Built-in Mic */ 1325 /* Line in, Mic, Built-in Mic */
1326 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, 1326 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
1327 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, 1327 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
@@ -1348,7 +1348,7 @@ static struct hda_verb cxt5047_init_verbs[] = {
1348}; 1348};
1349 1349
1350/* configuration for Toshiba Laptops */ 1350/* configuration for Toshiba Laptops */
1351static struct hda_verb cxt5047_toshiba_init_verbs[] = { 1351static const struct hda_verb cxt5047_toshiba_init_verbs[] = {
1352 {0x13, AC_VERB_SET_EAPD_BTLENABLE, 0x0}, /* default off */ 1352 {0x13, AC_VERB_SET_EAPD_BTLENABLE, 0x0}, /* default off */
1353 {} 1353 {}
1354}; 1354};
@@ -1357,7 +1357,7 @@ static struct hda_verb cxt5047_toshiba_init_verbs[] = {
1357 * configuration. 1357 * configuration.
1358 */ 1358 */
1359#ifdef CONFIG_SND_DEBUG 1359#ifdef CONFIG_SND_DEBUG
1360static struct hda_input_mux cxt5047_test_capture_source = { 1360static const struct hda_input_mux cxt5047_test_capture_source = {
1361 .num_items = 4, 1361 .num_items = 4,
1362 .items = { 1362 .items = {
1363 { "LINE1 pin", 0x0 }, 1363 { "LINE1 pin", 0x0 },
@@ -1367,7 +1367,7 @@ static struct hda_input_mux cxt5047_test_capture_source = {
1367 }, 1367 },
1368}; 1368};
1369 1369
1370static struct snd_kcontrol_new cxt5047_test_mixer[] = { 1370static const struct snd_kcontrol_new cxt5047_test_mixer[] = {
1371 1371
1372 /* Output only controls */ 1372 /* Output only controls */
1373 HDA_CODEC_VOLUME("OutAmp-1 Volume", 0x10, 0x0, HDA_OUTPUT), 1373 HDA_CODEC_VOLUME("OutAmp-1 Volume", 0x10, 0x0, HDA_OUTPUT),
@@ -1420,7 +1420,7 @@ static struct snd_kcontrol_new cxt5047_test_mixer[] = {
1420 { } /* end */ 1420 { } /* end */
1421}; 1421};
1422 1422
1423static struct hda_verb cxt5047_test_init_verbs[] = { 1423static const struct hda_verb cxt5047_test_init_verbs[] = {
1424 /* Enable retasking pins as output, initially without power amp */ 1424 /* Enable retasking pins as output, initially without power amp */
1425 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1425 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1426 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1426 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1504,7 +1504,7 @@ static const char * const cxt5047_models[CXT5047_MODELS] = {
1504#endif 1504#endif
1505}; 1505};
1506 1506
1507static struct snd_pci_quirk cxt5047_cfg_tbl[] = { 1507static const struct snd_pci_quirk cxt5047_cfg_tbl[] = {
1508 SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), 1508 SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP),
1509 SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series", 1509 SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series",
1510 CXT5047_LAPTOP), 1510 CXT5047_LAPTOP),
@@ -1591,10 +1591,10 @@ static int patch_cxt5047(struct hda_codec *codec)
1591} 1591}
1592 1592
1593/* Conexant 5051 specific */ 1593/* Conexant 5051 specific */
1594static hda_nid_t cxt5051_dac_nids[1] = { 0x10 }; 1594static const hda_nid_t cxt5051_dac_nids[1] = { 0x10 };
1595static hda_nid_t cxt5051_adc_nids[2] = { 0x14, 0x15 }; 1595static const hda_nid_t cxt5051_adc_nids[2] = { 0x14, 0x15 };
1596 1596
1597static struct hda_channel_mode cxt5051_modes[1] = { 1597static const struct hda_channel_mode cxt5051_modes[1] = {
1598 { 2, NULL }, 1598 { 2, NULL },
1599}; 1599};
1600 1600
@@ -1696,7 +1696,7 @@ static void cxt5051_hp_unsol_event(struct hda_codec *codec,
1696 snd_hda_input_jack_report(codec, nid); 1696 snd_hda_input_jack_report(codec, nid);
1697} 1697}
1698 1698
1699static struct snd_kcontrol_new cxt5051_playback_mixers[] = { 1699static const struct snd_kcontrol_new cxt5051_playback_mixers[] = {
1700 HDA_CODEC_VOLUME("Master Playback Volume", 0x10, 0x00, HDA_OUTPUT), 1700 HDA_CODEC_VOLUME("Master Playback Volume", 0x10, 0x00, HDA_OUTPUT),
1701 { 1701 {
1702 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1702 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1709,7 +1709,7 @@ static struct snd_kcontrol_new cxt5051_playback_mixers[] = {
1709 {} 1709 {}
1710}; 1710};
1711 1711
1712static struct snd_kcontrol_new cxt5051_capture_mixers[] = { 1712static const struct snd_kcontrol_new cxt5051_capture_mixers[] = {
1713 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), 1713 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT),
1714 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), 1714 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT),
1715 HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT), 1715 HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT),
@@ -1719,7 +1719,7 @@ static struct snd_kcontrol_new cxt5051_capture_mixers[] = {
1719 {} 1719 {}
1720}; 1720};
1721 1721
1722static struct snd_kcontrol_new cxt5051_hp_mixers[] = { 1722static const struct snd_kcontrol_new cxt5051_hp_mixers[] = {
1723 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), 1723 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT),
1724 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), 1724 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT),
1725 HDA_CODEC_VOLUME("Mic Volume", 0x15, 0x00, HDA_INPUT), 1725 HDA_CODEC_VOLUME("Mic Volume", 0x15, 0x00, HDA_INPUT),
@@ -1727,19 +1727,19 @@ static struct snd_kcontrol_new cxt5051_hp_mixers[] = {
1727 {} 1727 {}
1728}; 1728};
1729 1729
1730static struct snd_kcontrol_new cxt5051_hp_dv6736_mixers[] = { 1730static const struct snd_kcontrol_new cxt5051_hp_dv6736_mixers[] = {
1731 HDA_CODEC_VOLUME("Capture Volume", 0x14, 0x00, HDA_INPUT), 1731 HDA_CODEC_VOLUME("Capture Volume", 0x14, 0x00, HDA_INPUT),
1732 HDA_CODEC_MUTE("Capture Switch", 0x14, 0x00, HDA_INPUT), 1732 HDA_CODEC_MUTE("Capture Switch", 0x14, 0x00, HDA_INPUT),
1733 {} 1733 {}
1734}; 1734};
1735 1735
1736static struct snd_kcontrol_new cxt5051_f700_mixers[] = { 1736static const struct snd_kcontrol_new cxt5051_f700_mixers[] = {
1737 HDA_CODEC_VOLUME("Capture Volume", 0x14, 0x01, HDA_INPUT), 1737 HDA_CODEC_VOLUME("Capture Volume", 0x14, 0x01, HDA_INPUT),
1738 HDA_CODEC_MUTE("Capture Switch", 0x14, 0x01, HDA_INPUT), 1738 HDA_CODEC_MUTE("Capture Switch", 0x14, 0x01, HDA_INPUT),
1739 {} 1739 {}
1740}; 1740};
1741 1741
1742static struct snd_kcontrol_new cxt5051_toshiba_mixers[] = { 1742static const struct snd_kcontrol_new cxt5051_toshiba_mixers[] = {
1743 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), 1743 HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT),
1744 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), 1744 HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT),
1745 HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT), 1745 HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT),
@@ -1747,7 +1747,7 @@ static struct snd_kcontrol_new cxt5051_toshiba_mixers[] = {
1747 {} 1747 {}
1748}; 1748};
1749 1749
1750static struct hda_verb cxt5051_init_verbs[] = { 1750static const struct hda_verb cxt5051_init_verbs[] = {
1751 /* Line in, Mic */ 1751 /* Line in, Mic */
1752 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03}, 1752 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03},
1753 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 1753 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -1776,7 +1776,7 @@ static struct hda_verb cxt5051_init_verbs[] = {
1776 { } /* end */ 1776 { } /* end */
1777}; 1777};
1778 1778
1779static struct hda_verb cxt5051_hp_dv6736_init_verbs[] = { 1779static const struct hda_verb cxt5051_hp_dv6736_init_verbs[] = {
1780 /* Line in, Mic */ 1780 /* Line in, Mic */
1781 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03}, 1781 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03},
1782 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 1782 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -1801,7 +1801,7 @@ static struct hda_verb cxt5051_hp_dv6736_init_verbs[] = {
1801 { } /* end */ 1801 { } /* end */
1802}; 1802};
1803 1803
1804static struct hda_verb cxt5051_lenovo_x200_init_verbs[] = { 1804static const struct hda_verb cxt5051_lenovo_x200_init_verbs[] = {
1805 /* Line in, Mic */ 1805 /* Line in, Mic */
1806 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03}, 1806 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03},
1807 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 1807 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -1834,7 +1834,7 @@ static struct hda_verb cxt5051_lenovo_x200_init_verbs[] = {
1834 { } /* end */ 1834 { } /* end */
1835}; 1835};
1836 1836
1837static struct hda_verb cxt5051_f700_init_verbs[] = { 1837static const struct hda_verb cxt5051_f700_init_verbs[] = {
1838 /* Line in, Mic */ 1838 /* Line in, Mic */
1839 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03}, 1839 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x03},
1840 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 1840 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -1869,7 +1869,7 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid,
1869 snd_hda_input_jack_report(codec, nid); 1869 snd_hda_input_jack_report(codec, nid);
1870} 1870}
1871 1871
1872static struct hda_verb cxt5051_ideapad_init_verbs[] = { 1872static const struct hda_verb cxt5051_ideapad_init_verbs[] = {
1873 /* Subwoofer */ 1873 /* Subwoofer */
1874 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1874 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1875 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, 1875 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -1919,7 +1919,7 @@ static const char *const cxt5051_models[CXT5051_MODELS] = {
1919 [CXT5051_IDEAPAD] = "ideapad", 1919 [CXT5051_IDEAPAD] = "ideapad",
1920}; 1920};
1921 1921
1922static struct snd_pci_quirk cxt5051_cfg_tbl[] = { 1922static const struct snd_pci_quirk cxt5051_cfg_tbl[] = {
1923 SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736), 1923 SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736),
1924 SND_PCI_QUIRK(0x103c, 0x360b, "Compaq Presario CQ60", CXT5051_HP), 1924 SND_PCI_QUIRK(0x103c, 0x360b, "Compaq Presario CQ60", CXT5051_HP),
1925 SND_PCI_QUIRK(0x103c, 0x30ea, "Compaq Presario F700", CXT5051_F700), 1925 SND_PCI_QUIRK(0x103c, 0x30ea, "Compaq Presario F700", CXT5051_F700),
@@ -2011,17 +2011,17 @@ static int patch_cxt5051(struct hda_codec *codec)
2011 2011
2012/* Conexant 5066 specific */ 2012/* Conexant 5066 specific */
2013 2013
2014static hda_nid_t cxt5066_dac_nids[1] = { 0x10 }; 2014static const hda_nid_t cxt5066_dac_nids[1] = { 0x10 };
2015static hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 }; 2015static const hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 };
2016static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; 2016static const hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 };
2017static hda_nid_t cxt5066_digout_pin_nids[2] = { 0x20, 0x22 }; 2017static const hda_nid_t cxt5066_digout_pin_nids[2] = { 0x20, 0x22 };
2018 2018
2019/* OLPC's microphone port is DC coupled for use with external sensors, 2019/* OLPC's microphone port is DC coupled for use with external sensors,
2020 * therefore we use a 50% mic bias in order to center the input signal with 2020 * therefore we use a 50% mic bias in order to center the input signal with
2021 * the DC input range of the codec. */ 2021 * the DC input range of the codec. */
2022#define CXT5066_OLPC_EXT_MIC_BIAS PIN_VREF50 2022#define CXT5066_OLPC_EXT_MIC_BIAS PIN_VREF50
2023 2023
2024static struct hda_channel_mode cxt5066_modes[1] = { 2024static const struct hda_channel_mode cxt5066_modes[1] = {
2025 { 2, NULL }, 2025 { 2, NULL },
2026}; 2026};
2027 2027
@@ -2176,7 +2176,7 @@ static void cxt5066_vostro_automic(struct hda_codec *codec)
2176 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2176 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
2177 {} 2177 {}
2178 }; 2178 };
2179 static struct hda_verb ext_mic_absent[] = { 2179 static const struct hda_verb ext_mic_absent[] = {
2180 /* enable internal mic, port C */ 2180 /* enable internal mic, port C */
2181 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 2181 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
2182 2182
@@ -2209,7 +2209,7 @@ static void cxt5066_ideapad_automic(struct hda_codec *codec)
2209 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2209 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
2210 {} 2210 {}
2211 }; 2211 };
2212 static struct hda_verb ext_mic_absent[] = { 2212 static const struct hda_verb ext_mic_absent[] = {
2213 {0x14, AC_VERB_SET_CONNECT_SEL, 2}, 2213 {0x14, AC_VERB_SET_CONNECT_SEL, 2},
2214 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 2214 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
2215 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2215 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
@@ -2257,7 +2257,7 @@ static void cxt5066_thinkpad_automic(struct hda_codec *codec)
2257{ 2257{
2258 unsigned int ext_present, dock_present; 2258 unsigned int ext_present, dock_present;
2259 2259
2260 static struct hda_verb ext_mic_present[] = { 2260 static const struct hda_verb ext_mic_present[] = {
2261 {0x14, AC_VERB_SET_CONNECT_SEL, 0}, 2261 {0x14, AC_VERB_SET_CONNECT_SEL, 0},
2262 {0x17, AC_VERB_SET_CONNECT_SEL, 1}, 2262 {0x17, AC_VERB_SET_CONNECT_SEL, 1},
2263 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 2263 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -2265,7 +2265,7 @@ static void cxt5066_thinkpad_automic(struct hda_codec *codec)
2265 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2265 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
2266 {} 2266 {}
2267 }; 2267 };
2268 static struct hda_verb dock_mic_present[] = { 2268 static const struct hda_verb dock_mic_present[] = {
2269 {0x14, AC_VERB_SET_CONNECT_SEL, 0}, 2269 {0x14, AC_VERB_SET_CONNECT_SEL, 0},
2270 {0x17, AC_VERB_SET_CONNECT_SEL, 0}, 2270 {0x17, AC_VERB_SET_CONNECT_SEL, 0},
2271 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 2271 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -2273,7 +2273,7 @@ static void cxt5066_thinkpad_automic(struct hda_codec *codec)
2273 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2273 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
2274 {} 2274 {}
2275 }; 2275 };
2276 static struct hda_verb ext_mic_absent[] = { 2276 static const struct hda_verb ext_mic_absent[] = {
2277 {0x14, AC_VERB_SET_CONNECT_SEL, 2}, 2277 {0x14, AC_VERB_SET_CONNECT_SEL, 2},
2278 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 2278 {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
2279 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2279 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
@@ -2537,7 +2537,7 @@ static void cxt5066_olpc_capture_cleanup(struct hda_codec *codec)
2537} 2537}
2538 2538
2539static void conexant_check_dig_outs(struct hda_codec *codec, 2539static void conexant_check_dig_outs(struct hda_codec *codec,
2540 hda_nid_t *dig_pins, 2540 const hda_nid_t *dig_pins,
2541 int num_pins) 2541 int num_pins)
2542{ 2542{
2543 struct conexant_spec *spec = codec->spec; 2543 struct conexant_spec *spec = codec->spec;
@@ -2557,7 +2557,7 @@ static void conexant_check_dig_outs(struct hda_codec *codec,
2557 } 2557 }
2558} 2558}
2559 2559
2560static struct hda_input_mux cxt5066_capture_source = { 2560static const struct hda_input_mux cxt5066_capture_source = {
2561 .num_items = 4, 2561 .num_items = 4,
2562 .items = { 2562 .items = {
2563 { "Mic B", 0 }, 2563 { "Mic B", 0 },
@@ -2567,7 +2567,7 @@ static struct hda_input_mux cxt5066_capture_source = {
2567 }, 2567 },
2568}; 2568};
2569 2569
2570static struct hda_bind_ctls cxt5066_bind_capture_vol_others = { 2570static const struct hda_bind_ctls cxt5066_bind_capture_vol_others = {
2571 .ops = &snd_hda_bind_vol, 2571 .ops = &snd_hda_bind_vol,
2572 .values = { 2572 .values = {
2573 HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_INPUT), 2573 HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_INPUT),
@@ -2576,7 +2576,7 @@ static struct hda_bind_ctls cxt5066_bind_capture_vol_others = {
2576 }, 2576 },
2577}; 2577};
2578 2578
2579static struct hda_bind_ctls cxt5066_bind_capture_sw_others = { 2579static const struct hda_bind_ctls cxt5066_bind_capture_sw_others = {
2580 .ops = &snd_hda_bind_sw, 2580 .ops = &snd_hda_bind_sw,
2581 .values = { 2581 .values = {
2582 HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_INPUT), 2582 HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_INPUT),
@@ -2585,12 +2585,12 @@ static struct hda_bind_ctls cxt5066_bind_capture_sw_others = {
2585 }, 2585 },
2586}; 2586};
2587 2587
2588static struct snd_kcontrol_new cxt5066_mixer_master[] = { 2588static const struct snd_kcontrol_new cxt5066_mixer_master[] = {
2589 HDA_CODEC_VOLUME("Master Playback Volume", 0x10, 0x00, HDA_OUTPUT), 2589 HDA_CODEC_VOLUME("Master Playback Volume", 0x10, 0x00, HDA_OUTPUT),
2590 {} 2590 {}
2591}; 2591};
2592 2592
2593static struct snd_kcontrol_new cxt5066_mixer_master_olpc[] = { 2593static const struct snd_kcontrol_new cxt5066_mixer_master_olpc[] = {
2594 { 2594 {
2595 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2595 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2596 .name = "Master Playback Volume", 2596 .name = "Master Playback Volume",
@@ -2609,7 +2609,7 @@ static struct snd_kcontrol_new cxt5066_mixer_master_olpc[] = {
2609 {} 2609 {}
2610}; 2610};
2611 2611
2612static struct snd_kcontrol_new cxt5066_mixer_olpc_dc[] = { 2612static const struct snd_kcontrol_new cxt5066_mixer_olpc_dc[] = {
2613 { 2613 {
2614 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2614 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2615 .name = "DC Mode Enable Switch", 2615 .name = "DC Mode Enable Switch",
@@ -2627,7 +2627,7 @@ static struct snd_kcontrol_new cxt5066_mixer_olpc_dc[] = {
2627 {} 2627 {}
2628}; 2628};
2629 2629
2630static struct snd_kcontrol_new cxt5066_mixers[] = { 2630static const struct snd_kcontrol_new cxt5066_mixers[] = {
2631 { 2631 {
2632 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2632 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2633 .name = "Master Playback Switch", 2633 .name = "Master Playback Switch",
@@ -2650,7 +2650,7 @@ static struct snd_kcontrol_new cxt5066_mixers[] = {
2650 {} 2650 {}
2651}; 2651};
2652 2652
2653static struct snd_kcontrol_new cxt5066_vostro_mixers[] = { 2653static const struct snd_kcontrol_new cxt5066_vostro_mixers[] = {
2654 { 2654 {
2655 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2655 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2656 .name = "Internal Mic Boost Capture Enum", 2656 .name = "Internal Mic Boost Capture Enum",
@@ -2662,7 +2662,7 @@ static struct snd_kcontrol_new cxt5066_vostro_mixers[] = {
2662 {} 2662 {}
2663}; 2663};
2664 2664
2665static struct hda_verb cxt5066_init_verbs[] = { 2665static const struct hda_verb cxt5066_init_verbs[] = {
2666 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */ 2666 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */
2667 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */ 2667 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */
2668 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */ 2668 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */
@@ -2717,7 +2717,7 @@ static struct hda_verb cxt5066_init_verbs[] = {
2717 { } /* end */ 2717 { } /* end */
2718}; 2718};
2719 2719
2720static struct hda_verb cxt5066_init_verbs_olpc[] = { 2720static const struct hda_verb cxt5066_init_verbs_olpc[] = {
2721 /* Port A: headphones */ 2721 /* Port A: headphones */
2722 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 2722 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
2723 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */ 2723 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */
@@ -2778,7 +2778,7 @@ static struct hda_verb cxt5066_init_verbs_olpc[] = {
2778 { } /* end */ 2778 { } /* end */
2779}; 2779};
2780 2780
2781static struct hda_verb cxt5066_init_verbs_vostro[] = { 2781static const struct hda_verb cxt5066_init_verbs_vostro[] = {
2782 /* Port A: headphones */ 2782 /* Port A: headphones */
2783 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, 2783 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
2784 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */ 2784 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */
@@ -2839,7 +2839,7 @@ static struct hda_verb cxt5066_init_verbs_vostro[] = {
2839 { } /* end */ 2839 { } /* end */
2840}; 2840};
2841 2841
2842static struct hda_verb cxt5066_init_verbs_ideapad[] = { 2842static const struct hda_verb cxt5066_init_verbs_ideapad[] = {
2843 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */ 2843 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */
2844 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */ 2844 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */
2845 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */ 2845 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */
@@ -2889,7 +2889,7 @@ static struct hda_verb cxt5066_init_verbs_ideapad[] = {
2889 { } /* end */ 2889 { } /* end */
2890}; 2890};
2891 2891
2892static struct hda_verb cxt5066_init_verbs_thinkpad[] = { 2892static const struct hda_verb cxt5066_init_verbs_thinkpad[] = {
2893 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */ 2893 {0x1e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port F */
2894 {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port E */ 2894 {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* Port E */
2895 2895
@@ -2947,13 +2947,13 @@ static struct hda_verb cxt5066_init_verbs_thinkpad[] = {
2947 { } /* end */ 2947 { } /* end */
2948}; 2948};
2949 2949
2950static struct hda_verb cxt5066_init_verbs_portd_lo[] = { 2950static const struct hda_verb cxt5066_init_verbs_portd_lo[] = {
2951 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 2951 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
2952 { } /* end */ 2952 { } /* end */
2953}; 2953};
2954 2954
2955 2955
2956static struct hda_verb cxt5066_init_verbs_hp_laptop[] = { 2956static const struct hda_verb cxt5066_init_verbs_hp_laptop[] = {
2957 {0x14, AC_VERB_SET_CONNECT_SEL, 0x0}, 2957 {0x14, AC_VERB_SET_CONNECT_SEL, 0x0},
2958 {0x19, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT}, 2958 {0x19, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
2959 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT}, 2959 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_MIC_EVENT},
@@ -3011,7 +3011,7 @@ static const char * const cxt5066_models[CXT5066_MODELS] = {
3011 [CXT5066_HP_LAPTOP] = "hp-laptop", 3011 [CXT5066_HP_LAPTOP] = "hp-laptop",
3012}; 3012};
3013 3013
3014static struct snd_pci_quirk cxt5066_cfg_tbl[] = { 3014static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {
3015 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), 3015 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD),
3016 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), 3016 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO),
3017 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), 3017 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD),
@@ -3195,7 +3195,7 @@ static int patch_cxt5066(struct hda_codec *codec)
3195 * Automatic parser for CX20641 & co 3195 * Automatic parser for CX20641 & co
3196 */ 3196 */
3197 3197
3198static hda_nid_t cx_auto_adc_nids[] = { 0x14 }; 3198static const hda_nid_t cx_auto_adc_nids[] = { 0x14 };
3199 3199
3200/* get the connection index of @nid in the widget @mux */ 3200/* get the connection index of @nid in the widget @mux */
3201static int get_connection_index(struct hda_codec *codec, hda_nid_t mux, 3201static int get_connection_index(struct hda_codec *codec, hda_nid_t mux,
@@ -3646,7 +3646,7 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename,
3646 HDA_CODEC_VOLUME(name, 0, 0, 0), 3646 HDA_CODEC_VOLUME(name, 0, 0, 0),
3647 HDA_CODEC_MUTE(name, 0, 0, 0), 3647 HDA_CODEC_MUTE(name, 0, 0, 0),
3648 }; 3648 };
3649 static char *sfx[2] = { "Volume", "Switch" }; 3649 static const char * const sfx[2] = { "Volume", "Switch" };
3650 int i, err; 3650 int i, err;
3651 3651
3652 for (i = 0; i < 2; i++) { 3652 for (i = 0; i < 2; i++) {
@@ -3791,7 +3791,7 @@ static int cx_auto_build_controls(struct hda_codec *codec)
3791 return conexant_build_controls(codec); 3791 return conexant_build_controls(codec);
3792} 3792}
3793 3793
3794static struct hda_codec_ops cx_auto_patch_ops = { 3794static const struct hda_codec_ops cx_auto_patch_ops = {
3795 .build_controls = cx_auto_build_controls, 3795 .build_controls = cx_auto_build_controls,
3796 .build_pcms = conexant_build_pcms, 3796 .build_pcms = conexant_build_pcms,
3797 .init = cx_auto_init, 3797 .init = cx_auto_init,
@@ -3830,7 +3830,7 @@ static int patch_conexant_auto(struct hda_codec *codec)
3830/* 3830/*
3831 */ 3831 */
3832 3832
3833static struct hda_codec_preset snd_hda_preset_conexant[] = { 3833static const struct hda_codec_preset snd_hda_preset_conexant[] = {
3834 { .id = 0x14f15045, .name = "CX20549 (Venice)", 3834 { .id = 0x14f15045, .name = "CX20549 (Venice)",
3835 .patch = patch_cxt5045 }, 3835 .patch = patch_cxt5045 },
3836 { .id = 0x14f15047, .name = "CX20551 (Waikiki)", 3836 { .id = 0x14f15047, .name = "CX20551 (Waikiki)",