diff options
author | Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-11-21 02:11:44 +0100 |
---|---|---|
committer | Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-11-21 13:07:03 +0100 |
commit | 9d65155c28d4a47022a4de7e604187b8b2ad2137 (patch) | |
tree | e36aa03bed80065259ca8bfcde0662116c1dc26f /maemo/alsa-dsp.c | |
parent | e4ce5402202d983a84d01555445eeb23e5a9268f (diff) |
Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.
The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Diffstat (limited to 'maemo/alsa-dsp.c')
-rw-r--r-- | maemo/alsa-dsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/maemo/alsa-dsp.c b/maemo/alsa-dsp.c index 0c75b95..ff5d273 100644 --- a/maemo/alsa-dsp.c +++ b/maemo/alsa-dsp.c @@ -400,10 +400,10 @@ static int alsa_dsp_resume(snd_pcm_ioplug_t * io) 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 */ @@ -413,15 +413,15 @@ static int alsa_dsp_configure_constraints(snd_pcm_alsa_dsp_t * alsa_dsp) 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 }; |