mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
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>
This commit is contained in:
parent
29a14294fc
commit
8ed98db259
14 changed files with 49 additions and 49 deletions
|
|
@ -45,14 +45,14 @@ typedef struct snd_pcm_extplug_priv {
|
|||
struct snd_ext_parm sparams[SND_PCM_EXTPLUG_HW_PARAMS];
|
||||
} extplug_priv_t;
|
||||
|
||||
static int hw_params_type[SND_PCM_EXTPLUG_HW_PARAMS] = {
|
||||
static const int hw_params_type[SND_PCM_EXTPLUG_HW_PARAMS] = {
|
||||
[SND_PCM_EXTPLUG_HW_FORMAT] = SND_PCM_HW_PARAM_FORMAT,
|
||||
[SND_PCM_EXTPLUG_HW_CHANNELS] = SND_PCM_HW_PARAM_CHANNELS
|
||||
};
|
||||
|
||||
#define is_mask_type(i) (hw_params_type[i] < SND_PCM_HW_PARAM_FIRST_INTERVAL)
|
||||
|
||||
static unsigned int excl_parbits[SND_PCM_EXTPLUG_HW_PARAMS] = {
|
||||
static const unsigned int excl_parbits[SND_PCM_EXTPLUG_HW_PARAMS] = {
|
||||
[SND_PCM_EXTPLUG_HW_FORMAT] = (SND_PCM_HW_PARBIT_FORMAT|
|
||||
SND_PCM_HW_PARBIT_SUBFORMAT |
|
||||
SND_PCM_HW_PARBIT_SAMPLE_BITS),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue