ALSA: hda - consitify string arrays

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+95 -78
+5 -5
sound/pci/hda/hda_codec.c
··· 2134 * This function returns zero if successful or a negative error code. 2135 */ 2136 int snd_hda_add_vmaster(struct hda_codec *codec, char *name, 2137 - unsigned int *tlv, const char **slaves) 2138 { 2139 struct snd_kcontrol *kctl; 2140 - const char **s; 2141 int err; 2142 2143 for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++) ··· 3689 * If no entries are matching, the function returns a negative value. 3690 */ 3691 int snd_hda_check_board_config(struct hda_codec *codec, 3692 - int num_configs, const char **models, 3693 const struct snd_pci_quirk *tbl) 3694 { 3695 if (codec->modelname && models) { ··· 3753 * If no entries are matching, the function returns a negative value. 3754 */ 3755 int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, 3756 - int num_configs, const char **models, 3757 const struct snd_pci_quirk *tbl) 3758 { 3759 const struct snd_pci_quirk *q; ··· 4690 int check_location) 4691 { 4692 unsigned int def_conf; 4693 - static const char *mic_names[] = { 4694 "Internal Mic", "Dock Mic", "Mic", "Front Mic", "Rear Mic", 4695 }; 4696 int attr;
··· 2134 * This function returns zero if successful or a negative error code. 2135 */ 2136 int snd_hda_add_vmaster(struct hda_codec *codec, char *name, 2137 + unsigned int *tlv, const char * const *slaves) 2138 { 2139 struct snd_kcontrol *kctl; 2140 + const char * const *s; 2141 int err; 2142 2143 for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++) ··· 3689 * If no entries are matching, the function returns a negative value. 3690 */ 3691 int snd_hda_check_board_config(struct hda_codec *codec, 3692 + int num_configs, const char * const *models, 3693 const struct snd_pci_quirk *tbl) 3694 { 3695 if (codec->modelname && models) { ··· 3753 * If no entries are matching, the function returns a negative value. 3754 */ 3755 int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, 3756 + int num_configs, const char * const *models, 3757 const struct snd_pci_quirk *tbl) 3758 { 3759 const struct snd_pci_quirk *q; ··· 4690 int check_location) 4691 { 4692 unsigned int def_conf; 4693 + static const char * const mic_names[] = { 4694 "Internal Mic", "Dock Mic", "Mic", "Front Mic", "Rear Mic", 4695 }; 4696 int attr;
+4 -3
sound/pci/hda/hda_generic.c
··· 762 /* 763 * build output mixer controls 764 */ 765 - static int create_output_mixers(struct hda_codec *codec, const char **names) 766 { 767 struct hda_gspec *spec = codec->spec; 768 int i, err; ··· 781 static int build_output_controls(struct hda_codec *codec) 782 { 783 struct hda_gspec *spec = codec->spec; 784 - static const char *types_speaker[] = { "Speaker", "Headphone" }; 785 - static const char *types_line[] = { "Front", "Headphone" }; 786 787 switch (spec->pcm_vol_nodes) { 788 case 1:
··· 762 /* 763 * build output mixer controls 764 */ 765 + static int create_output_mixers(struct hda_codec *codec, 766 + const char * const *names) 767 { 768 struct hda_gspec *spec = codec->spec; 769 int i, err; ··· 780 static int build_output_controls(struct hda_codec *codec) 781 { 782 struct hda_gspec *spec = codec->spec; 783 + static const char * const types_speaker[] = { "Speaker", "Headphone" }; 784 + static const char * const types_line[] = { "Front", "Headphone" }; 785 786 switch (spec->pcm_vol_nodes) { 787 case 1:
+3 -3
sound/pci/hda/hda_local.h
··· 140 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, 141 const char *name); 142 int snd_hda_add_vmaster(struct hda_codec *codec, char *name, 143 - unsigned int *tlv, const char **slaves); 144 int snd_hda_codec_reset(struct hda_codec *codec); 145 146 /* amp value bits */ ··· 341 * Misc 342 */ 343 int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, 344 - const char **modelnames, 345 const struct snd_pci_quirk *pci_list); 346 int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, 347 - int num_configs, const char **models, 348 const struct snd_pci_quirk *tbl); 349 int snd_hda_add_new_ctls(struct hda_codec *codec, 350 struct snd_kcontrol_new *knew);
··· 140 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, 141 const char *name); 142 int snd_hda_add_vmaster(struct hda_codec *codec, char *name, 143 + unsigned int *tlv, const char * const *slaves); 144 int snd_hda_codec_reset(struct hda_codec *codec); 145 146 /* amp value bits */ ··· 341 * Misc 342 */ 343 int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, 344 + const char * const *modelnames, 345 const struct snd_pci_quirk *pci_list); 346 int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, 347 + int num_configs, const char * const *models, 348 const struct snd_pci_quirk *tbl); 349 int snd_hda_add_new_ctls(struct hda_codec *codec, 350 struct snd_kcontrol_new *knew);
+1 -1
sound/pci/hda/hda_proc.c
··· 418 419 static const char *get_pwr_state(u32 state) 420 { 421 - static const char *buf[4] = { 422 "D0", "D1", "D2", "D3" 423 }; 424 if (state < 4)
··· 418 419 static const char *get_pwr_state(u32 state) 420 { 421 + static const char * const buf[4] = { 422 "D0", "D1", "D2", "D3" 423 }; 424 if (state < 4)
+16 -14
sound/pci/hda/patch_analog.c
··· 84 #endif 85 /* for virtual master */ 86 hda_nid_t vmaster_nid; 87 - const char **slave_vols; 88 - const char **slave_sws; 89 }; 90 91 /* ··· 133 return 0; 134 } 135 136 - static const char *ad_slave_vols[] = { 137 "Front Playback Volume", 138 "Surround Playback Volume", 139 "Center Playback Volume", ··· 146 NULL 147 }; 148 149 - static const char *ad_slave_sws[] = { 150 "Front Playback Switch", 151 "Surround Playback Switch", 152 "Center Playback Switch", ··· 159 NULL 160 }; 161 162 - static const char *ad1988_6stack_fp_slave_vols[] = { 163 "Front Playback Volume", 164 "Surround Playback Volume", 165 "Center Playback Volume", ··· 169 NULL 170 }; 171 172 - static const char *ad1988_6stack_fp_slave_sws[] = { 173 "Front Playback Switch", 174 "Surround Playback Switch", 175 "Center Playback Switch", ··· 1134 AD1986A_MODELS 1135 }; 1136 1137 - static const char *ad1986a_models[AD1986A_MODELS] = { 1138 [AD1986A_6STACK] = "6stack", 1139 [AD1986A_3STACK] = "3stack", 1140 [AD1986A_LAPTOP] = "laptop", ··· 1878 AD1981_MODELS 1879 }; 1880 1881 - static const char *ad1981_models[AD1981_MODELS] = { 1882 [AD1981_HP] = "hp", 1883 [AD1981_THINKPAD] = "thinkpad", 1884 [AD1981_BASIC] = "basic", ··· 2953 const struct auto_pin_cfg *cfg) 2954 { 2955 char name[32]; 2956 - static const char *chname[4] = { "Front", "Surround", NULL /*CLFE*/, "Side" }; 2957 hda_nid_t nid; 2958 int i, err; 2959 ··· 3240 /* 3241 */ 3242 3243 - static const char *ad1988_models[AD1988_MODEL_LAST] = { 3244 [AD1988_6STACK] = "6stack", 3245 [AD1988_6STACK_DIG] = "6stack-dig", 3246 [AD1988_6STACK_DIG_FP] = "6stack-dig-fp", ··· 3575 }; 3576 #endif 3577 3578 - static const char *ad1884_slave_vols[] = { 3579 "PCM Playback Volume", 3580 "Mic Playback Volume", 3581 "Mono Playback Volume", ··· 3813 AD1984_MODELS 3814 }; 3815 3816 - static const char *ad1984_models[AD1984_MODELS] = { 3817 [AD1984_BASIC] = "basic", 3818 [AD1984_THINKPAD] = "thinkpad", 3819 [AD1984_DELL_DESKTOP] = "dell_desktop", ··· 4484 AD1884A_MODELS 4485 }; 4486 4487 - static const char *ad1884a_models[AD1884A_MODELS] = { 4488 [AD1884A_DESKTOP] = "desktop", 4489 [AD1884A_LAPTOP] = "laptop", 4490 [AD1884A_MOBILE] = "mobile", ··· 4872 AD1882_MODELS 4873 }; 4874 4875 - static const char *ad1882_models[AD1986A_MODELS] = { 4876 [AD1882_3STACK] = "3stack", 4877 [AD1882_6STACK] = "6stack", 4878 };
··· 84 #endif 85 /* for virtual master */ 86 hda_nid_t vmaster_nid; 87 + const char * const *slave_vols; 88 + const char * const *slave_sws; 89 }; 90 91 /* ··· 133 return 0; 134 } 135 136 + static const char * const ad_slave_vols[] = { 137 "Front Playback Volume", 138 "Surround Playback Volume", 139 "Center Playback Volume", ··· 146 NULL 147 }; 148 149 + static const char * const ad_slave_sws[] = { 150 "Front Playback Switch", 151 "Surround Playback Switch", 152 "Center Playback Switch", ··· 159 NULL 160 }; 161 162 + static const char * const ad1988_6stack_fp_slave_vols[] = { 163 "Front Playback Volume", 164 "Surround Playback Volume", 165 "Center Playback Volume", ··· 169 NULL 170 }; 171 172 + static const char * const ad1988_6stack_fp_slave_sws[] = { 173 "Front Playback Switch", 174 "Surround Playback Switch", 175 "Center Playback Switch", ··· 1134 AD1986A_MODELS 1135 }; 1136 1137 + static const char * const ad1986a_models[AD1986A_MODELS] = { 1138 [AD1986A_6STACK] = "6stack", 1139 [AD1986A_3STACK] = "3stack", 1140 [AD1986A_LAPTOP] = "laptop", ··· 1878 AD1981_MODELS 1879 }; 1880 1881 + static const char * const ad1981_models[AD1981_MODELS] = { 1882 [AD1981_HP] = "hp", 1883 [AD1981_THINKPAD] = "thinkpad", 1884 [AD1981_BASIC] = "basic", ··· 2953 const struct auto_pin_cfg *cfg) 2954 { 2955 char name[32]; 2956 + static const char * const chname[4] = { 2957 + "Front", "Surround", NULL /*CLFE*/, "Side" 2958 + }; 2959 hda_nid_t nid; 2960 int i, err; 2961 ··· 3238 /* 3239 */ 3240 3241 + static const char * const ad1988_models[AD1988_MODEL_LAST] = { 3242 [AD1988_6STACK] = "6stack", 3243 [AD1988_6STACK_DIG] = "6stack-dig", 3244 [AD1988_6STACK_DIG_FP] = "6stack-dig-fp", ··· 3573 }; 3574 #endif 3575 3576 + static const char * const ad1884_slave_vols[] = { 3577 "PCM Playback Volume", 3578 "Mic Playback Volume", 3579 "Mono Playback Volume", ··· 3811 AD1984_MODELS 3812 }; 3813 3814 + static const char * const ad1984_models[AD1984_MODELS] = { 3815 [AD1984_BASIC] = "basic", 3816 [AD1984_THINKPAD] = "thinkpad", 3817 [AD1984_DELL_DESKTOP] = "dell_desktop", ··· 4482 AD1884A_MODELS 4483 }; 4484 4485 + static const char * const ad1884a_models[AD1884A_MODELS] = { 4486 [AD1884A_DESKTOP] = "desktop", 4487 [AD1884A_LAPTOP] = "laptop", 4488 [AD1884A_MOBILE] = "mobile", ··· 4870 AD1882_MODELS 4871 }; 4872 4873 + static const char * const ad1882_models[AD1986A_MODELS] = { 4874 [AD1882_3STACK] = "3stack", 4875 [AD1882_6STACK] = "6stack", 4876 };
+2 -2
sound/pci/hda/patch_cirrus.c
··· 490 * create mixer controls 491 */ 492 493 - static const char *dir_sfx[2] = { "Playback", "Capture" }; 494 495 static int add_mute(struct hda_codec *codec, const char *name, int index, 496 unsigned int pval, int dir, struct snd_kcontrol **kctlp) ··· 1156 return 0; 1157 } 1158 1159 - static const char *cs420x_models[CS420X_MODELS] = { 1160 [CS420X_MBP53] = "mbp53", 1161 [CS420X_MBP55] = "mbp55", 1162 [CS420X_IMAC27] = "imac27",
··· 490 * create mixer controls 491 */ 492 493 + static const char * const dir_sfx[2] = { "Playback", "Capture" }; 494 495 static int add_mute(struct hda_codec *codec, const char *name, int index, 496 unsigned int pval, int dir, struct snd_kcontrol **kctlp) ··· 1156 return 0; 1157 } 1158 1159 + static const char * const cs420x_models[CS420X_MODELS] = { 1160 [CS420X_MBP53] = "mbp53", 1161 [CS420X_MBP55] = "mbp55", 1162 [CS420X_IMAC27] = "imac27",
+1 -1
sound/pci/hda/patch_cmedia.c
··· 608 /* 609 */ 610 611 - static const char *cmi9880_models[CMI_MODELS] = { 612 [CMI_MINIMAL] = "minimal", 613 [CMI_MIN_FP] = "min_fp", 614 [CMI_FULL] = "full",
··· 608 /* 609 */ 610 611 + static const char * const cmi9880_models[CMI_MODELS] = { 612 [CMI_MINIMAL] = "minimal", 613 [CMI_MIN_FP] = "min_fp", 614 [CMI_FULL] = "full",
+7 -7
sound/pci/hda/patch_conexant.c
··· 537 }; 538 #endif 539 540 - static const char *slave_vols[] = { 541 "Headphone Playback Volume", 542 "Speaker Playback Volume", 543 NULL 544 }; 545 546 - static const char *slave_sws[] = { 547 "Headphone Playback Switch", 548 "Speaker Playback Switch", 549 NULL ··· 1134 CXT5045_MODELS 1135 }; 1136 1137 - static const char *cxt5045_models[CXT5045_MODELS] = { 1138 [CXT5045_LAPTOP_HPSENSE] = "laptop-hpsense", 1139 [CXT5045_LAPTOP_MICSENSE] = "laptop-micsense", 1140 [CXT5045_LAPTOP_HPMICSENSE] = "laptop-hpmicsense", ··· 1579 CXT5047_MODELS 1580 }; 1581 1582 - static const char *cxt5047_models[CXT5047_MODELS] = { 1583 [CXT5047_LAPTOP] = "laptop", 1584 [CXT5047_LAPTOP_HP] = "laptop-hp", 1585 [CXT5047_LAPTOP_EAPD] = "laptop-eapd", ··· 1995 CXT5051_MODELS 1996 }; 1997 1998 - static const char *cxt5051_models[CXT5051_MODELS] = { 1999 [CXT5051_LAPTOP] = "laptop", 2000 [CXT5051_HP] = "hp", 2001 [CXT5051_HP_DV6736] = "hp-dv6736", ··· 3084 CXT5066_MODELS 3085 }; 3086 3087 - static const char *cxt5066_models[CXT5066_MODELS] = { 3088 [CXT5066_LAPTOP] = "laptop", 3089 [CXT5066_DELL_LAPTOP] = "dell-laptop", 3090 [CXT5066_OLPC_XO_1_5] = "olpc-xo-1_5", ··· 3746 struct conexant_spec *spec = codec->spec; 3747 int i, err; 3748 int num_line = 0, num_hp = 0, num_spk = 0; 3749 - static const char *texts[3] = { "Front", "Surround", "CLFE" }; 3750 3751 if (spec->dac_info_filled == 1) 3752 return cx_auto_add_pb_volume(codec, spec->dac_info[0].dac,
··· 537 }; 538 #endif 539 540 + static const char * const slave_vols[] = { 541 "Headphone Playback Volume", 542 "Speaker Playback Volume", 543 NULL 544 }; 545 546 + static const char * const slave_sws[] = { 547 "Headphone Playback Switch", 548 "Speaker Playback Switch", 549 NULL ··· 1134 CXT5045_MODELS 1135 }; 1136 1137 + static const char * const cxt5045_models[CXT5045_MODELS] = { 1138 [CXT5045_LAPTOP_HPSENSE] = "laptop-hpsense", 1139 [CXT5045_LAPTOP_MICSENSE] = "laptop-micsense", 1140 [CXT5045_LAPTOP_HPMICSENSE] = "laptop-hpmicsense", ··· 1579 CXT5047_MODELS 1580 }; 1581 1582 + static const char * const cxt5047_models[CXT5047_MODELS] = { 1583 [CXT5047_LAPTOP] = "laptop", 1584 [CXT5047_LAPTOP_HP] = "laptop-hp", 1585 [CXT5047_LAPTOP_EAPD] = "laptop-eapd", ··· 1995 CXT5051_MODELS 1996 }; 1997 1998 + static const char *const cxt5051_models[CXT5051_MODELS] = { 1999 [CXT5051_LAPTOP] = "laptop", 2000 [CXT5051_HP] = "hp", 2001 [CXT5051_HP_DV6736] = "hp-dv6736", ··· 3084 CXT5066_MODELS 3085 }; 3086 3087 + static const char * const cxt5066_models[CXT5066_MODELS] = { 3088 [CXT5066_LAPTOP] = "laptop", 3089 [CXT5066_DELL_LAPTOP] = "dell-laptop", 3090 [CXT5066_OLPC_XO_1_5] = "olpc-xo-1_5", ··· 3746 struct conexant_spec *spec = codec->spec; 3747 int i, err; 3748 int num_line = 0, num_hp = 0, num_spk = 0; 3749 + static const char * const texts[3] = { "Front", "Surround", "CLFE" }; 3750 3751 if (spec->dac_info_filled == 1) 3752 return cx_auto_add_pb_volume(codec, spec->dac_info[0].dac,
+18 -16
sound/pci/hda/patch_realtek.c
··· 2916 /* 2917 * slave controls for virtual master 2918 */ 2919 - static const char *alc_slave_vols[] = { 2920 "Front Playback Volume", 2921 "Surround Playback Volume", 2922 "Center Playback Volume", ··· 2930 NULL, 2931 }; 2932 2933 - static const char *alc_slave_sws[] = { 2934 "Front Playback Switch", 2935 "Surround Playback Switch", 2936 "Center Playback Switch", ··· 4611 /* 4612 */ 4613 4614 - static const char *alc880_models[ALC880_MODEL_LAST] = { 4615 [ALC880_3ST] = "3stack", 4616 [ALC880_TCL_S700] = "tcl", 4617 [ALC880_3ST_DIG] = "3stack-digout", ··· 5144 static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, 5145 const struct auto_pin_cfg *cfg) 5146 { 5147 - static const char *chname[4] = { 5148 "Front", "Surround", NULL /*CLFE*/, "Side" 5149 }; 5150 const char *pfx = alc_get_line_out_pfx(cfg, false); ··· 7158 /* 7159 * ALC260 configurations 7160 */ 7161 - static const char *alc260_models[ALC260_MODEL_LAST] = { 7162 [ALC260_BASIC] = "basic", 7163 [ALC260_HP] = "hp", 7164 [ALC260_HP_3013] = "hp-3013", ··· 9781 /* 9782 * configuration and preset 9783 */ 9784 - static const char *alc882_models[ALC882_MODEL_LAST] = { 9785 [ALC882_3ST_DIG] = "3stack-dig", 9786 [ALC882_6ST_DIG] = "6stack-dig", 9787 [ALC882_ARIMA] = "arima", ··· 12601 /* 12602 * configuration and preset 12603 */ 12604 - static const char *alc262_models[ALC262_MODEL_LAST] = { 12605 [ALC262_BASIC] = "basic", 12606 [ALC262_HIPPO] = "hippo", 12607 [ALC262_HIPPO_1] = "hippo_1", ··· 13789 /* 13790 * configuration and preset 13791 */ 13792 - static const char *alc268_models[ALC268_MODEL_LAST] = { 13793 [ALC267_QUANTA_IL1] = "quanta-il1", 13794 [ALC268_3ST] = "3stack", 13795 [ALC268_TOSHIBA] = "toshiba", ··· 14961 /* 14962 * configuration and preset 14963 */ 14964 - static const char *alc269_models[ALC269_MODEL_LAST] = { 14965 [ALC269_BASIC] = "basic", 14966 [ALC269_QUANTA_FL1] = "quanta", 14967 [ALC269_AMIC] = "laptop-amic", ··· 16004 const struct auto_pin_cfg *cfg) 16005 { 16006 struct alc_spec *spec = codec->spec; 16007 - static const char *chname[4] = { 16008 "Front", "Surround", NULL /*CLFE*/, "Side" 16009 }; 16010 const char *pfx = alc_get_line_out_pfx(cfg, true); ··· 16210 /* 16211 * configuration and preset 16212 */ 16213 - static const char *alc861_models[ALC861_MODEL_LAST] = { 16214 [ALC861_3ST] = "3stack", 16215 [ALC660_3ST] = "3stack-660", 16216 [ALC861_3ST_DIG] = "3stack-dig", ··· 16913 /* 16914 * configuration and preset 16915 */ 16916 - static const char *alc861vd_models[ALC861VD_MODEL_LAST] = { 16917 [ALC660VD_3ST] = "3stack-660", 16918 [ALC660VD_3ST_DIG] = "3stack-660-digout", 16919 [ALC660VD_ASUS_V1S] = "asus-v1s", ··· 17133 static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, 17134 const struct auto_pin_cfg *cfg) 17135 { 17136 - static const char *chname[4] = {"Front", "Surround", "CLFE", "Side"}; 17137 const char *pfx = alc_get_line_out_pfx(cfg, true); 17138 hda_nid_t nid_v, nid_s; 17139 int i, err; ··· 18690 /* 18691 * configuration and preset 18692 */ 18693 - static const char *alc662_models[ALC662_MODEL_LAST] = { 18694 [ALC662_3ST_2ch_DIG] = "3stack-dig", 18695 [ALC662_3ST_6ch_DIG] = "3stack-6ch-dig", 18696 [ALC662_3ST_6ch] = "3stack-6ch", ··· 19205 const struct auto_pin_cfg *cfg) 19206 { 19207 struct alc_spec *spec = codec->spec; 19208 - static const char *chname[4] = { 19209 "Front", "Surround", NULL /*CLFE*/, "Side" 19210 }; 19211 const char *pfx = alc_get_line_out_pfx(cfg, true); ··· 19980 /* 19981 * configuration and preset 19982 */ 19983 - static const char *alc680_models[ALC680_MODEL_LAST] = { 19984 [ALC680_BASE] = "base", 19985 [ALC680_AUTO] = "auto", 19986 };
··· 2916 /* 2917 * slave controls for virtual master 2918 */ 2919 + static const char * const alc_slave_vols[] = { 2920 "Front Playback Volume", 2921 "Surround Playback Volume", 2922 "Center Playback Volume", ··· 2930 NULL, 2931 }; 2932 2933 + static const char * const alc_slave_sws[] = { 2934 "Front Playback Switch", 2935 "Surround Playback Switch", 2936 "Center Playback Switch", ··· 4611 /* 4612 */ 4613 4614 + static const char * const alc880_models[ALC880_MODEL_LAST] = { 4615 [ALC880_3ST] = "3stack", 4616 [ALC880_TCL_S700] = "tcl", 4617 [ALC880_3ST_DIG] = "3stack-digout", ··· 5144 static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, 5145 const struct auto_pin_cfg *cfg) 5146 { 5147 + static const char * const chname[4] = { 5148 "Front", "Surround", NULL /*CLFE*/, "Side" 5149 }; 5150 const char *pfx = alc_get_line_out_pfx(cfg, false); ··· 7158 /* 7159 * ALC260 configurations 7160 */ 7161 + static const char * const alc260_models[ALC260_MODEL_LAST] = { 7162 [ALC260_BASIC] = "basic", 7163 [ALC260_HP] = "hp", 7164 [ALC260_HP_3013] = "hp-3013", ··· 9781 /* 9782 * configuration and preset 9783 */ 9784 + static const char * const alc882_models[ALC882_MODEL_LAST] = { 9785 [ALC882_3ST_DIG] = "3stack-dig", 9786 [ALC882_6ST_DIG] = "6stack-dig", 9787 [ALC882_ARIMA] = "arima", ··· 12601 /* 12602 * configuration and preset 12603 */ 12604 + static const char * const alc262_models[ALC262_MODEL_LAST] = { 12605 [ALC262_BASIC] = "basic", 12606 [ALC262_HIPPO] = "hippo", 12607 [ALC262_HIPPO_1] = "hippo_1", ··· 13789 /* 13790 * configuration and preset 13791 */ 13792 + static const char * const alc268_models[ALC268_MODEL_LAST] = { 13793 [ALC267_QUANTA_IL1] = "quanta-il1", 13794 [ALC268_3ST] = "3stack", 13795 [ALC268_TOSHIBA] = "toshiba", ··· 14961 /* 14962 * configuration and preset 14963 */ 14964 + static const char * const alc269_models[ALC269_MODEL_LAST] = { 14965 [ALC269_BASIC] = "basic", 14966 [ALC269_QUANTA_FL1] = "quanta", 14967 [ALC269_AMIC] = "laptop-amic", ··· 16004 const struct auto_pin_cfg *cfg) 16005 { 16006 struct alc_spec *spec = codec->spec; 16007 + static const char * const chname[4] = { 16008 "Front", "Surround", NULL /*CLFE*/, "Side" 16009 }; 16010 const char *pfx = alc_get_line_out_pfx(cfg, true); ··· 16210 /* 16211 * configuration and preset 16212 */ 16213 + static const char * const alc861_models[ALC861_MODEL_LAST] = { 16214 [ALC861_3ST] = "3stack", 16215 [ALC660_3ST] = "3stack-660", 16216 [ALC861_3ST_DIG] = "3stack-dig", ··· 16913 /* 16914 * configuration and preset 16915 */ 16916 + static const char * const alc861vd_models[ALC861VD_MODEL_LAST] = { 16917 [ALC660VD_3ST] = "3stack-660", 16918 [ALC660VD_3ST_DIG] = "3stack-660-digout", 16919 [ALC660VD_ASUS_V1S] = "asus-v1s", ··· 17133 static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, 17134 const struct auto_pin_cfg *cfg) 17135 { 17136 + static const char * const chname[4] = { 17137 + "Front", "Surround", "CLFE", "Side" 17138 + }; 17139 const char *pfx = alc_get_line_out_pfx(cfg, true); 17140 hda_nid_t nid_v, nid_s; 17141 int i, err; ··· 18688 /* 18689 * configuration and preset 18690 */ 18691 + static const char * const alc662_models[ALC662_MODEL_LAST] = { 18692 [ALC662_3ST_2ch_DIG] = "3stack-dig", 18693 [ALC662_3ST_6ch_DIG] = "3stack-6ch-dig", 18694 [ALC662_3ST_6ch] = "3stack-6ch", ··· 19203 const struct auto_pin_cfg *cfg) 19204 { 19205 struct alc_spec *spec = codec->spec; 19206 + static const char * const chname[4] = { 19207 "Front", "Surround", NULL /*CLFE*/, "Side" 19208 }; 19209 const char *pfx = alc_get_line_out_pfx(cfg, true); ··· 19978 /* 19979 * configuration and preset 19980 */ 19981 + static const char * const alc680_models[ALC680_MODEL_LAST] = { 19982 [ALC680_BASE] = "base", 19983 [ALC680_AUTO] = "auto", 19984 };
+18 -18
sound/pci/hda/patch_sigmatel.c
··· 266 struct sigmatel_mic_route int_mic; 267 struct sigmatel_mic_route dock_mic; 268 269 - const char **spdif_labels; 270 271 hda_nid_t dig_in_nid; 272 hda_nid_t mono_nid; ··· 524 HDA_COMPOSE_AMP_VAL(0x1d, 3, 0, HDA_OUTPUT), 525 }; 526 527 - static const char *stac927x_spdif_labels[5] = { 528 "Digital Playback", "ADAT", "Analog Mux 1", 529 "Analog Mux 2", "Analog Mux 3" 530 }; ··· 1062 .put = stac92xx_smux_enum_put, 1063 }; 1064 1065 - static const char *slave_vols[] = { 1066 "Front Playback Volume", 1067 "Surround Playback Volume", 1068 "Center Playback Volume", ··· 1073 NULL 1074 }; 1075 1076 - static const char *slave_sws[] = { 1077 "Front Playback Switch", 1078 "Surround Playback Switch", 1079 "Center Playback Switch", ··· 1354 [STAC_9200_PANASONIC] = ref9200_pin_configs, 1355 }; 1356 1357 - static const char *stac9200_models[STAC_9200_MODELS] = { 1358 [STAC_AUTO] = "auto", 1359 [STAC_REF] = "ref", 1360 [STAC_9200_OQO] = "oqo", ··· 1500 [STAC_M6] = stac925xM6_pin_configs, 1501 }; 1502 1503 - static const char *stac925x_models[STAC_925x_MODELS] = { 1504 [STAC_925x_AUTO] = "auto", 1505 [STAC_REF] = "ref", 1506 [STAC_M1] = "m1", ··· 1574 [STAC_92HD73XX_INTEL] = intel_dg45id_pin_configs, 1575 }; 1576 1577 - static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1578 [STAC_92HD73XX_AUTO] = "auto", 1579 [STAC_92HD73XX_NO_JD] = "no-jd", 1580 [STAC_92HD73XX_REF] = "ref", ··· 1660 [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, 1661 }; 1662 1663 - static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { 1664 [STAC_92HD83XXX_AUTO] = "auto", 1665 [STAC_92HD83XXX_REF] = "ref", 1666 [STAC_92HD83XXX_PWR_REF] = "mic-ref", ··· 1722 [STAC_HP_DV4_1222NR] = NULL, 1723 }; 1724 1725 - static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { 1726 [STAC_92HD71BXX_AUTO] = "auto", 1727 [STAC_92HD71BXX_REF] = "ref", 1728 [STAC_DELL_M4_1] = "dell-m4-1", ··· 1915 [STAC_922X_DELL_M82] = dell_922x_m82_pin_configs, 1916 }; 1917 1918 - static const char *stac922x_models[STAC_922X_MODELS] = { 1919 [STAC_922X_AUTO] = "auto", 1920 [STAC_D945_REF] = "ref", 1921 [STAC_D945GTP5] = "5stack", ··· 2077 [STAC_927X_VOLKNOB] = NULL, 2078 }; 2079 2080 - static const char *stac927x_models[STAC_927X_MODELS] = { 2081 [STAC_927X_AUTO] = "auto", 2082 [STAC_D965_REF_NO_JD] = "ref-no-jd", 2083 [STAC_D965_REF] = "ref", ··· 2180 [STAC_9205_EAPD] = NULL, 2181 }; 2182 2183 - static const char *stac9205_models[STAC_9205_MODELS] = { 2184 [STAC_9205_AUTO] = "auto", 2185 [STAC_9205_REF] = "ref", 2186 [STAC_9205_DELL_M42] = "dell-m42", ··· 3123 int type) 3124 { 3125 struct sigmatel_spec *spec = codec->spec; 3126 - static const char *chname[4] = { 3127 "Front", "Surround", NULL /*CLFE*/, "Side" 3128 }; 3129 hda_nid_t nid; ··· 3256 } 3257 3258 /* labels for mono mux outputs */ 3259 - static const char *stac92xx_mono_labels[4] = { 3260 "DAC0", "DAC1", "Mixer", "DAC2" 3261 }; 3262 ··· 3380 return 0; 3381 }; 3382 3383 - static const char *stac92xx_spdif_labels[3] = { 3384 "Digital Playback", "Analog Mux 1", "Analog Mux 2", 3385 }; 3386 ··· 3388 { 3389 struct sigmatel_spec *spec = codec->spec; 3390 struct hda_input_mux *spdif_mux = &spec->private_smux; 3391 - const char **labels = spec->spdif_labels; 3392 int i, num_cons; 3393 hda_nid_t con_lst[HDA_MAX_NUM_INPUTS]; 3394 ··· 3409 } 3410 3411 /* labels for dmic mux inputs */ 3412 - static const char *stac92xx_dmic_labels[5] = { 3413 "Analog Inputs", "Digital Mic 1", "Digital Mic 2", 3414 "Digital Mic 3", "Digital Mic 4" 3415 }; ··· 6270 0x90a7013e 6271 }; 6272 6273 - static const char *stac9872_models[STAC_9872_MODELS] = { 6274 [STAC_9872_AUTO] = "auto", 6275 [STAC_9872_VAIO] = "vaio", 6276 };
··· 266 struct sigmatel_mic_route int_mic; 267 struct sigmatel_mic_route dock_mic; 268 269 + const char * const *spdif_labels; 270 271 hda_nid_t dig_in_nid; 272 hda_nid_t mono_nid; ··· 524 HDA_COMPOSE_AMP_VAL(0x1d, 3, 0, HDA_OUTPUT), 525 }; 526 527 + static const char * const stac927x_spdif_labels[5] = { 528 "Digital Playback", "ADAT", "Analog Mux 1", 529 "Analog Mux 2", "Analog Mux 3" 530 }; ··· 1062 .put = stac92xx_smux_enum_put, 1063 }; 1064 1065 + static const char * const slave_vols[] = { 1066 "Front Playback Volume", 1067 "Surround Playback Volume", 1068 "Center Playback Volume", ··· 1073 NULL 1074 }; 1075 1076 + static const char * const slave_sws[] = { 1077 "Front Playback Switch", 1078 "Surround Playback Switch", 1079 "Center Playback Switch", ··· 1354 [STAC_9200_PANASONIC] = ref9200_pin_configs, 1355 }; 1356 1357 + static const char * const stac9200_models[STAC_9200_MODELS] = { 1358 [STAC_AUTO] = "auto", 1359 [STAC_REF] = "ref", 1360 [STAC_9200_OQO] = "oqo", ··· 1500 [STAC_M6] = stac925xM6_pin_configs, 1501 }; 1502 1503 + static const char * const stac925x_models[STAC_925x_MODELS] = { 1504 [STAC_925x_AUTO] = "auto", 1505 [STAC_REF] = "ref", 1506 [STAC_M1] = "m1", ··· 1574 [STAC_92HD73XX_INTEL] = intel_dg45id_pin_configs, 1575 }; 1576 1577 + static const char * const stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1578 [STAC_92HD73XX_AUTO] = "auto", 1579 [STAC_92HD73XX_NO_JD] = "no-jd", 1580 [STAC_92HD73XX_REF] = "ref", ··· 1660 [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, 1661 }; 1662 1663 + static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { 1664 [STAC_92HD83XXX_AUTO] = "auto", 1665 [STAC_92HD83XXX_REF] = "ref", 1666 [STAC_92HD83XXX_PWR_REF] = "mic-ref", ··· 1722 [STAC_HP_DV4_1222NR] = NULL, 1723 }; 1724 1725 + static const char * const stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { 1726 [STAC_92HD71BXX_AUTO] = "auto", 1727 [STAC_92HD71BXX_REF] = "ref", 1728 [STAC_DELL_M4_1] = "dell-m4-1", ··· 1915 [STAC_922X_DELL_M82] = dell_922x_m82_pin_configs, 1916 }; 1917 1918 + static const char * const stac922x_models[STAC_922X_MODELS] = { 1919 [STAC_922X_AUTO] = "auto", 1920 [STAC_D945_REF] = "ref", 1921 [STAC_D945GTP5] = "5stack", ··· 2077 [STAC_927X_VOLKNOB] = NULL, 2078 }; 2079 2080 + static const char * const stac927x_models[STAC_927X_MODELS] = { 2081 [STAC_927X_AUTO] = "auto", 2082 [STAC_D965_REF_NO_JD] = "ref-no-jd", 2083 [STAC_D965_REF] = "ref", ··· 2180 [STAC_9205_EAPD] = NULL, 2181 }; 2182 2183 + static const char * const stac9205_models[STAC_9205_MODELS] = { 2184 [STAC_9205_AUTO] = "auto", 2185 [STAC_9205_REF] = "ref", 2186 [STAC_9205_DELL_M42] = "dell-m42", ··· 3123 int type) 3124 { 3125 struct sigmatel_spec *spec = codec->spec; 3126 + static const char * const chname[4] = { 3127 "Front", "Surround", NULL /*CLFE*/, "Side" 3128 }; 3129 hda_nid_t nid; ··· 3256 } 3257 3258 /* labels for mono mux outputs */ 3259 + static const char * const stac92xx_mono_labels[4] = { 3260 "DAC0", "DAC1", "Mixer", "DAC2" 3261 }; 3262 ··· 3380 return 0; 3381 }; 3382 3383 + static const char * const stac92xx_spdif_labels[3] = { 3384 "Digital Playback", "Analog Mux 1", "Analog Mux 2", 3385 }; 3386 ··· 3388 { 3389 struct sigmatel_spec *spec = codec->spec; 3390 struct hda_input_mux *spdif_mux = &spec->private_smux; 3391 + const char * const *labels = spec->spdif_labels; 3392 int i, num_cons; 3393 hda_nid_t con_lst[HDA_MAX_NUM_INPUTS]; 3394 ··· 3409 } 3410 3411 /* labels for dmic mux inputs */ 3412 + static const char * const stac92xx_dmic_labels[5] = { 3413 "Analog Inputs", "Digital Mic 1", "Digital Mic 2", 3414 "Digital Mic 3", "Digital Mic 4" 3415 }; ··· 6270 0x90a7013e 6271 }; 6272 6273 + static const char * const stac9872_models[STAC_9872_MODELS] = { 6274 [STAC_9872_AUTO] = "auto", 6275 [STAC_9872_VAIO] = "vaio", 6276 };
+20 -8
sound/pci/hda/patch_via.c
··· 2282 const struct auto_pin_cfg *cfg) 2283 { 2284 char name[32]; 2285 - static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; 2286 hda_nid_t nid, nid_vol, nid_vols[] = {0x17, 0x19, 0x1a, 0x1b}; 2287 int i, err; 2288 ··· 2373 { 2374 int i; 2375 struct hda_input_mux *imux = &spec->private_imux[1]; 2376 - static const char *texts[] = { "OFF", "ON", NULL}; 2377 2378 /* for hp mode select */ 2379 for (i = 0; texts[i]; i++) ··· 2893 const struct auto_pin_cfg *cfg) 2894 { 2895 char name[32]; 2896 - static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; 2897 hda_nid_t nid, nid_vol, nid_vols[] = {0x18, 0x1a, 0x1b, 0x29}; 2898 int i, err; 2899 ··· 3438 const struct auto_pin_cfg *cfg) 3439 { 3440 char name[32]; 3441 - static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; 3442 hda_nid_t nid_vols[] = {0x16, 0x18, 0x26, 0x27}; 3443 hda_nid_t nid, nid_vol = 0; 3444 int i, err; ··· 3868 const struct auto_pin_cfg *cfg) 3869 { 3870 char name[32]; 3871 - static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; 3872 hda_nid_t nid_vols[] = {0x10, 0x11, 0x24, 0x25}; 3873 hda_nid_t nid_mutes[] = {0x1C, 0x18, 0x26, 0x27}; 3874 hda_nid_t nid, nid_vol, nid_mute; ··· 4313 { 4314 int err, i; 4315 struct hda_input_mux *imux; 4316 - static const char *texts[] = { "ON", "OFF", NULL}; 4317 if (!pin) 4318 return 0; 4319 spec->multiout.hp_nid = 0x1D; ··· 4624 const struct auto_pin_cfg *cfg) 4625 { 4626 char name[32]; 4627 - static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; 4628 hda_nid_t nid_vols[] = {0x8, 0x9, 0xa, 0xb}; 4629 hda_nid_t nid_mutes[] = {0x24, 0x25, 0x26, 0x27}; 4630 hda_nid_t nid, nid_vol, nid_mute = 0; ··· 5075 const struct auto_pin_cfg *cfg) 5076 { 5077 char name[32]; 5078 - static const char *chname[3] = { "Front", "Surround", "C/LFE" }; 5079 hda_nid_t nid_vols[] = {0x10, 0x11, 0x25}; 5080 hda_nid_t nid_mutes[] = {0x1C, 0x18, 0x27}; 5081 hda_nid_t nid, nid_vol, nid_mute;
··· 2282 const struct auto_pin_cfg *cfg) 2283 { 2284 char name[32]; 2285 + static const char * const chname[4] = { 2286 + "Front", "Surround", "C/LFE", "Side" 2287 + }; 2288 hda_nid_t nid, nid_vol, nid_vols[] = {0x17, 0x19, 0x1a, 0x1b}; 2289 int i, err; 2290 ··· 2371 { 2372 int i; 2373 struct hda_input_mux *imux = &spec->private_imux[1]; 2374 + static const char * const texts[] = { "OFF", "ON", NULL}; 2375 2376 /* for hp mode select */ 2377 for (i = 0; texts[i]; i++) ··· 2891 const struct auto_pin_cfg *cfg) 2892 { 2893 char name[32]; 2894 + static const char * const chname[4] = { 2895 + "Front", "Surround", "C/LFE", "Side" 2896 + }; 2897 hda_nid_t nid, nid_vol, nid_vols[] = {0x18, 0x1a, 0x1b, 0x29}; 2898 int i, err; 2899 ··· 3434 const struct auto_pin_cfg *cfg) 3435 { 3436 char name[32]; 3437 + static const char * const chname[4] = { 3438 + "Front", "Surround", "C/LFE", "Side" 3439 + }; 3440 hda_nid_t nid_vols[] = {0x16, 0x18, 0x26, 0x27}; 3441 hda_nid_t nid, nid_vol = 0; 3442 int i, err; ··· 3862 const struct auto_pin_cfg *cfg) 3863 { 3864 char name[32]; 3865 + static const char * const chname[4] = { 3866 + "Front", "Surround", "C/LFE", "Side" 3867 + }; 3868 hda_nid_t nid_vols[] = {0x10, 0x11, 0x24, 0x25}; 3869 hda_nid_t nid_mutes[] = {0x1C, 0x18, 0x26, 0x27}; 3870 hda_nid_t nid, nid_vol, nid_mute; ··· 4305 { 4306 int err, i; 4307 struct hda_input_mux *imux; 4308 + static const char * const texts[] = { "ON", "OFF", NULL}; 4309 if (!pin) 4310 return 0; 4311 spec->multiout.hp_nid = 0x1D; ··· 4616 const struct auto_pin_cfg *cfg) 4617 { 4618 char name[32]; 4619 + static const char * const chname[4] = { 4620 + "Front", "Surround", "C/LFE", "Side" 4621 + }; 4622 hda_nid_t nid_vols[] = {0x8, 0x9, 0xa, 0xb}; 4623 hda_nid_t nid_mutes[] = {0x24, 0x25, 0x26, 0x27}; 4624 hda_nid_t nid, nid_vol, nid_mute = 0; ··· 5065 const struct auto_pin_cfg *cfg) 5066 { 5067 char name[32]; 5068 + static const char * const chname[3] = { 5069 + "Front", "Surround", "C/LFE" 5070 + }; 5071 hda_nid_t nid_vols[] = {0x10, 0x11, 0x25}; 5072 hda_nid_t nid_mutes[] = {0x1C, 0x18, 0x27}; 5073 hda_nid_t nid, nid_vol, nid_mute;