aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 05:30:18 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-02 06:20:21 -0400
commit4c6d72d1380f2f4056635592c07bc50f5d08296c (patch)
treea4b8c7957e9cdb6e9d2f46d3330af59311ce596e /sound/pci
parentdda144103c4a47a504fcaa8cddd08a4440c87060 (diff)
ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ac0400929dcb..0f2b52aeb400 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -345,8 +345,8 @@ struct alc_spec {
345 345
346 /* capture */ 346 /* capture */
347 unsigned int num_adc_nids; 347 unsigned int num_adc_nids;
348 hda_nid_t *adc_nids; 348 const hda_nid_t *adc_nids;
349 hda_nid_t *capsrc_nids; 349 const hda_nid_t *capsrc_nids;
350 hda_nid_t dig_in_nid; /* digital-in NID; optional */ 350 hda_nid_t dig_in_nid; /* digital-in NID; optional */
351 351
352 /* capture setup for dynamic dual-adc switch */ 352 /* capture setup for dynamic dual-adc switch */
@@ -441,13 +441,13 @@ struct alc_config_preset {
441 const struct snd_kcontrol_new *cap_mixer; /* capture mixer */ 441 const struct snd_kcontrol_new *cap_mixer; /* capture mixer */
442 const struct hda_verb *init_verbs[5]; 442 const struct hda_verb *init_verbs[5];
443 unsigned int num_dacs; 443 unsigned int num_dacs;
444 hda_nid_t *dac_nids; 444 const hda_nid_t *dac_nids;
445 hda_nid_t dig_out_nid; /* optional */ 445 hda_nid_t dig_out_nid; /* optional */
446 hda_nid_t hp_nid; /* optional */ 446 hda_nid_t hp_nid; /* optional */
447 hda_nid_t *slave_dig_outs; 447 const hda_nid_t *slave_dig_outs;
448 unsigned int num_adc_nids; 448 unsigned int num_adc_nids;
449 hda_nid_t *adc_nids; 449 const hda_nid_t *adc_nids;
450 hda_nid_t *capsrc_nids; 450 const hda_nid_t *capsrc_nids;
451 hda_nid_t dig_in_nid; 451 hda_nid_t dig_in_nid;
452 unsigned int num_channel_mode; 452 unsigned int num_channel_mode;
453 const struct hda_channel_mode *channel_mode; 453 const struct hda_channel_mode *channel_mode;
@@ -2547,12 +2547,12 @@ static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec)
2547 * F-Mic = 0x1b, HP = 0x19 2547 * F-Mic = 0x1b, HP = 0x19
2548 */ 2548 */
2549 2549
2550static hda_nid_t alc880_dac_nids[4] = { 2550static const hda_nid_t alc880_dac_nids[4] = {
2551 /* front, rear, clfe, rear_surr */ 2551 /* front, rear, clfe, rear_surr */
2552 0x02, 0x05, 0x04, 0x03 2552 0x02, 0x05, 0x04, 0x03
2553}; 2553};
2554 2554
2555static hda_nid_t alc880_adc_nids[3] = { 2555static const hda_nid_t alc880_adc_nids[3] = {
2556 /* ADC0-2 */ 2556 /* ADC0-2 */
2557 0x07, 0x08, 0x09, 2557 0x07, 0x08, 0x09,
2558}; 2558};
@@ -2561,7 +2561,7 @@ static hda_nid_t alc880_adc_nids[3] = {
2561 * but it shows zero connection in the real implementation on some devices. 2561 * but it shows zero connection in the real implementation on some devices.
2562 * Note: this is a 915GAV bug, fixed on 915GLV 2562 * Note: this is a 915GAV bug, fixed on 915GLV
2563 */ 2563 */
2564static hda_nid_t alc880_adc_nids_alt[2] = { 2564static const hda_nid_t alc880_adc_nids_alt[2] = {
2565 /* ADC1-2 */ 2565 /* ADC1-2 */
2566 0x08, 0x09, 2566 0x08, 0x09,
2567}; 2567};
@@ -2820,7 +2820,7 @@ static const struct hda_channel_mode alc880_fivestack_modes[2] = {
2820 * Mic = 0x18, F-Mic = 0x19, Line = 0x1a, HP = 0x1b 2820 * Mic = 0x18, F-Mic = 0x19, Line = 0x1a, HP = 0x1b
2821 */ 2821 */
2822 2822
2823static hda_nid_t alc880_6st_dac_nids[4] = { 2823static const hda_nid_t alc880_6st_dac_nids[4] = {
2824 /* front, rear, clfe, rear_surr */ 2824 /* front, rear, clfe, rear_surr */
2825 0x02, 0x03, 0x04, 0x05 2825 0x02, 0x03, 0x04, 0x05
2826}; 2826};
@@ -2895,7 +2895,7 @@ static const struct snd_kcontrol_new alc880_six_stack_mixer[] = {
2895 * haven't setup any initialization verbs for these yet... 2895 * haven't setup any initialization verbs for these yet...
2896 */ 2896 */
2897 2897
2898static hda_nid_t alc880_w810_dac_nids[3] = { 2898static const hda_nid_t alc880_w810_dac_nids[3] = {
2899 /* front, rear/surround, clfe */ 2899 /* front, rear/surround, clfe */
2900 0x02, 0x03, 0x04 2900 0x02, 0x03, 0x04
2901}; 2901};
@@ -2928,7 +2928,7 @@ static const struct snd_kcontrol_new alc880_w810_base_mixer[] = {
2928 * Line = 0x1a 2928 * Line = 0x1a
2929 */ 2929 */
2930 2930
2931static hda_nid_t alc880_z71v_dac_nids[1] = { 2931static const hda_nid_t alc880_z71v_dac_nids[1] = {
2932 0x02 2932 0x02
2933}; 2933};
2934#define ALC880_Z71V_HP_DAC 0x03 2934#define ALC880_Z71V_HP_DAC 0x03
@@ -2958,7 +2958,7 @@ static const struct snd_kcontrol_new alc880_z71v_mixer[] = {
2958 * Pin assignment: HP = 0x14, Front = 0x15, Mic = 0x18 2958 * Pin assignment: HP = 0x14, Front = 0x15, Mic = 0x18
2959 */ 2959 */
2960 2960
2961static hda_nid_t alc880_f1734_dac_nids[1] = { 2961static const hda_nid_t alc880_f1734_dac_nids[1] = {
2962 0x03 2962 0x03
2963}; 2963};
2964#define ALC880_F1734_HP_DAC 0x02 2964#define ALC880_F1734_HP_DAC 0x02
@@ -3241,7 +3241,7 @@ static int alc_build_controls(struct hda_codec *codec)
3241 if (!kctl) 3241 if (!kctl)
3242 kctl = snd_hda_find_mixer_ctl(codec, "Input Source"); 3242 kctl = snd_hda_find_mixer_ctl(codec, "Input Source");
3243 for (i = 0; kctl && i < kctl->count; i++) { 3243 for (i = 0; kctl && i < kctl->count; i++) {
3244 hda_nid_t *nids = spec->capsrc_nids; 3244 const hda_nid_t *nids = spec->capsrc_nids;
3245 if (!nids) 3245 if (!nids)
3246 nids = spec->adc_nids; 3246 nids = spec->adc_nids;
3247 err = snd_hda_add_nid(codec, kctl, i, nids[i]); 3247 err = snd_hda_add_nid(codec, kctl, i, nids[i]);
@@ -3809,7 +3809,7 @@ static const struct hda_verb alc880_pin_tcl_S700_init_verbs[] = {
3809 */ 3809 */
3810 3810
3811/* To make 5.1 output working (green=Front, blue=Surr, red=CLFE) */ 3811/* To make 5.1 output working (green=Front, blue=Surr, red=CLFE) */
3812static hda_nid_t alc880_lg_dac_nids[3] = { 3812static const hda_nid_t alc880_lg_dac_nids[3] = {
3813 0x05, 0x02, 0x03 3813 0x05, 0x02, 0x03
3814}; 3814};
3815 3815
@@ -4542,7 +4542,7 @@ static int alc_codec_rename(struct hda_codec *codec, const char *name)
4542 * enum controls. 4542 * enum controls.
4543 */ 4543 */
4544#ifdef CONFIG_SND_DEBUG 4544#ifdef CONFIG_SND_DEBUG
4545static hda_nid_t alc880_test_dac_nids[4] = { 4545static const hda_nid_t alc880_test_dac_nids[4] = {
4546 0x02, 0x03, 0x04, 0x05 4546 0x02, 0x03, 0x04, 0x05
4547}; 4547};
4548 4548
@@ -4569,7 +4569,7 @@ static const struct hda_channel_mode alc880_test_modes[4] = {
4569static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol, 4569static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol,
4570 struct snd_ctl_elem_info *uinfo) 4570 struct snd_ctl_elem_info *uinfo)
4571{ 4571{
4572 static char *texts[] = { 4572 static const char * const texts[] = {
4573 "N/A", "Line Out", "HP Out", 4573 "N/A", "Line Out", "HP Out",
4574 "In Hi-Z", "In 50%", "In Grd", "In 80%", "In 100%" 4574 "In Hi-Z", "In 50%", "In Grd", "In 80%", "In 100%"
4575 }; 4575 };
@@ -4614,7 +4614,7 @@ static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol,
4614{ 4614{
4615 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 4615 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
4616 hda_nid_t nid = (hda_nid_t)kcontrol->private_value; 4616 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
4617 static unsigned int ctls[] = { 4617 static const unsigned int ctls[] = {
4618 0, AC_PINCTL_OUT_EN, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN, 4618 0, AC_PINCTL_OUT_EN, AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN,
4619 AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ, 4619 AC_PINCTL_IN_EN | AC_PINCTL_VREF_HIZ,
4620 AC_PINCTL_IN_EN | AC_PINCTL_VREF_50, 4620 AC_PINCTL_IN_EN | AC_PINCTL_VREF_50,
@@ -4644,7 +4644,7 @@ static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol,
4644static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol, 4644static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol,
4645 struct snd_ctl_elem_info *uinfo) 4645 struct snd_ctl_elem_info *uinfo)
4646{ 4646{
4647 static char *texts[] = { 4647 static const char * const texts[] = {
4648 "Front", "Surround", "CLFE", "Side" 4648 "Front", "Surround", "CLFE", "Side"
4649 }; 4649 };
4650 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 4650 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -5632,7 +5632,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
5632{ 5632{
5633 struct alc_spec *spec = codec->spec; 5633 struct alc_spec *spec = codec->spec;
5634 int err; 5634 int err;
5635 static hda_nid_t alc880_ignore[] = { 0x1d, 0 }; 5635 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 };
5636 5636
5637 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 5637 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
5638 alc880_ignore); 5638 alc880_ignore);
@@ -5827,7 +5827,7 @@ static void set_capture_mixer(struct hda_codec *codec)
5827} 5827}
5828 5828
5829/* fill adc_nids (and capsrc_nids) containing all active input pins */ 5829/* fill adc_nids (and capsrc_nids) containing all active input pins */
5830static void fillup_priv_adc_nids(struct hda_codec *codec, hda_nid_t *nids, 5830static void fillup_priv_adc_nids(struct hda_codec *codec, const hda_nid_t *nids,
5831 int num_nids) 5831 int num_nids)
5832{ 5832{
5833 struct alc_spec *spec = codec->spec; 5833 struct alc_spec *spec = codec->spec;
@@ -6004,17 +6004,17 @@ static int patch_alc880(struct hda_codec *codec)
6004 * ALC260 support 6004 * ALC260 support
6005 */ 6005 */
6006 6006
6007static hda_nid_t alc260_dac_nids[1] = { 6007static const hda_nid_t alc260_dac_nids[1] = {
6008 /* front */ 6008 /* front */
6009 0x02, 6009 0x02,
6010}; 6010};
6011 6011
6012static hda_nid_t alc260_adc_nids[1] = { 6012static const hda_nid_t alc260_adc_nids[1] = {
6013 /* ADC0 */ 6013 /* ADC0 */
6014 0x04, 6014 0x04,
6015}; 6015};
6016 6016
6017static hda_nid_t alc260_adc_nids_alt[1] = { 6017static const hda_nid_t alc260_adc_nids_alt[1] = {
6018 /* ADC1 */ 6018 /* ADC1 */
6019 0x05, 6019 0x05,
6020}; 6020};
@@ -6022,7 +6022,7 @@ static hda_nid_t alc260_adc_nids_alt[1] = {
6022/* NIDs used when simultaneous access to both ADCs makes sense. Note that 6022/* NIDs used when simultaneous access to both ADCs makes sense. Note that
6023 * alc260_capture_mixer assumes ADC0 (nid 0x04) is the first ADC. 6023 * alc260_capture_mixer assumes ADC0 (nid 0x04) is the first ADC.
6024 */ 6024 */
6025static hda_nid_t alc260_dual_adc_nids[2] = { 6025static const hda_nid_t alc260_dual_adc_nids[2] = {
6026 /* ADC0, ADC1 */ 6026 /* ADC0, ADC1 */
6027 0x04, 0x05 6027 0x04, 0x05
6028}; 6028};
@@ -6892,10 +6892,10 @@ static const struct hda_verb alc260_hp_dc7600_verbs[] = {
6892 * configuration. 6892 * configuration.
6893 */ 6893 */
6894#ifdef CONFIG_SND_DEBUG 6894#ifdef CONFIG_SND_DEBUG
6895static hda_nid_t alc260_test_dac_nids[1] = { 6895static const hda_nid_t alc260_test_dac_nids[1] = {
6896 0x02, 6896 0x02,
6897}; 6897};
6898static hda_nid_t alc260_test_adc_nids[2] = { 6898static const hda_nid_t alc260_test_adc_nids[2] = {
6899 0x04, 0x05, 6899 0x04, 0x05,
6900}; 6900};
6901/* For testing the ALC260, each input MUX needs its own definition since 6901/* For testing the ALC260, each input MUX needs its own definition since
@@ -7274,7 +7274,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
7274{ 7274{
7275 struct alc_spec *spec = codec->spec; 7275 struct alc_spec *spec = codec->spec;
7276 int err; 7276 int err;
7277 static hda_nid_t alc260_ignore[] = { 0x17, 0 }; 7277 static const hda_nid_t alc260_ignore[] = { 0x17, 0 };
7278 7278
7279 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 7279 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
7280 alc260_ignore); 7280 alc260_ignore);
@@ -7644,7 +7644,7 @@ static const struct hda_channel_mode alc882_ch_modes[1] = {
7644}; 7644};
7645 7645
7646/* DACs */ 7646/* DACs */
7647static hda_nid_t alc882_dac_nids[4] = { 7647static const hda_nid_t alc882_dac_nids[4] = {
7648 /* front, rear, clfe, rear_surr */ 7648 /* front, rear, clfe, rear_surr */
7649 0x02, 0x03, 0x04, 0x05 7649 0x02, 0x03, 0x04, 0x05
7650}; 7650};
@@ -7654,14 +7654,14 @@ static hda_nid_t alc882_dac_nids[4] = {
7654#define alc882_adc_nids alc880_adc_nids 7654#define alc882_adc_nids alc880_adc_nids
7655#define alc882_adc_nids_alt alc880_adc_nids_alt 7655#define alc882_adc_nids_alt alc880_adc_nids_alt
7656#define alc883_adc_nids alc882_adc_nids_alt 7656#define alc883_adc_nids alc882_adc_nids_alt
7657static hda_nid_t alc883_adc_nids_alt[1] = { 0x08 }; 7657static const hda_nid_t alc883_adc_nids_alt[1] = { 0x08 };
7658static hda_nid_t alc883_adc_nids_rev[2] = { 0x09, 0x08 }; 7658static const hda_nid_t alc883_adc_nids_rev[2] = { 0x09, 0x08 };
7659#define alc889_adc_nids alc880_adc_nids 7659#define alc889_adc_nids alc880_adc_nids
7660 7660
7661static hda_nid_t alc882_capsrc_nids[3] = { 0x24, 0x23, 0x22 }; 7661static const hda_nid_t alc882_capsrc_nids[3] = { 0x24, 0x23, 0x22 };
7662static hda_nid_t alc882_capsrc_nids_alt[2] = { 0x23, 0x22 }; 7662static const hda_nid_t alc882_capsrc_nids_alt[2] = { 0x23, 0x22 };
7663#define alc883_capsrc_nids alc882_capsrc_nids_alt 7663#define alc883_capsrc_nids alc882_capsrc_nids_alt
7664static hda_nid_t alc883_capsrc_nids_rev[2] = { 0x22, 0x23 }; 7664static const hda_nid_t alc883_capsrc_nids_rev[2] = { 0x22, 0x23 };
7665#define alc889_capsrc_nids alc882_capsrc_nids 7665#define alc889_capsrc_nids alc882_capsrc_nids
7666 7666
7667/* input MUX */ 7667/* input MUX */
@@ -9972,11 +9972,11 @@ static void alc889A_mb31_unsol_event(struct hda_codec *codec, unsigned int res)
9972#define alc882_pcm_digital_playback alc880_pcm_digital_playback 9972#define alc882_pcm_digital_playback alc880_pcm_digital_playback
9973#define alc882_pcm_digital_capture alc880_pcm_digital_capture 9973#define alc882_pcm_digital_capture alc880_pcm_digital_capture
9974 9974
9975static hda_nid_t alc883_slave_dig_outs[] = { 9975static const hda_nid_t alc883_slave_dig_outs[] = {
9976 ALC1200_DIGOUT_NID, 0, 9976 ALC1200_DIGOUT_NID, 0,
9977}; 9977};
9978 9978
9979static hda_nid_t alc1200_slave_dig_outs[] = { 9979static const hda_nid_t alc1200_slave_dig_outs[] = {
9980 ALC883_DIGOUT_NID, 0, 9980 ALC883_DIGOUT_NID, 0,
9981}; 9981};
9982 9982
@@ -11158,7 +11158,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
11158static int alc882_parse_auto_config(struct hda_codec *codec) 11158static int alc882_parse_auto_config(struct hda_codec *codec)
11159{ 11159{
11160 struct alc_spec *spec = codec->spec; 11160 struct alc_spec *spec = codec->spec;
11161 static hda_nid_t alc882_ignore[] = { 0x1d, 0 }; 11161 static const hda_nid_t alc882_ignore[] = { 0x1d, 0 };
11162 int err; 11162 int err;
11163 11163
11164 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 11164 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
@@ -11375,12 +11375,12 @@ static int patch_alc882(struct hda_codec *codec)
11375#define alc262_modes alc260_modes 11375#define alc262_modes alc260_modes
11376#define alc262_capture_source alc882_capture_source 11376#define alc262_capture_source alc882_capture_source
11377 11377
11378static hda_nid_t alc262_dmic_adc_nids[1] = { 11378static const hda_nid_t alc262_dmic_adc_nids[1] = {
11379 /* ADC0 */ 11379 /* ADC0 */
11380 0x09 11380 0x09
11381}; 11381};
11382 11382
11383static hda_nid_t alc262_dmic_capsrc_nids[1] = { 0x22 }; 11383static const hda_nid_t alc262_dmic_capsrc_nids[1] = { 0x22 };
11384 11384
11385static const struct snd_kcontrol_new alc262_base_mixer[] = { 11385static const struct snd_kcontrol_new alc262_base_mixer[] = {
11386 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 11386 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
@@ -12590,7 +12590,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
12590{ 12590{
12591 struct alc_spec *spec = codec->spec; 12591 struct alc_spec *spec = codec->spec;
12592 int err; 12592 int err;
12593 static hda_nid_t alc262_ignore[] = { 0x1d, 0 }; 12593 static const hda_nid_t alc262_ignore[] = { 0x1d, 0 };
12594 12594
12595 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 12595 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
12596 alc262_ignore); 12596 alc262_ignore);
@@ -13100,22 +13100,22 @@ static int patch_alc262(struct hda_codec *codec)
13100#define ALC268_DIGOUT_NID ALC880_DIGOUT_NID 13100#define ALC268_DIGOUT_NID ALC880_DIGOUT_NID
13101#define alc268_modes alc260_modes 13101#define alc268_modes alc260_modes
13102 13102
13103static hda_nid_t alc268_dac_nids[2] = { 13103static const hda_nid_t alc268_dac_nids[2] = {
13104 /* front, hp */ 13104 /* front, hp */
13105 0x02, 0x03 13105 0x02, 0x03
13106}; 13106};
13107 13107
13108static hda_nid_t alc268_adc_nids[2] = { 13108static const hda_nid_t alc268_adc_nids[2] = {
13109 /* ADC0-1 */ 13109 /* ADC0-1 */
13110 0x08, 0x07 13110 0x08, 0x07
13111}; 13111};
13112 13112
13113static hda_nid_t alc268_adc_nids_alt[1] = { 13113static const hda_nid_t alc268_adc_nids_alt[1] = {
13114 /* ADC0 */ 13114 /* ADC0 */
13115 0x08 13115 0x08
13116}; 13116};
13117 13117
13118static hda_nid_t alc268_capsrc_nids[2] = { 0x23, 0x24 }; 13118static const hda_nid_t alc268_capsrc_nids[2] = { 0x23, 0x24 };
13119 13119
13120static const struct snd_kcontrol_new alc268_base_mixer[] = { 13120static const struct snd_kcontrol_new alc268_base_mixer[] = {
13121 /* output mixer control */ 13121 /* output mixer control */
@@ -13726,7 +13726,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
13726{ 13726{
13727 struct alc_spec *spec = codec->spec; 13727 struct alc_spec *spec = codec->spec;
13728 int err; 13728 int err;
13729 static hda_nid_t alc268_ignore[] = { 0 }; 13729 static const hda_nid_t alc268_ignore[] = { 0 };
13730 13730
13731 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 13731 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
13732 alc268_ignore); 13732 alc268_ignore);
@@ -14113,25 +14113,25 @@ static int patch_alc268(struct hda_codec *codec)
14113 14113
14114#define alc269_dac_nids alc260_dac_nids 14114#define alc269_dac_nids alc260_dac_nids
14115 14115
14116static hda_nid_t alc269_adc_nids[1] = { 14116static const hda_nid_t alc269_adc_nids[1] = {
14117 /* ADC1 */ 14117 /* ADC1 */
14118 0x08, 14118 0x08,
14119}; 14119};
14120 14120
14121static hda_nid_t alc269_capsrc_nids[1] = { 14121static const hda_nid_t alc269_capsrc_nids[1] = {
14122 0x23, 14122 0x23,
14123}; 14123};
14124 14124
14125static hda_nid_t alc269vb_adc_nids[1] = { 14125static const hda_nid_t alc269vb_adc_nids[1] = {
14126 /* ADC1 */ 14126 /* ADC1 */
14127 0x09, 14127 0x09,
14128}; 14128};
14129 14129
14130static hda_nid_t alc269vb_capsrc_nids[1] = { 14130static const hda_nid_t alc269vb_capsrc_nids[1] = {
14131 0x22, 14131 0x22,
14132}; 14132};
14133 14133
14134static hda_nid_t alc269_adc_candidates[] = { 14134static const hda_nid_t alc269_adc_candidates[] = {
14135 0x08, 0x09, 0x07, 0x11, 14135 0x08, 0x09, 0x07, 0x11,
14136}; 14136};
14137 14137
@@ -14696,7 +14696,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
14696{ 14696{
14697 struct alc_spec *spec = codec->spec; 14697 struct alc_spec *spec = codec->spec;
14698 int err; 14698 int err;
14699 static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; 14699 static const hda_nid_t alc269_ignore[] = { 0x1d, 0 };
14700 14700
14701 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 14701 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
14702 alc269_ignore); 14702 alc269_ignore);
@@ -15886,17 +15886,17 @@ static const struct hda_channel_mode alc861_8ch_modes[1] = {
15886 { 8, NULL } 15886 { 8, NULL }
15887}; 15887};
15888 15888
15889static hda_nid_t alc861_dac_nids[4] = { 15889static const hda_nid_t alc861_dac_nids[4] = {
15890 /* front, surround, clfe, side */ 15890 /* front, surround, clfe, side */
15891 0x03, 0x06, 0x05, 0x04 15891 0x03, 0x06, 0x05, 0x04
15892}; 15892};
15893 15893
15894static hda_nid_t alc660_dac_nids[3] = { 15894static const hda_nid_t alc660_dac_nids[3] = {
15895 /* front, clfe, surround */ 15895 /* front, clfe, surround */
15896 0x03, 0x05, 0x06 15896 0x03, 0x05, 0x06
15897}; 15897};
15898 15898
15899static hda_nid_t alc861_adc_nids[1] = { 15899static const hda_nid_t alc861_adc_nids[1] = {
15900 /* ADC0-2 */ 15900 /* ADC0-2 */
15901 0x08, 15901 0x08,
15902}; 15902};
@@ -16115,7 +16115,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
16115{ 16115{
16116 struct alc_spec *spec = codec->spec; 16116 struct alc_spec *spec = codec->spec;
16117 int err; 16117 int err;
16118 static hda_nid_t alc861_ignore[] = { 0x1d, 0 }; 16118 static const hda_nid_t alc861_ignore[] = { 0x1d, 0 };
16119 16119
16120 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 16120 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
16121 alc861_ignore); 16121 alc861_ignore);
@@ -16439,7 +16439,7 @@ static int patch_alc861(struct hda_codec *codec)
16439 */ 16439 */
16440#define ALC861VD_DIGOUT_NID 0x06 16440#define ALC861VD_DIGOUT_NID 0x06
16441 16441
16442static hda_nid_t alc861vd_dac_nids[4] = { 16442static const hda_nid_t alc861vd_dac_nids[4] = {
16443 /* front, surr, clfe, side surr */ 16443 /* front, surr, clfe, side surr */
16444 0x02, 0x03, 0x04, 0x05 16444 0x02, 0x03, 0x04, 0x05
16445}; 16445};
@@ -16451,17 +16451,17 @@ static hda_nid_t alc861vd_dac_nids[4] = {
16451 * - and it is the same as in 861vd. 16451 * - and it is the same as in 861vd.
16452 * adc_nids in ALC660vd are (is) the same as in 861vd 16452 * adc_nids in ALC660vd are (is) the same as in 861vd
16453 */ 16453 */
16454static hda_nid_t alc660vd_dac_nids[3] = { 16454static const hda_nid_t alc660vd_dac_nids[3] = {
16455 /* front, rear, clfe, rear_surr */ 16455 /* front, rear, clfe, rear_surr */
16456 0x02, 0x04, 0x03 16456 0x02, 0x04, 0x03
16457}; 16457};
16458 16458
16459static hda_nid_t alc861vd_adc_nids[1] = { 16459static const hda_nid_t alc861vd_adc_nids[1] = {
16460 /* ADC0 */ 16460 /* ADC0 */
16461 0x09, 16461 0x09,
16462}; 16462};
16463 16463
16464static hda_nid_t alc861vd_capsrc_nids[1] = { 0x22 }; 16464static const hda_nid_t alc861vd_capsrc_nids[1] = { 0x22 };
16465 16465
16466/* input MUX */ 16466/* input MUX */
16467/* FIXME: should be a matrix-type input source selection */ 16467/* FIXME: should be a matrix-type input source selection */
@@ -17238,7 +17238,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
17238{ 17238{
17239 struct alc_spec *spec = codec->spec; 17239 struct alc_spec *spec = codec->spec;
17240 int err; 17240 int err;
17241 static hda_nid_t alc861vd_ignore[] = { 0x1d, 0 }; 17241 static const hda_nid_t alc861vd_ignore[] = { 0x1d, 0 };
17242 17242
17243 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 17243 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
17244 alc861vd_ignore); 17244 alc861vd_ignore);
@@ -17427,27 +17427,27 @@ static int patch_alc861vd(struct hda_codec *codec)
17427#define ALC662_DIGOUT_NID 0x06 17427#define ALC662_DIGOUT_NID 0x06
17428#define ALC662_DIGIN_NID 0x0a 17428#define ALC662_DIGIN_NID 0x0a
17429 17429
17430static hda_nid_t alc662_dac_nids[3] = { 17430static const hda_nid_t alc662_dac_nids[3] = {
17431 /* front, rear, clfe */ 17431 /* front, rear, clfe */
17432 0x02, 0x03, 0x04 17432 0x02, 0x03, 0x04
17433}; 17433};
17434 17434
17435static hda_nid_t alc272_dac_nids[2] = { 17435static const hda_nid_t alc272_dac_nids[2] = {
17436 0x02, 0x03 17436 0x02, 0x03
17437}; 17437};
17438 17438
17439static hda_nid_t alc662_adc_nids[2] = { 17439static const hda_nid_t alc662_adc_nids[2] = {
17440 /* ADC1-2 */ 17440 /* ADC1-2 */
17441 0x09, 0x08 17441 0x09, 0x08
17442}; 17442};
17443 17443
17444static hda_nid_t alc272_adc_nids[1] = { 17444static const hda_nid_t alc272_adc_nids[1] = {
17445 /* ADC1-2 */ 17445 /* ADC1-2 */
17446 0x08, 17446 0x08,
17447}; 17447};
17448 17448
17449static hda_nid_t alc662_capsrc_nids[2] = { 0x22, 0x23 }; 17449static const hda_nid_t alc662_capsrc_nids[2] = { 0x22, 0x23 };
17450static hda_nid_t alc272_capsrc_nids[1] = { 0x23 }; 17450static const hda_nid_t alc272_capsrc_nids[1] = { 0x23 };
17451 17451
17452 17452
17453/* input MUX */ 17453/* input MUX */
@@ -19292,7 +19292,7 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
19292{ 19292{
19293 struct alc_spec *spec = codec->spec; 19293 struct alc_spec *spec = codec->spec;
19294 int err; 19294 int err;
19295 static hda_nid_t alc662_ignore[] = { 0x1d, 0 }; 19295 static const hda_nid_t alc662_ignore[] = { 0x1d, 0 };
19296 19296
19297 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 19297 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
19298 alc662_ignore); 19298 alc662_ignore);
@@ -19571,12 +19571,12 @@ static int patch_alc888(struct hda_codec *codec)
19571#define ALC680_DIGOUT_NID ALC880_DIGOUT_NID 19571#define ALC680_DIGOUT_NID ALC880_DIGOUT_NID
19572#define alc680_modes alc260_modes 19572#define alc680_modes alc260_modes
19573 19573
19574static hda_nid_t alc680_dac_nids[3] = { 19574static const hda_nid_t alc680_dac_nids[3] = {
19575 /* Lout1, Lout2, hp */ 19575 /* Lout1, Lout2, hp */
19576 0x02, 0x03, 0x04 19576 0x02, 0x03, 0x04
19577}; 19577};
19578 19578
19579static hda_nid_t alc680_adc_nids[3] = { 19579static const hda_nid_t alc680_adc_nids[3] = {
19580 /* ADC0-2 */ 19580 /* ADC0-2 */
19581 /* DMIC, MIC, Line-in*/ 19581 /* DMIC, MIC, Line-in*/
19582 0x07, 0x08, 0x09 19582 0x07, 0x08, 0x09
@@ -19872,7 +19872,7 @@ static int alc680_parse_auto_config(struct hda_codec *codec)
19872{ 19872{
19873 struct alc_spec *spec = codec->spec; 19873 struct alc_spec *spec = codec->spec;
19874 int err; 19874 int err;
19875 static hda_nid_t alc680_ignore[] = { 0 }; 19875 static const hda_nid_t alc680_ignore[] = { 0 };
19876 19876
19877 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 19877 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
19878 alc680_ignore); 19878 alc680_ignore);