mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ALSA: bebob: More constify text arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7f471fd407
commit
e7ced4137d
5 changed files with 19 additions and 19 deletions
|
@ -52,7 +52,7 @@ extern const unsigned int snd_bebob_rate_table[SND_BEBOB_STRM_FMT_ENTRIES];
|
||||||
#define SND_BEBOB_CLOCK_INTERNAL "Internal"
|
#define SND_BEBOB_CLOCK_INTERNAL "Internal"
|
||||||
struct snd_bebob_clock_spec {
|
struct snd_bebob_clock_spec {
|
||||||
unsigned int num;
|
unsigned int num;
|
||||||
char *const *labels;
|
const char *const *labels;
|
||||||
int (*get)(struct snd_bebob *bebob, unsigned int *id);
|
int (*get)(struct snd_bebob *bebob, unsigned int *id);
|
||||||
};
|
};
|
||||||
struct snd_bebob_rate_spec {
|
struct snd_bebob_rate_spec {
|
||||||
|
@ -61,7 +61,7 @@ struct snd_bebob_rate_spec {
|
||||||
};
|
};
|
||||||
struct snd_bebob_meter_spec {
|
struct snd_bebob_meter_spec {
|
||||||
unsigned int num;
|
unsigned int num;
|
||||||
char *const *labels;
|
const char *const *labels;
|
||||||
int (*get)(struct snd_bebob *bebob, u32 *target, unsigned int size);
|
int (*get)(struct snd_bebob *bebob, u32 *target, unsigned int size);
|
||||||
};
|
};
|
||||||
struct snd_bebob_spec {
|
struct snd_bebob_spec {
|
||||||
|
|
|
@ -101,11 +101,11 @@ saffire_write_quad(struct snd_bebob *bebob, u64 offset, u32 value)
|
||||||
&data, sizeof(__be32), 0);
|
&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"
|
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"
|
SND_BEBOB_CLOCK_INTERNAL, "S/PDIF", "Word Clock"
|
||||||
};
|
};
|
||||||
static int
|
static int
|
||||||
|
@ -161,7 +161,7 @@ saffirepro_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct snd_bebob_spec saffire_le_spec;
|
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"
|
SND_BEBOB_CLOCK_INTERNAL, "S/PDIF"
|
||||||
};
|
};
|
||||||
static int
|
static int
|
||||||
|
@ -176,12 +176,12 @@ saffire_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
};
|
};
|
||||||
static char *const saffire_le_meter_labels[] = {
|
static const char *const saffire_le_meter_labels[] = {
|
||||||
ANA_IN, ANA_IN, DIG_IN,
|
ANA_IN, ANA_IN, DIG_IN,
|
||||||
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
|
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
|
||||||
STM_IN, STM_IN
|
STM_IN, STM_IN
|
||||||
};
|
};
|
||||||
static char *const saffire_meter_labels[] = {
|
static const char *const saffire_meter_labels[] = {
|
||||||
ANA_IN, ANA_IN,
|
ANA_IN, ANA_IN,
|
||||||
STM_IN, STM_IN, STM_IN, STM_IN, STM_IN,
|
STM_IN, STM_IN, STM_IN, STM_IN, STM_IN,
|
||||||
};
|
};
|
||||||
|
|
|
@ -340,7 +340,7 @@ static int special_set_rate(struct snd_bebob *bebob, unsigned int rate)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clock source control for special firmware */
|
/* 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",
|
SND_BEBOB_CLOCK_INTERNAL " with Digital Mute", "Digital",
|
||||||
"Word Clock", SND_BEBOB_CLOCK_INTERNAL};
|
"Word Clock", SND_BEBOB_CLOCK_INTERNAL};
|
||||||
static int special_clk_get(struct snd_bebob *bebob, unsigned int *id)
|
static int special_clk_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
|
@ -438,7 +438,7 @@ static struct snd_kcontrol_new special_sync_ctl = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Digital input interface control for special firmware */
|
/* 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"
|
"S/PDIF Optical", "S/PDIF Coaxial", "ADAT Optical"
|
||||||
};
|
};
|
||||||
static int special_dig_in_iface_ctl_info(struct snd_kcontrol *kctl,
|
static int special_dig_in_iface_ctl_info(struct snd_kcontrol *kctl,
|
||||||
|
@ -539,7 +539,7 @@ static struct snd_kcontrol_new special_dig_in_iface_ctl = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Digital output interface control for special firmware */
|
/* 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"
|
"S/PDIF Optical and Coaxial", "ADAT Optical"
|
||||||
};
|
};
|
||||||
static int special_dig_out_iface_ctl_info(struct snd_kcontrol *kctl,
|
static int special_dig_out_iface_ctl_info(struct snd_kcontrol *kctl,
|
||||||
|
@ -631,7 +631,7 @@ static int add_special_controls(struct snd_bebob *bebob)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hardware metering for special firmware */
|
/* 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,
|
ANA_IN, ANA_IN, ANA_IN, ANA_IN,
|
||||||
SPDIF_IN,
|
SPDIF_IN,
|
||||||
ADAT_IN, ADAT_IN, ADAT_IN, ADAT_IN,
|
ADAT_IN, ADAT_IN, ADAT_IN, ADAT_IN,
|
||||||
|
@ -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. */
|
/* 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_IN, DIG_IN,
|
||||||
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT, DIG_OUT,
|
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT, DIG_OUT,
|
||||||
HP_OUT
|
HP_OUT
|
||||||
};
|
};
|
||||||
static char *const audiophile_meter_labels[] = {
|
static const char *const audiophile_meter_labels[] = {
|
||||||
ANA_IN, DIG_IN,
|
ANA_IN, DIG_IN,
|
||||||
ANA_OUT, ANA_OUT, DIG_OUT,
|
ANA_OUT, ANA_OUT, DIG_OUT,
|
||||||
HP_OUT, AUX_OUT,
|
HP_OUT, AUX_OUT,
|
||||||
};
|
};
|
||||||
static char *const solo_meter_labels[] = {
|
static const char *const solo_meter_labels[] = {
|
||||||
ANA_IN, DIG_IN,
|
ANA_IN, DIG_IN,
|
||||||
STRM_IN, STRM_IN,
|
STRM_IN, STRM_IN,
|
||||||
ANA_OUT, DIG_OUT
|
ANA_OUT, DIG_OUT
|
||||||
};
|
};
|
||||||
|
|
||||||
/* no clock info */
|
/* no clock info */
|
||||||
static char *const ozonic_meter_labels[] = {
|
static const char *const ozonic_meter_labels[] = {
|
||||||
ANA_IN, ANA_IN,
|
ANA_IN, ANA_IN,
|
||||||
STRM_IN, STRM_IN,
|
STRM_IN, STRM_IN,
|
||||||
ANA_OUT, ANA_OUT
|
ANA_OUT, ANA_OUT
|
||||||
};
|
};
|
||||||
/* TODO: need testers. these positions are based on authour's assumption */
|
/* 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,
|
ANA_IN, ANA_IN, ANA_IN, ANA_IN,
|
||||||
DIG_IN,
|
DIG_IN,
|
||||||
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
|
ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "./bebob.h"
|
#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"
|
SND_BEBOB_CLOCK_INTERNAL, "Digital In", "Word Clock"
|
||||||
};
|
};
|
||||||
static int
|
static int
|
||||||
|
@ -29,7 +29,7 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
return err;
|
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"
|
SND_BEBOB_CLOCK_INTERNAL, "Digital In"
|
||||||
};
|
};
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* reccomend users to close ffado-mixer at 192.0kHz if mixer is needless.
|
* 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
|
static int
|
||||||
clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue