static int alsa_dsp_configure_constraints(snd_pcm_alsa_dsp_t * alsa_dsp)
{
snd_pcm_ioplug_t *io = &alsa_dsp->io;
- static snd_pcm_access_t access_list[] = {
+ static const snd_pcm_access_t access_list[] = {
SND_PCM_ACCESS_RW_INTERLEAVED
};
- const unsigned int formats[] = {
+ static const unsigned int formats[] = {
SND_PCM_FORMAT_U8, /* DSP_AFMT_U8 */
SND_PCM_FORMAT_S16_LE, /* DSP_AFMT_S16_LE */
SND_PCM_FORMAT_S16_BE, /* DSP_AFMT_S16_BE */
SND_PCM_FORMAT_A_LAW, /* DSP_AFMT_ALAW */
SND_PCM_FORMAT_MU_LAW /* DSP_AFMT_ULAW */
};
- const unsigned int formats_recor[] = {
+ static const unsigned int formats_recor[] = {
SND_PCM_FORMAT_S16_LE, /* DSP_AFMT_S16_LE */
SND_PCM_FORMAT_A_LAW, /* DSP_AFMT_ALAW */
SND_PCM_FORMAT_MU_LAW /* DSP_AFMT_ULAW */
};
- static unsigned int bytes_list[] = {
+ static const unsigned int bytes_list[] = {
1U << 11, 1U << 12
};
- static unsigned int bytes_list_rec_8bit[] = {
+ static const unsigned int bytes_list_rec_8bit[] = {
/* It must be multiple of 80... less than or equal to 800 */
80, 160, 240, 320, 400, 480, 560, 640, 720, 800
};
6, size, SND_PCM_FORMAT_S16);
}
-static upmixer_t do_upmix[6][2] = {
+static const upmixer_t do_upmix[6][2] = {
{ upmix_1_to_40, upmix_1_to_51 },
{ upmix_2_to_40, upmix_2_to_51 },
{ upmix_3_to_40, upmix_3_to_51 },
return 0;
}
-static snd_pcm_extplug_callback_t upmix_callback = {
+static const snd_pcm_extplug_callback_t upmix_callback = {
.transfer = upmix_transfer,
.init = upmix_init,
.close = upmix_close,
snd_config_iterator_t i, next;
snd_pcm_upmix_t *mix;
snd_config_t *sconf = NULL;
- static unsigned int chlist[2] = {4, 6};
+ static const unsigned int chlist[2] = {4, 6};
unsigned int channels = 0;
int delay = 10;
int err;
short rbuf[RINGBUF_SIZE][5];
} snd_pcm_vdownmix_t;
-static struct vdownmix_filter tap_filters[5] = {
+static const struct vdownmix_filter tap_filters[5] = {
{
#ifdef I_AM_POWERFUL
18,
},
};
-static int tap_index[5][2] = {
+static const int tap_index[5][2] = {
/* left */
{ 0, 1 },
/* right */
return 0;
}
-static snd_pcm_extplug_callback_t vdownmix_callback = {
+static const snd_pcm_extplug_callback_t vdownmix_callback = {
.transfer = vdownmix_transfer,
.init = vdownmix_init,
/* .dump = filr_dump, */
unsigned int rec_item[SOUND_MIXER_NRDEVICES];
} snd_ctl_oss_t;
-static const char *vol_devices[SOUND_MIXER_NRDEVICES] = {
+static const char *const vol_devices[SOUND_MIXER_NRDEVICES] = {
[SOUND_MIXER_VOLUME] = "Master Playback Volume",
[SOUND_MIXER_BASS] = "Tone Control - Bass",
[SOUND_MIXER_TREBLE] = "Tone Control - Treble",
[SOUND_MIXER_MONITOR] = "Monitor Playback Volume",
};
-static const char *rec_devices[SOUND_MIXER_NRDEVICES] = {
+static const char *const rec_devices[SOUND_MIXER_NRDEVICES] = {
[SOUND_MIXER_VOLUME] = "Mix Capture Switch",
[SOUND_MIXER_SYNTH] = "Synth Capture Switch",
[SOUND_MIXER_PCM] = "PCM Capture Switch",
[SOUND_MIXER_RADIO] = "Radio Capture Switch",
};
-static const char *rec_items[SOUND_MIXER_NRDEVICES] = {
+static const char *const rec_items[SOUND_MIXER_NRDEVICES] = {
[SOUND_MIXER_VOLUME] = "Mix",
[SOUND_MIXER_SYNTH] = "Synth",
[SOUND_MIXER_PCM] = "PCM",
static int oss_hw_constraint(snd_pcm_oss_t *oss)
{
snd_pcm_ioplug_t *io = &oss->io;
- static snd_pcm_access_t access_list[] = {
+ static const snd_pcm_access_t access_list[] = {
SND_PCM_ACCESS_RW_INTERLEAVED,
SND_PCM_ACCESS_MMAP_INTERLEAVED
};
unsigned int nchannels;
unsigned int channel[6];
/* period and buffer bytes must be power of two */
- static unsigned int bytes_list[] = {
+ static const unsigned int bytes_list[] = {
1U<<8, 1U<<9, 1U<<10, 1U<<11, 1U<<12, 1U<<13, 1U<<14, 1U<<15,
1U<<16, 1U<<17, 1U<<18, 1U<<19, 1U<<20, 1U<<21, 1U<<22, 1U<<23
};
return 0;
}
-static snd_pcm_ioplug_callback_t oss_playback_callback = {
+static const snd_pcm_ioplug_callback_t oss_playback_callback = {
.start = oss_start,
.stop = oss_stop,
.transfer = oss_write,
.drain = oss_drain,
};
-static snd_pcm_ioplug_callback_t oss_capture_callback = {
+static const snd_pcm_ioplug_callback_t oss_capture_callback = {
.start = oss_start,
.stop = oss_stop,
.transfer = oss_read,