ALSA: hda/ca0132: constify parameter table for effects
This module has a table for parameters of each effects. This table is read-only and can have 'const' qualifier. This commit adds this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0cc1aa7162
commit
862154bbd7
|
@ -189,7 +189,7 @@ struct ct_effect {
|
||||||
#define EFX_DIR_OUT 0
|
#define EFX_DIR_OUT 0
|
||||||
#define EFX_DIR_IN 1
|
#define EFX_DIR_IN 1
|
||||||
|
|
||||||
static struct ct_effect ca0132_effects[EFFECTS_COUNT] = {
|
static const struct ct_effect ca0132_effects[EFFECTS_COUNT] = {
|
||||||
{ .name = "Surround",
|
{ .name = "Surround",
|
||||||
.nid = SURROUND,
|
.nid = SURROUND,
|
||||||
.mid = 0x96,
|
.mid = 0x96,
|
||||||
|
@ -316,7 +316,7 @@ struct ct_tuning_ctl {
|
||||||
unsigned int def_val;/*effect default values*/
|
unsigned int def_val;/*effect default values*/
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ct_tuning_ctl ca0132_tuning_ctls[] = {
|
static const struct ct_tuning_ctl ca0132_tuning_ctls[] = {
|
||||||
{ .name = "Wedge Angle",
|
{ .name = "Wedge Angle",
|
||||||
.parent_nid = VOICE_FOCUS,
|
.parent_nid = VOICE_FOCUS,
|
||||||
.nid = WEDGE_ANGLE,
|
.nid = WEDGE_ANGLE,
|
||||||
|
@ -431,14 +431,14 @@ struct ct_voicefx_preset {
|
||||||
unsigned int vals[VOICEFX_MAX_PARAM_COUNT];
|
unsigned int vals[VOICEFX_MAX_PARAM_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ct_voicefx ca0132_voicefx = {
|
static const struct ct_voicefx ca0132_voicefx = {
|
||||||
.name = "VoiceFX Capture Switch",
|
.name = "VoiceFX Capture Switch",
|
||||||
.nid = VOICEFX,
|
.nid = VOICEFX,
|
||||||
.mid = 0x95,
|
.mid = 0x95,
|
||||||
.reqs = {10, 11, 12, 13, 14, 15, 16, 17, 18}
|
.reqs = {10, 11, 12, 13, 14, 15, 16, 17, 18}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ct_voicefx_preset ca0132_voicefx_presets[] = {
|
static const struct ct_voicefx_preset ca0132_voicefx_presets[] = {
|
||||||
{ .name = "Neutral",
|
{ .name = "Neutral",
|
||||||
.vals = { 0x00000000, 0x43C80000, 0x44AF0000,
|
.vals = { 0x00000000, 0x43C80000, 0x44AF0000,
|
||||||
0x44FA0000, 0x3F800000, 0x3F800000,
|
0x44FA0000, 0x3F800000, 0x3F800000,
|
||||||
|
@ -527,7 +527,7 @@ struct ct_eq_preset {
|
||||||
unsigned int vals[EQ_PRESET_MAX_PARAM_COUNT];
|
unsigned int vals[EQ_PRESET_MAX_PARAM_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ct_eq ca0132_alt_eq_enum = {
|
static const struct ct_eq ca0132_alt_eq_enum = {
|
||||||
.name = "FX: Equalizer Preset Switch",
|
.name = "FX: Equalizer Preset Switch",
|
||||||
.nid = EQ_PRESET_ENUM,
|
.nid = EQ_PRESET_ENUM,
|
||||||
.mid = 0x96,
|
.mid = 0x96,
|
||||||
|
@ -535,7 +535,7 @@ static struct ct_eq ca0132_alt_eq_enum = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct ct_eq_preset ca0132_alt_eq_presets[] = {
|
static const struct ct_eq_preset ca0132_alt_eq_presets[] = {
|
||||||
{ .name = "Flat",
|
{ .name = "Flat",
|
||||||
.vals = { 0x00000000, 0x00000000, 0x00000000,
|
.vals = { 0x00000000, 0x00000000, 0x00000000,
|
||||||
0x00000000, 0x00000000, 0x00000000,
|
0x00000000, 0x00000000, 0x00000000,
|
||||||
|
@ -655,7 +655,7 @@ struct ct_dsp_volume_ctl {
|
||||||
unsigned int reqs[3]; /* scp req ID */
|
unsigned int reqs[3]; /* scp req ID */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ct_dsp_volume_ctl ca0132_alt_vol_ctls[] = {
|
static const struct ct_dsp_volume_ctl ca0132_alt_vol_ctls[] = {
|
||||||
{ .vnid = VNID_SPK,
|
{ .vnid = VNID_SPK,
|
||||||
.mid = 0x32,
|
.mid = 0x32,
|
||||||
.reqs = {3, 4, 2}
|
.reqs = {3, 4, 2}
|
||||||
|
|
Loading…
Reference in New Issue