forked from luck/tmp_suning_uos_patched
ALSA: cmi8330: More constifications
Apply const prefix to the static tables for the register, controls and callbacks. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-47-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2a076d0af4
commit
350f613f37
|
@ -120,7 +120,7 @@ static int pnp_registered;
|
||||||
#define CMI8330_LINGAIN 25
|
#define CMI8330_LINGAIN 25
|
||||||
#define CMI8330_CDINGAIN 26
|
#define CMI8330_CDINGAIN 26
|
||||||
|
|
||||||
static unsigned char snd_cmi8330_image[((CMI8330_CDINGAIN)-16) + 1] =
|
static const unsigned char snd_cmi8330_image[((CMI8330_CDINGAIN)-16) + 1] =
|
||||||
{
|
{
|
||||||
0x40, /* 16 - recording mux (SB-mixer-enabled) */
|
0x40, /* 16 - recording mux (SB-mixer-enabled) */
|
||||||
#ifdef ENABLE_SB_MIXER
|
#ifdef ENABLE_SB_MIXER
|
||||||
|
@ -235,7 +235,7 @@ WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", PLAYBACK, SWITCH), 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ENABLE_SB_MIXER
|
#ifdef ENABLE_SB_MIXER
|
||||||
static struct sbmix_elem cmi8330_sb_mixers[] = {
|
static const struct sbmix_elem cmi8330_sb_mixers[] = {
|
||||||
SB_DOUBLE("SB Master Playback Volume", SB_DSP4_MASTER_DEV, (SB_DSP4_MASTER_DEV + 1), 3, 3, 31),
|
SB_DOUBLE("SB Master Playback Volume", SB_DSP4_MASTER_DEV, (SB_DSP4_MASTER_DEV + 1), 3, 3, 31),
|
||||||
SB_DOUBLE("Tone Control - Bass", SB_DSP4_BASS_DEV, (SB_DSP4_BASS_DEV + 1), 4, 4, 15),
|
SB_DOUBLE("Tone Control - Bass", SB_DSP4_BASS_DEV, (SB_DSP4_BASS_DEV + 1), 4, 4, 15),
|
||||||
SB_DOUBLE("Tone Control - Treble", SB_DSP4_TREBLE_DEV, (SB_DSP4_TREBLE_DEV + 1), 4, 4, 15),
|
SB_DOUBLE("Tone Control - Treble", SB_DSP4_TREBLE_DEV, (SB_DSP4_TREBLE_DEV + 1), 4, 4, 15),
|
||||||
|
@ -253,7 +253,7 @@ SB_DOUBLE("SB Playback Volume", SB_DSP4_OGAIN_DEV, (SB_DSP4_OGAIN_DEV + 1), 6, 6
|
||||||
SB_SINGLE("SB Mic Auto Gain", SB_DSP4_MIC_AGC, 0, 1),
|
SB_SINGLE("SB Mic Auto Gain", SB_DSP4_MIC_AGC, 0, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned char cmi8330_sb_init_values[][2] = {
|
static const unsigned char cmi8330_sb_init_values[][2] = {
|
||||||
{ SB_DSP4_MASTER_DEV + 0, 0 },
|
{ SB_DSP4_MASTER_DEV + 0, 0 },
|
||||||
{ SB_DSP4_MASTER_DEV + 1, 0 },
|
{ SB_DSP4_MASTER_DEV + 1, 0 },
|
||||||
{ SB_DSP4_PCM_DEV + 0, 0 },
|
{ SB_DSP4_PCM_DEV + 0, 0 },
|
||||||
|
@ -428,7 +428,7 @@ static int snd_cmi8330_pcm(struct snd_card *card, struct snd_cmi8330 *chip)
|
||||||
struct snd_pcm *pcm;
|
struct snd_pcm *pcm;
|
||||||
const struct snd_pcm_ops *ops;
|
const struct snd_pcm_ops *ops;
|
||||||
int err;
|
int err;
|
||||||
static snd_pcm_open_callback_t cmi_open_callbacks[2] = {
|
static const snd_pcm_open_callback_t cmi_open_callbacks[2] = {
|
||||||
snd_cmi8330_playback_open,
|
snd_cmi8330_playback_open,
|
||||||
snd_cmi8330_capture_open
|
snd_cmi8330_capture_open
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user