diff options
-rw-r--r-- | include/uapi/sound/asound.h | 2 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 12 | ||||
-rw-r--r-- | sound/pci/hda/hda_jack.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 8 |
6 files changed, 15 insertions, 13 deletions
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index e3983d508272..041203f20f6d 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h | |||
@@ -817,6 +817,8 @@ typedef int __bitwise snd_ctl_elem_iface_t; | |||
817 | #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ | 817 | #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ |
818 | #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ | 818 | #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ |
819 | 819 | ||
820 | #define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 | ||
821 | |||
820 | struct snd_ctl_elem_id { | 822 | struct snd_ctl_elem_id { |
821 | unsigned int numid; /* numeric identifier, zero = invalid */ | 823 | unsigned int numid; /* numeric identifier, zero = invalid */ |
822 | snd_ctl_elem_iface_t iface; /* interface identifier */ | 824 | snd_ctl_elem_iface_t iface; /* interface identifier */ |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index d37c683cfd7a..445ca481d8d3 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1296,7 +1296,7 @@ static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, | |||
1296 | struct snd_ac97 *ac97) | 1296 | struct snd_ac97 *ac97) |
1297 | { | 1297 | { |
1298 | int err; | 1298 | int err; |
1299 | char name[44]; | 1299 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
1300 | unsigned char lo_max, hi_max; | 1300 | unsigned char lo_max, hi_max; |
1301 | 1301 | ||
1302 | if (! snd_ac97_valid_reg(ac97, reg)) | 1302 | if (! snd_ac97_valid_reg(ac97, reg)) |
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index fbc17203613c..185d54a5cb1a 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -1278,7 +1278,7 @@ struct hpi_control { | |||
1278 | u16 dst_node_type; | 1278 | u16 dst_node_type; |
1279 | u16 dst_node_index; | 1279 | u16 dst_node_index; |
1280 | u16 band; | 1280 | u16 band; |
1281 | char name[44]; /* copied to snd_ctl_elem_id.name[44]; */ | 1281 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* copied to snd_ctl_elem_id.name[44]; */ |
1282 | }; | 1282 | }; |
1283 | 1283 | ||
1284 | static const char * const asihpi_tuner_band_names[] = { | 1284 | static const char * const asihpi_tuner_band_names[] = { |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 6460fc519d36..8e77cbbad871 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -854,7 +854,7 @@ static int add_control_with_pfx(struct hda_gen_spec *spec, int type, | |||
854 | const char *pfx, const char *dir, | 854 | const char *pfx, const char *dir, |
855 | const char *sfx, int cidx, unsigned long val) | 855 | const char *sfx, int cidx, unsigned long val) |
856 | { | 856 | { |
857 | char name[44]; | 857 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
858 | snprintf(name, sizeof(name), "%s %s %s", pfx, dir, sfx); | 858 | snprintf(name, sizeof(name), "%s %s %s", pfx, dir, sfx); |
859 | if (!add_control(spec, type, name, cidx, val)) | 859 | if (!add_control(spec, type, name, cidx, val)) |
860 | return -ENOMEM; | 860 | return -ENOMEM; |
@@ -1931,7 +1931,7 @@ static int create_extra_outs(struct hda_codec *codec, int num_pins, | |||
1931 | 1931 | ||
1932 | for (i = 0; i < num_pins; i++) { | 1932 | for (i = 0; i < num_pins; i++) { |
1933 | const char *name; | 1933 | const char *name; |
1934 | char tmp[44]; | 1934 | char tmp[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
1935 | int err, idx = 0; | 1935 | int err, idx = 0; |
1936 | 1936 | ||
1937 | if (num_pins == 2 && i == 1 && !strcmp(pfx, "Speaker")) | 1937 | if (num_pins == 2 && i == 1 && !strcmp(pfx, "Speaker")) |
@@ -2484,7 +2484,7 @@ static int create_out_jack_modes(struct hda_codec *codec, int num_pins, | |||
2484 | } | 2484 | } |
2485 | if (get_out_jack_num_items(codec, pin) > 1) { | 2485 | if (get_out_jack_num_items(codec, pin) > 1) { |
2486 | struct snd_kcontrol_new *knew; | 2486 | struct snd_kcontrol_new *knew; |
2487 | char name[44]; | 2487 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
2488 | get_jack_mode_name(codec, pin, name, sizeof(name)); | 2488 | get_jack_mode_name(codec, pin, name, sizeof(name)); |
2489 | knew = snd_hda_gen_add_kctl(spec, name, | 2489 | knew = snd_hda_gen_add_kctl(spec, name, |
2490 | &out_jack_mode_enum); | 2490 | &out_jack_mode_enum); |
@@ -2616,7 +2616,7 @@ static int create_in_jack_mode(struct hda_codec *codec, hda_nid_t pin) | |||
2616 | { | 2616 | { |
2617 | struct hda_gen_spec *spec = codec->spec; | 2617 | struct hda_gen_spec *spec = codec->spec; |
2618 | struct snd_kcontrol_new *knew; | 2618 | struct snd_kcontrol_new *knew; |
2619 | char name[44]; | 2619 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
2620 | unsigned int defcfg; | 2620 | unsigned int defcfg; |
2621 | 2621 | ||
2622 | if (pin == spec->hp_mic_pin) | 2622 | if (pin == spec->hp_mic_pin) |
@@ -3316,7 +3316,7 @@ static int add_single_cap_ctl(struct hda_codec *codec, const char *label, | |||
3316 | bool inv_dmic) | 3316 | bool inv_dmic) |
3317 | { | 3317 | { |
3318 | struct hda_gen_spec *spec = codec->spec; | 3318 | struct hda_gen_spec *spec = codec->spec; |
3319 | char tmpname[44]; | 3319 | char tmpname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
3320 | int type = is_switch ? HDA_CTL_WIDGET_MUTE : HDA_CTL_WIDGET_VOL; | 3320 | int type = is_switch ? HDA_CTL_WIDGET_MUTE : HDA_CTL_WIDGET_VOL; |
3321 | const char *sfx = is_switch ? "Switch" : "Volume"; | 3321 | const char *sfx = is_switch ? "Switch" : "Volume"; |
3322 | unsigned int chs = inv_dmic ? 1 : 3; | 3322 | unsigned int chs = inv_dmic ? 1 : 3; |
@@ -3578,7 +3578,7 @@ static int parse_mic_boost(struct hda_codec *codec) | |||
3578 | struct nid_path *path; | 3578 | struct nid_path *path; |
3579 | unsigned int val; | 3579 | unsigned int val; |
3580 | int idx; | 3580 | int idx; |
3581 | char boost_label[44]; | 3581 | char boost_label[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
3582 | 3582 | ||
3583 | idx = imux->items[i].index; | 3583 | idx = imux->items[i].index; |
3584 | if (idx >= imux->num_items) | 3584 | if (idx >= imux->num_items) |
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 9e0a95288f46..3fd2973183e2 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c | |||
@@ -398,7 +398,7 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid, | |||
398 | const char *base_name) | 398 | const char *base_name) |
399 | { | 399 | { |
400 | unsigned int def_conf, conn; | 400 | unsigned int def_conf, conn; |
401 | char name[44]; | 401 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
402 | int idx, err; | 402 | int idx, err; |
403 | bool phantom_jack; | 403 | bool phantom_jack; |
404 | 404 | ||
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 90ff7a3f72df..6e9876f27d95 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c | |||
@@ -139,7 +139,7 @@ enum { | |||
139 | #define DSP_SPEAKER_OUT_LATENCY 7 | 139 | #define DSP_SPEAKER_OUT_LATENCY 7 |
140 | 140 | ||
141 | struct ct_effect { | 141 | struct ct_effect { |
142 | char name[44]; | 142 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
143 | hda_nid_t nid; | 143 | hda_nid_t nid; |
144 | int mid; /*effect module ID*/ | 144 | int mid; /*effect module ID*/ |
145 | int reqs[EFFECT_VALS_MAX_COUNT]; /*effect module request*/ | 145 | int reqs[EFFECT_VALS_MAX_COUNT]; /*effect module request*/ |
@@ -270,7 +270,7 @@ enum { | |||
270 | }; | 270 | }; |
271 | 271 | ||
272 | struct ct_tuning_ctl { | 272 | struct ct_tuning_ctl { |
273 | char name[44]; | 273 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
274 | hda_nid_t parent_nid; | 274 | hda_nid_t parent_nid; |
275 | hda_nid_t nid; | 275 | hda_nid_t nid; |
276 | int mid; /*effect module ID*/ | 276 | int mid; /*effect module ID*/ |
@@ -3103,7 +3103,7 @@ static int add_tuning_control(struct hda_codec *codec, | |||
3103 | hda_nid_t pnid, hda_nid_t nid, | 3103 | hda_nid_t pnid, hda_nid_t nid, |
3104 | const char *name, int dir) | 3104 | const char *name, int dir) |
3105 | { | 3105 | { |
3106 | char namestr[44]; | 3106 | char namestr[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
3107 | int type = dir ? HDA_INPUT : HDA_OUTPUT; | 3107 | int type = dir ? HDA_INPUT : HDA_OUTPUT; |
3108 | struct snd_kcontrol_new knew = | 3108 | struct snd_kcontrol_new knew = |
3109 | HDA_CODEC_VOLUME_MONO(namestr, nid, 1, 0, type); | 3109 | HDA_CODEC_VOLUME_MONO(namestr, nid, 1, 0, type); |
@@ -3935,7 +3935,7 @@ static int ca0132_volume_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
3935 | static int add_fx_switch(struct hda_codec *codec, hda_nid_t nid, | 3935 | static int add_fx_switch(struct hda_codec *codec, hda_nid_t nid, |
3936 | const char *pfx, int dir) | 3936 | const char *pfx, int dir) |
3937 | { | 3937 | { |
3938 | char namestr[44]; | 3938 | char namestr[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
3939 | int type = dir ? HDA_INPUT : HDA_OUTPUT; | 3939 | int type = dir ? HDA_INPUT : HDA_OUTPUT; |
3940 | struct snd_kcontrol_new knew = | 3940 | struct snd_kcontrol_new knew = |
3941 | CA0132_CODEC_MUTE_MONO(namestr, nid, 1, type); | 3941 | CA0132_CODEC_MUTE_MONO(namestr, nid, 1, type); |