summaryrefslogtreecommitdiffstats
path: root/oss/pcm_oss.c
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 02:11:44 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 13:07:03 +0100
commit9d65155c28d4a47022a4de7e604187b8b2ad2137 (patch)
treee36aa03bed80065259ca8bfcde0662116c1dc26f /oss/pcm_oss.c
parente4ce5402202d983a84d01555445eeb23e5a9268f (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 'oss/pcm_oss.c')
-rw-r--r--oss/pcm_oss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/oss/pcm_oss.c b/oss/pcm_oss.c
index 16ba1f0..8a2a672 100644
--- a/oss/pcm_oss.c
+++ b/oss/pcm_oss.c
@@ -233,7 +233,7 @@ static int oss_hw_params(snd_pcm_ioplug_t *io,
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
};
@@ -242,7 +242,7 @@ static int oss_hw_constraint(snd_pcm_oss_t *oss)
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
};
@@ -329,7 +329,7 @@ static int oss_close(snd_pcm_ioplug_t *io)
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,
@@ -340,7 +340,7 @@ static snd_pcm_ioplug_callback_t oss_playback_callback = {
.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,