Skip to content

Commit

Permalink
ALSA: bebob: More constify text arrays
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Oct 21, 2014
1 parent 7f471fd commit e7ced41
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions sound/firewire/bebob/bebob.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern const unsigned int snd_bebob_rate_table[SND_BEBOB_STRM_FMT_ENTRIES];
#define SND_BEBOB_CLOCK_INTERNAL "Internal"
struct snd_bebob_clock_spec {
unsigned int num;
char *const *labels;
const char *const *labels;
int (*get)(struct snd_bebob *bebob, unsigned int *id);
};
struct snd_bebob_rate_spec {
Expand All @@ -61,7 +61,7 @@ struct snd_bebob_rate_spec {
};
struct snd_bebob_meter_spec {
unsigned int num;
char *const *labels;
const char *const *labels;
int (*get)(struct snd_bebob *bebob, u32 *target, unsigned int size);
};
struct snd_bebob_spec {
Expand Down
10 changes: 5 additions & 5 deletions sound/firewire/bebob/bebob_focusrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ saffire_write_quad(struct snd_bebob *bebob, u64 offset, u32 value)
&data, sizeof(__be32), 0);
}

static char *const saffirepro_26_clk_src_labels[] = {
static const char *const saffirepro_26_clk_src_labels[] = {
SND_BEBOB_CLOCK_INTERNAL, "S/PDIF", "ADAT1", "ADAT2", "Word Clock"
};

static char *const saffirepro_10_clk_src_labels[] = {
static const char *const saffirepro_10_clk_src_labels[] = {
SND_BEBOB_CLOCK_INTERNAL, "S/PDIF", "Word Clock"
};
static int
Expand Down Expand Up @@ -161,7 +161,7 @@ saffirepro_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
}

struct snd_bebob_spec saffire_le_spec;
static char *const saffire_both_clk_src_labels[] = {
static const char *const saffire_both_clk_src_labels[] = {
SND_BEBOB_CLOCK_INTERNAL, "S/PDIF"
};
static int
Expand All @@ -176,12 +176,12 @@ saffire_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)

return err;
};
static char *const saffire_le_meter_labels[] = {
static const char *const saffire_le_meter_labels[] = {
ANA_IN, ANA_IN, DIG_IN,
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
STM_IN, STM_IN
};
static char *const saffire_meter_labels[] = {
static const char *const saffire_meter_labels[] = {
ANA_IN, ANA_IN,
STM_IN, STM_IN, STM_IN, STM_IN, STM_IN,
};
Expand Down
18 changes: 9 additions & 9 deletions sound/firewire/bebob/bebob_maudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int special_set_rate(struct snd_bebob *bebob, unsigned int rate)
}

/* Clock source control for special firmware */
static char *const special_clk_labels[] = {
static const char *const special_clk_labels[] = {
SND_BEBOB_CLOCK_INTERNAL " with Digital Mute", "Digital",
"Word Clock", SND_BEBOB_CLOCK_INTERNAL};
static int special_clk_get(struct snd_bebob *bebob, unsigned int *id)
Expand Down Expand Up @@ -438,7 +438,7 @@ static struct snd_kcontrol_new special_sync_ctl = {
};

/* Digital input interface control for special firmware */
static char *const special_dig_in_iface_labels[] = {
static const char *const special_dig_in_iface_labels[] = {
"S/PDIF Optical", "S/PDIF Coaxial", "ADAT Optical"
};
static int special_dig_in_iface_ctl_info(struct snd_kcontrol *kctl,
Expand Down Expand Up @@ -539,7 +539,7 @@ static struct snd_kcontrol_new special_dig_in_iface_ctl = {
};

/* Digital output interface control for special firmware */
static char *const special_dig_out_iface_labels[] = {
static const char *const special_dig_out_iface_labels[] = {
"S/PDIF Optical and Coaxial", "ADAT Optical"
};
static int special_dig_out_iface_ctl_info(struct snd_kcontrol *kctl,
Expand Down Expand Up @@ -631,7 +631,7 @@ static int add_special_controls(struct snd_bebob *bebob)
}

/* Hardware metering for special firmware */
static char *const special_meter_labels[] = {
static const char *const special_meter_labels[] = {
ANA_IN, ANA_IN, ANA_IN, ANA_IN,
SPDIF_IN,
ADAT_IN, ADAT_IN, ADAT_IN, ADAT_IN,
Expand Down Expand Up @@ -671,30 +671,30 @@ special_meter_get(struct snd_bebob *bebob, u32 *target, unsigned int size)
}

/* last 4 bytes are omitted because it's clock info. */
static char *const fw410_meter_labels[] = {
static const char *const fw410_meter_labels[] = {
ANA_IN, DIG_IN,
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT, DIG_OUT,
HP_OUT
};
static char *const audiophile_meter_labels[] = {
static const char *const audiophile_meter_labels[] = {
ANA_IN, DIG_IN,
ANA_OUT, ANA_OUT, DIG_OUT,
HP_OUT, AUX_OUT,
};
static char *const solo_meter_labels[] = {
static const char *const solo_meter_labels[] = {
ANA_IN, DIG_IN,
STRM_IN, STRM_IN,
ANA_OUT, DIG_OUT
};

/* no clock info */
static char *const ozonic_meter_labels[] = {
static const char *const ozonic_meter_labels[] = {
ANA_IN, ANA_IN,
STRM_IN, STRM_IN,
ANA_OUT, ANA_OUT
};
/* TODO: need testers. these positions are based on authour's assumption */
static char *const nrv10_meter_labels[] = {
static const char *const nrv10_meter_labels[] = {
ANA_IN, ANA_IN, ANA_IN, ANA_IN,
DIG_IN,
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
Expand Down
4 changes: 2 additions & 2 deletions sound/firewire/bebob/bebob_terratec.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "./bebob.h"

static char *const phase88_rack_clk_src_labels[] = {
static const char *const phase88_rack_clk_src_labels[] = {
SND_BEBOB_CLOCK_INTERNAL, "Digital In", "Word Clock"
};
static int
Expand All @@ -29,7 +29,7 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
return err;
}

static char *const phase24_series_clk_src_labels[] = {
static const char *const phase24_series_clk_src_labels[] = {
SND_BEBOB_CLOCK_INTERNAL, "Digital In"
};
static int
Expand Down
2 changes: 1 addition & 1 deletion sound/firewire/bebob/bebob_yamaha.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* reccomend users to close ffado-mixer at 192.0kHz if mixer is needless.
*/

static char *const clk_src_labels[] = {SND_BEBOB_CLOCK_INTERNAL, "SPDIF"};
static const char *const clk_src_labels[] = {SND_BEBOB_CLOCK_INTERNAL, "SPDIF"};
static int
clk_src_get(struct snd_bebob *bebob, unsigned int *id)
{
Expand Down

0 comments on commit e7ced41

Please sign in to comment.