Commit a2af050f authored by Takashi Iwai's avatar Takashi Iwai

ALSA: ice17xx: Constify strings and string arrays

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 77b0b254
......@@ -203,7 +203,8 @@ static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg,
static int aureon_universe_inmux_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
char *texts[3] = {"Internal Aux", "Wavetable", "Rear Line-In"};
static const char * const texts[3] =
{"Internal Aux", "Wavetable", "Rear Line-In"};
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
......
......@@ -576,7 +576,7 @@ static int __devinit snd_ice1712_ews_init(struct snd_ice1712 *ice)
/* i/o sensitivity - this callback is shared among other devices, too */
static int snd_ice1712_ewx_io_sense_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){
static char *texts[2] = {
static const char * const texts[2] = {
"+4dBu", "-10dBV",
};
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
......@@ -899,7 +899,7 @@ static int snd_ice1712_6fire_control_put(struct snd_kcontrol *kcontrol, struct s
static int snd_ice1712_6fire_select_input_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
static char *texts[4] = {
static const char * const texts[4] = {
"Internal", "Front Input", "Rear Input", "Wave Table"
};
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
......
......@@ -383,7 +383,7 @@ struct snd_ice1712 {
unsigned char (*set_mclk)(struct snd_ice1712 *ice, unsigned int rate);
int (*set_spdif_clock)(struct snd_ice1712 *ice, int type);
int (*get_spdif_master_type)(struct snd_ice1712 *ice);
char **ext_clock_names;
const char * const *ext_clock_names;
int ext_clock_count;
void (*pro_open)(struct snd_ice1712 *, struct snd_pcm_substream *);
#ifdef CONFIG_PM_SLEEP
......@@ -515,9 +515,9 @@ static inline u8 snd_ice1712_read(struct snd_ice1712 *ice, u8 addr)
struct snd_ice1712_card_info {
unsigned int subvendor;
char *name;
char *model;
char *driver;
const char *name;
const char *model;
const char *driver;
int (*chip_init)(struct snd_ice1712 *);
void (*chip_exit)(struct snd_ice1712 *);
int (*build_controls)(struct snd_ice1712 *);
......
......@@ -107,7 +107,7 @@ static int PRO_RATE_LOCKED;
static int PRO_RATE_RESET = 1;
static unsigned int PRO_RATE_DEFAULT = 44100;
static char *ext_clock_names[1] = { "IEC958 In" };
static const char * const ext_clock_names[1] = { "IEC958 In" };
/*
* Basic I/O
......@@ -2043,7 +2043,7 @@ static struct snd_kcontrol_new snd_vt1724_pro_rate_reset __devinitdata = {
static int snd_vt1724_pro_route_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[] = {
static const char * const texts[] = {
"PCM Out", /* 0 */
"H/W In 0", "H/W In 1", /* 1-2 */
"IEC958 In L", "IEC958 In R", /* 3-4 */
......@@ -2233,7 +2233,7 @@ static unsigned char ooaoo_sq210_eeprom[] __devinitdata = {
};
struct snd_ice1712_card_info snd_vt1724_ooaoo_cards[] __devinitdata = {
static struct snd_ice1712_card_info snd_vt1724_ooaoo_cards[] __devinitdata = {
{
.name = "ooAoo SQ210a",
.model = "sq210a",
......
......@@ -435,7 +435,8 @@ static struct snd_kcontrol __devinit *ctl_find(struct snd_card *card,
}
static void __devinit add_slaves(struct snd_card *card,
struct snd_kcontrol *master, char **list)
struct snd_kcontrol *master,
char * const *list)
{
for (; *list; list++) {
struct snd_kcontrol *slave = ctl_find(card, *list);
......
......@@ -358,7 +358,7 @@ static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line)
static int maya_rec_src_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[] = { "Line", "Mic" };
static const char * const texts[] = { "Line", "Mic" };
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
......@@ -407,7 +407,7 @@ static int maya_rec_src_put(struct snd_kcontrol *kcontrol,
static int maya_pb_route_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[] = {
static const char * const texts[] = {
"PCM Out", /* 0 */
"Input 1", "Input 2", "Input 3", "Input 4"
};
......
......@@ -722,7 +722,7 @@ static int phase28_deemp_put(struct snd_kcontrol *kcontrol,
static int phase28_oversampling_info(struct snd_kcontrol *k,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[2] = { "128x", "64x" };
static const char * const texts[2] = { "128x", "64x" };
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
......
......@@ -283,7 +283,7 @@ static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
static int stac9460_mic_sw_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[2] = { "Line In", "Mic" };
static const char * const texts[2] = { "Line In", "Mic" };
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
......@@ -562,7 +562,7 @@ static unsigned char prodigy192_ak4114_read(void *private_data,
static int ak4114_input_sw_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[2] = { "Toslink", "Coax" };
static const char * const texts[2] = { "Toslink", "Coax" };
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
......
......@@ -254,7 +254,7 @@ static bool psc724_get_jack_detection(struct snd_ice1712 *ice)
/* mixer controls */
struct psc724_control {
char *name;
const char *name;
void (*set)(struct snd_ice1712 *ice, bool on);
bool (*get)(struct snd_ice1712 *ice);
};
......@@ -294,27 +294,27 @@ static int psc724_ctl_put(struct snd_kcontrol *kcontrol,
return 0;
}
static char *front_volume = "Front Playback Volume";
static char *front_switch = "Front Playback Switch";
static char *front_zc = "Front Zero Cross Detect Playback Switch";
static char *front_izd = "Front Infinite Zero Detect Playback Switch";
static char *front_phase = "Front Phase Invert Playback Switch";
static char *front_deemph = "Front Deemphasis Playback Switch";
static char *ain1_switch = "Line Capture Switch";
static char *ain2_switch = "CD Capture Switch";
static char *ain3_switch = "AUX Capture Switch";
static char *ain4_switch = "Front Mic Capture Switch";
static char *ain5_switch = "Rear Mic Capture Switch";
static char *rear_volume = "Surround Playback Volume";
static char *clfe_volume = "CLFE Playback Volume";
static char *rear_switch = "Surround Playback Switch";
static char *clfe_switch = "CLFE Playback Switch";
static char *rear_phase = "Surround Phase Invert Playback Switch";
static char *clfe_phase = "CLFE Phase Invert Playback Switch";
static char *rear_deemph = "Surround Deemphasis Playback Switch";
static char *clfe_deemph = "CLFE Deemphasis Playback Switch";
static char *rear_clfe_izd = "Rear Infinite Zero Detect Playback Switch";
static char *rear_clfe_zc = "Rear Zero Cross Detect Playback Switch";
static const char *front_volume = "Front Playback Volume";
static const char *front_switch = "Front Playback Switch";
static const char *front_zc = "Front Zero Cross Detect Playback Switch";
static const char *front_izd = "Front Infinite Zero Detect Playback Switch";
static const char *front_phase = "Front Phase Invert Playback Switch";
static const char *front_deemph = "Front Deemphasis Playback Switch";
static const char *ain1_switch = "Line Capture Switch";
static const char *ain2_switch = "CD Capture Switch";
static const char *ain3_switch = "AUX Capture Switch";
static const char *ain4_switch = "Front Mic Capture Switch";
static const char *ain5_switch = "Rear Mic Capture Switch";
static const char *rear_volume = "Surround Playback Volume";
static const char *clfe_volume = "CLFE Playback Volume";
static const char *rear_switch = "Surround Playback Switch";
static const char *clfe_switch = "CLFE Playback Switch";
static const char *rear_phase = "Surround Phase Invert Playback Switch";
static const char *clfe_phase = "CLFE Phase Invert Playback Switch";
static const char *rear_deemph = "Surround Deemphasis Playback Switch";
static const char *clfe_deemph = "CLFE Deemphasis Playback Switch";
static const char *rear_clfe_izd = "Rear Infinite Zero Detect Playback Switch";
static const char *rear_clfe_zc = "Rear Zero Cross Detect Playback Switch";
static int __devinit psc724_add_controls(struct snd_ice1712 *ice)
{
......
......@@ -47,7 +47,7 @@ struct qtet_kcontrol_private {
unsigned int bit;
void (*set_register)(struct snd_ice1712 *ice, unsigned int val);
unsigned int (*get_register)(struct snd_ice1712 *ice);
unsigned char *texts[2];
unsigned char * const texts[2];
};
enum {
......@@ -63,7 +63,7 @@ enum {
OUT34_MON12,
};
static char *ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS",
static const char * const ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS",
"Word Clock 256xFS"};
/* chip address on I2C bus */
......@@ -551,7 +551,8 @@ static int qtet_mute_put(struct snd_kcontrol *kcontrol,
static int qtet_ain12_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
static char *texts[3] = {"Line In 1/2", "Mic", "Mic + Low-cut"};
static const char * const texts[3] =
{"Line In 1/2", "Mic", "Mic + Low-cut"};
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
uinfo->value.enumerated.items = ARRAY_SIZE(texts);
......@@ -816,7 +817,7 @@ static struct snd_kcontrol __devinit *ctl_find(struct snd_card *card,
}
static void __devinit add_slaves(struct snd_card *card,
struct snd_kcontrol *master, char **list)
struct snd_kcontrol *master, char * const *list)
{
for (; *list; list++) {
struct snd_kcontrol *slave = ctl_find(card, *list);
......
......@@ -253,7 +253,7 @@ static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100);
}
static const char *se200pci_sel[] = {
static const char * const se200pci_sel[] = {
"LINE-IN", "CD-IN", "MIC-IN", "ALL-MIX", NULL
};
......@@ -278,7 +278,7 @@ static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl)
se200pci_WM8776_write(ice, 0x16, 0x001);
}
static const char *se200pci_agc[] = {
static const char * const se200pci_agc[] = {
"Off", "LimiterMode", "ALCMode", NULL
};
......@@ -352,7 +352,7 @@ static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
}
struct se200pci_control {
char *name;
const char *name;
enum {
WM8766,
WM8776in,
......@@ -363,7 +363,7 @@ struct se200pci_control {
} target;
enum { VOLUME1, VOLUME2, BOOLEAN, ENUM } type;
int ch;
const char **member;
const char * const *member;
const char *comment;
};
......@@ -421,7 +421,7 @@ static const struct se200pci_control se200pci_cont[] = {
static int se200pci_get_enum_count(int n)
{
const char **member;
const char * const *member;
int c;
member = se200pci_cont[n].member;
......
......@@ -131,7 +131,7 @@ enum snd_wm8766_ctl_id {
struct snd_wm8766_ctl {
struct snd_kcontrol *kctl;
char *name;
const char *name;
snd_ctl_elem_type_t type;
const char *const enum_names[WM8766_ENUM_MAX];
const unsigned int *tlv;
......
......@@ -41,7 +41,8 @@ static void snd_wm8776_write(struct snd_wm8776 *wm, u16 addr, u16 data)
/* register-level functions */
static void snd_wm8776_activate_ctl(struct snd_wm8776 *wm, char *ctl_name,
static void snd_wm8776_activate_ctl(struct snd_wm8776 *wm,
const char *ctl_name,
bool active)
{
struct snd_card *card = wm->card;
......
......@@ -187,7 +187,7 @@ enum snd_wm8776_ctl_id {
#define WM8776_FLAG_ALC (1 << 4)
struct snd_wm8776_ctl {
char *name;
const char *name;
snd_ctl_elem_type_t type;
const char *const enum_names[WM8776_ENUM_MAX];
const unsigned int *tlv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment