diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-21 02:51:45 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-21 02:51:45 -0400 |
commit | 1bc10bb68d348078af0eb8b64292ec542dcd7634 (patch) | |
tree | 5f17afb80a52830cc99e2decefbd3d57b0dc53ff | |
parent | 3b7a00dc9e4277d6fcad68dd1db35f77264ede5f (diff) |
ALSA: ac97: Constify more text arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 22 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.h | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 50f420d69a8a..ceaac1c41906 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -33,7 +33,8 @@ | |||
33 | static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, | 33 | static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, |
34 | const char *name); | 34 | const char *name); |
35 | static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, | 35 | static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, |
36 | const unsigned int *tlv, const char **slaves); | 36 | const unsigned int *tlv, |
37 | const char * const *slaves); | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * Chip specific initialization | 40 | * Chip specific initialization |
@@ -3196,7 +3197,9 @@ static int cm9761_spdif_out_source_put(struct snd_kcontrol *kcontrol, struct snd | |||
3196 | ucontrol->value.enumerated.item[0] == 1 ? 0x2 : 0); | 3197 | ucontrol->value.enumerated.item[0] == 1 ? 0x2 : 0); |
3197 | } | 3198 | } |
3198 | 3199 | ||
3199 | static const char *cm9761_dac_clock[] = { "AC-Link", "SPDIF-In", "Both" }; | 3200 | static const char * const cm9761_dac_clock[] = { |
3201 | "AC-Link", "SPDIF-In", "Both" | ||
3202 | }; | ||
3200 | static const struct ac97_enum cm9761_dac_clock_enum = | 3203 | static const struct ac97_enum cm9761_dac_clock_enum = |
3201 | AC97_ENUM_SINGLE(AC97_CM9761_SPDIF_CTRL, 9, 3, cm9761_dac_clock); | 3204 | AC97_ENUM_SINGLE(AC97_CM9761_SPDIF_CTRL, 9, 3, cm9761_dac_clock); |
3202 | 3205 | ||
@@ -3310,7 +3313,9 @@ static int patch_cm9761(struct snd_ac97 *ac97) | |||
3310 | #define AC97_CM9780_MULTI_CHAN 0x66 | 3313 | #define AC97_CM9780_MULTI_CHAN 0x66 |
3311 | #define AC97_CM9780_SPDIF 0x6c | 3314 | #define AC97_CM9780_SPDIF 0x6c |
3312 | 3315 | ||
3313 | static const char *cm9780_ch_select[] = { "Front", "Side", "Center/LFE", "Rear" }; | 3316 | static const char * const cm9780_ch_select[] = { |
3317 | "Front", "Side", "Center/LFE", "Rear" | ||
3318 | }; | ||
3314 | static const struct ac97_enum cm9780_ch_select_enum = | 3319 | static const struct ac97_enum cm9780_ch_select_enum = |
3315 | AC97_ENUM_SINGLE(AC97_CM9780_MULTI_CHAN, 6, 4, cm9780_ch_select); | 3320 | AC97_ENUM_SINGLE(AC97_CM9780_MULTI_CHAN, 6, 4, cm9780_ch_select); |
3316 | static const struct snd_kcontrol_new cm9780_controls[] = { | 3321 | static const struct snd_kcontrol_new cm9780_controls[] = { |
@@ -3356,7 +3361,7 @@ AC97_SINGLE("Downmix LFE and Center to Front", 0x5a, 12, 1, 0), | |||
3356 | AC97_SINGLE("Downmix Surround to Front", 0x5a, 11, 1, 0), | 3361 | AC97_SINGLE("Downmix Surround to Front", 0x5a, 11, 1, 0), |
3357 | }; | 3362 | }; |
3358 | 3363 | ||
3359 | static const char *slave_vols_vt1616[] = { | 3364 | static const char * const slave_vols_vt1616[] = { |
3360 | "Front Playback Volume", | 3365 | "Front Playback Volume", |
3361 | "Surround Playback Volume", | 3366 | "Surround Playback Volume", |
3362 | "Center Playback Volume", | 3367 | "Center Playback Volume", |
@@ -3364,7 +3369,7 @@ static const char *slave_vols_vt1616[] = { | |||
3364 | NULL | 3369 | NULL |
3365 | }; | 3370 | }; |
3366 | 3371 | ||
3367 | static const char *slave_sws_vt1616[] = { | 3372 | static const char * const slave_sws_vt1616[] = { |
3368 | "Front Playback Switch", | 3373 | "Front Playback Switch", |
3369 | "Surround Playback Switch", | 3374 | "Surround Playback Switch", |
3370 | "Center Playback Switch", | 3375 | "Center Playback Switch", |
@@ -3385,10 +3390,11 @@ static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, | |||
3385 | 3390 | ||
3386 | /* create a virtual master control and add slaves */ | 3391 | /* create a virtual master control and add slaves */ |
3387 | static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, | 3392 | static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, |
3388 | const unsigned int *tlv, const char **slaves) | 3393 | const unsigned int *tlv, |
3394 | const char * const *slaves) | ||
3389 | { | 3395 | { |
3390 | struct snd_kcontrol *kctl; | 3396 | struct snd_kcontrol *kctl; |
3391 | const char **s; | 3397 | const char * const *s; |
3392 | int err; | 3398 | int err; |
3393 | 3399 | ||
3394 | kctl = snd_ctl_make_virtual_master(name, tlv); | 3400 | kctl = snd_ctl_make_virtual_master(name, tlv); |
@@ -3612,7 +3618,7 @@ static int patch_vt1617a(struct snd_ac97 * ac97) | |||
3612 | struct vt1618_uaj_item { | 3618 | struct vt1618_uaj_item { |
3613 | unsigned short mask; | 3619 | unsigned short mask; |
3614 | unsigned short shift; | 3620 | unsigned short shift; |
3615 | const char *items[4]; | 3621 | const char * const items[4]; |
3616 | }; | 3622 | }; |
3617 | 3623 | ||
3618 | /* This list reflects the vt1618 docs for Vendor Defined Register 0x60. */ | 3624 | /* This list reflects the vt1618 docs for Vendor Defined Register 0x60. */ |
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h index 47bf8dfe8276..d1ce151fe722 100644 --- a/sound/pci/ac97/ac97_patch.h +++ b/sound/pci/ac97/ac97_patch.h | |||
@@ -49,7 +49,7 @@ struct ac97_enum { | |||
49 | unsigned char shift_l; | 49 | unsigned char shift_l; |
50 | unsigned char shift_r; | 50 | unsigned char shift_r; |
51 | unsigned short mask; | 51 | unsigned short mask; |
52 | const char **texts; | 52 | const char * const *texts; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ | 55 | #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ |