Make all the PCM plugins ops structure constant.

This ensures they are emitted in .data.rel.ro rather than .data.rel,
which should make a nice difference when using prelink.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
Diego E. 'Flameeyes' Pettenò 2008-11-21 20:38:09 +01:00
parent 1f734e3058
commit 8b14625cc3
30 changed files with 49 additions and 49 deletions

View file

@ -518,7 +518,7 @@ static void snd_pcm_adpcm_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(adpcm->plug.gen.slave, out); snd_pcm_dump(adpcm->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_adpcm_ops = { static const snd_pcm_ops_t snd_pcm_adpcm_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_adpcm_hw_refine, .hw_refine = snd_pcm_adpcm_hw_refine,

View file

@ -391,7 +391,7 @@ static void snd_pcm_alaw_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(alaw->plug.gen.slave, out); snd_pcm_dump(alaw->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_alaw_ops = { static const snd_pcm_ops_t snd_pcm_alaw_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_alaw_hw_refine, .hw_refine = snd_pcm_alaw_hw_refine,

View file

@ -152,7 +152,7 @@ static void snd_pcm_copy_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(copy->plug.gen.slave, out); snd_pcm_dump(copy->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_copy_ops = { static const snd_pcm_ops_t snd_pcm_copy_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_copy_hw_refine, .hw_refine = snd_pcm_copy_hw_refine,

View file

@ -869,7 +869,7 @@ static void snd_pcm_dmix_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(dmix->spcm, out); snd_pcm_dump(dmix->spcm, out);
} }
static snd_pcm_ops_t snd_pcm_dmix_ops = { static const snd_pcm_ops_t snd_pcm_dmix_ops = {
.close = snd_pcm_dmix_close, .close = snd_pcm_dmix_close,
.info = snd_pcm_direct_info, .info = snd_pcm_direct_info,
.hw_refine = snd_pcm_direct_hw_refine, .hw_refine = snd_pcm_direct_hw_refine,
@ -884,7 +884,7 @@ static snd_pcm_ops_t snd_pcm_dmix_ops = {
.munmap = snd_pcm_direct_munmap, .munmap = snd_pcm_direct_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_dmix_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_dmix_fast_ops = {
.status = snd_pcm_dmix_status, .status = snd_pcm_dmix_status,
.state = snd_pcm_dmix_state, .state = snd_pcm_dmix_state,
.hwsync = snd_pcm_dmix_hwsync, .hwsync = snd_pcm_dmix_hwsync,

View file

@ -560,7 +560,7 @@ static void snd_pcm_dshare_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(dshare->spcm, out); snd_pcm_dump(dshare->spcm, out);
} }
static snd_pcm_ops_t snd_pcm_dshare_ops = { static const snd_pcm_ops_t snd_pcm_dshare_ops = {
.close = snd_pcm_dshare_close, .close = snd_pcm_dshare_close,
.info = snd_pcm_direct_info, .info = snd_pcm_direct_info,
.hw_refine = snd_pcm_direct_hw_refine, .hw_refine = snd_pcm_direct_hw_refine,
@ -575,7 +575,7 @@ static snd_pcm_ops_t snd_pcm_dshare_ops = {
.munmap = snd_pcm_direct_munmap, .munmap = snd_pcm_direct_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_dshare_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_dshare_fast_ops = {
.status = snd_pcm_dshare_status, .status = snd_pcm_dshare_status,
.state = snd_pcm_dshare_state, .state = snd_pcm_dshare_state,
.hwsync = snd_pcm_dshare_hwsync, .hwsync = snd_pcm_dshare_hwsync,

View file

@ -455,7 +455,7 @@ static void snd_pcm_dsnoop_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(dsnoop->spcm, out); snd_pcm_dump(dsnoop->spcm, out);
} }
static snd_pcm_ops_t snd_pcm_dsnoop_ops = { static const snd_pcm_ops_t snd_pcm_dsnoop_ops = {
.close = snd_pcm_dsnoop_close, .close = snd_pcm_dsnoop_close,
.info = snd_pcm_direct_info, .info = snd_pcm_direct_info,
.hw_refine = snd_pcm_direct_hw_refine, .hw_refine = snd_pcm_direct_hw_refine,
@ -470,7 +470,7 @@ static snd_pcm_ops_t snd_pcm_dsnoop_ops = {
.munmap = snd_pcm_direct_munmap, .munmap = snd_pcm_direct_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_dsnoop_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_dsnoop_fast_ops = {
.status = snd_pcm_dsnoop_status, .status = snd_pcm_dsnoop_status,
.state = snd_pcm_dsnoop_state, .state = snd_pcm_dsnoop_state,
.hwsync = snd_pcm_dsnoop_hwsync, .hwsync = snd_pcm_dsnoop_hwsync,

View file

@ -425,7 +425,7 @@ static int snd_pcm_extplug_close(snd_pcm_t *pcm)
return 0; return 0;
} }
static snd_pcm_ops_t snd_pcm_extplug_ops = { static const snd_pcm_ops_t snd_pcm_extplug_ops = {
.close = snd_pcm_extplug_close, .close = snd_pcm_extplug_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_extplug_hw_refine, .hw_refine = snd_pcm_extplug_hw_refine,

View file

@ -460,7 +460,7 @@ static void snd_pcm_file_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(file->gen.slave, out); snd_pcm_dump(file->gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_file_ops = { static const snd_pcm_ops_t snd_pcm_file_ops = {
.close = snd_pcm_file_close, .close = snd_pcm_file_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_generic_hw_refine, .hw_refine = snd_pcm_generic_hw_refine,
@ -475,7 +475,7 @@ static snd_pcm_ops_t snd_pcm_file_ops = {
.munmap = snd_pcm_generic_munmap, .munmap = snd_pcm_generic_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_file_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {
.status = snd_pcm_generic_status, .status = snd_pcm_generic_status,
.state = snd_pcm_generic_state, .state = snd_pcm_generic_state,
.hwsync = snd_pcm_generic_hwsync, .hwsync = snd_pcm_generic_hwsync,

View file

@ -121,7 +121,7 @@ static void snd_pcm_hooks_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(h->gen.slave, out); snd_pcm_dump(h->gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_hooks_ops = { static const snd_pcm_ops_t snd_pcm_hooks_ops = {
.close = snd_pcm_hooks_close, .close = snd_pcm_hooks_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_generic_hw_refine, .hw_refine = snd_pcm_generic_hw_refine,
@ -136,7 +136,7 @@ static snd_pcm_ops_t snd_pcm_hooks_ops = {
.munmap = snd_pcm_generic_munmap, .munmap = snd_pcm_generic_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_hooks_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_hooks_fast_ops = {
.status = snd_pcm_generic_status, .status = snd_pcm_generic_status,
.state = snd_pcm_generic_state, .state = snd_pcm_generic_state,
.hwsync = snd_pcm_generic_hwsync, .hwsync = snd_pcm_generic_hwsync,

View file

@ -80,8 +80,8 @@ struct sndrv_pcm_hw_params_old {
static int use_old_hw_params_ioctl(int fd, unsigned int cmd, snd_pcm_hw_params_t *params); static int use_old_hw_params_ioctl(int fd, unsigned int cmd, snd_pcm_hw_params_t *params);
static snd_pcm_sframes_t snd_pcm_hw_avail_update(snd_pcm_t *pcm); static snd_pcm_sframes_t snd_pcm_hw_avail_update(snd_pcm_t *pcm);
static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops; static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops;
static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops_timer; static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops_timer;
/* /*
* *
@ -1040,7 +1040,7 @@ static void snd_pcm_hw_dump(snd_pcm_t *pcm, snd_output_t *out)
} }
} }
static snd_pcm_ops_t snd_pcm_hw_ops = { static const snd_pcm_ops_t snd_pcm_hw_ops = {
.close = snd_pcm_hw_close, .close = snd_pcm_hw_close,
.info = snd_pcm_hw_info, .info = snd_pcm_hw_info,
.hw_refine = snd_pcm_hw_hw_refine, .hw_refine = snd_pcm_hw_hw_refine,
@ -1055,7 +1055,7 @@ static snd_pcm_ops_t snd_pcm_hw_ops = {
.munmap = snd_pcm_hw_munmap, .munmap = snd_pcm_hw_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops = {
.status = snd_pcm_hw_status, .status = snd_pcm_hw_status,
.state = snd_pcm_hw_state, .state = snd_pcm_hw_state,
.hwsync = snd_pcm_hw_hwsync, .hwsync = snd_pcm_hw_hwsync,
@ -1086,7 +1086,7 @@ static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops = {
.poll_revents = NULL, .poll_revents = NULL,
}; };
static snd_pcm_fast_ops_t snd_pcm_hw_fast_ops_timer = { static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops_timer = {
.status = snd_pcm_hw_status, .status = snd_pcm_hw_status,
.state = snd_pcm_hw_state, .state = snd_pcm_hw_state,
.hwsync = snd_pcm_hw_hwsync, .hwsync = snd_pcm_hw_hwsync,

View file

@ -416,7 +416,7 @@ static void snd_pcm_iec958_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(iec->plug.gen.slave, out); snd_pcm_dump(iec->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_iec958_ops = { static const snd_pcm_ops_t snd_pcm_iec958_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_iec958_hw_refine, .hw_refine = snd_pcm_iec958_hw_refine,

View file

@ -747,7 +747,7 @@ static int snd_pcm_ioplug_close(snd_pcm_t *pcm)
return 0; return 0;
} }
static snd_pcm_ops_t snd_pcm_ioplug_ops = { static const snd_pcm_ops_t snd_pcm_ioplug_ops = {
.close = snd_pcm_ioplug_close, .close = snd_pcm_ioplug_close,
.nonblock = snd_pcm_ioplug_nonblock, .nonblock = snd_pcm_ioplug_nonblock,
.async = snd_pcm_ioplug_async, .async = snd_pcm_ioplug_async,
@ -762,7 +762,7 @@ static snd_pcm_ops_t snd_pcm_ioplug_ops = {
.munmap = snd_pcm_ioplug_munmap, .munmap = snd_pcm_ioplug_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_ioplug_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_ioplug_fast_ops = {
.status = snd_pcm_ioplug_status, .status = snd_pcm_ioplug_status,
.prepare = snd_pcm_ioplug_prepare, .prepare = snd_pcm_ioplug_prepare,
.reset = snd_pcm_ioplug_reset, .reset = snd_pcm_ioplug_reset,

View file

@ -1061,7 +1061,7 @@ static void snd_pcm_ladspa_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(ladspa->plug.gen.slave, out); snd_pcm_dump(ladspa->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_ladspa_ops = { static const snd_pcm_ops_t snd_pcm_ladspa_ops = {
.close = snd_pcm_ladspa_close, .close = snd_pcm_ladspa_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_ladspa_hw_refine, .hw_refine = snd_pcm_ladspa_hw_refine,

View file

@ -350,7 +350,7 @@ static void snd_pcm_lfloat_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(lfloat->plug.gen.slave, out); snd_pcm_dump(lfloat->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_lfloat_ops = { static const snd_pcm_ops_t snd_pcm_lfloat_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_lfloat_hw_refine, .hw_refine = snd_pcm_lfloat_hw_refine,

View file

@ -407,7 +407,7 @@ static void snd_pcm_linear_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(linear->plug.gen.slave, out); snd_pcm_dump(linear->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_linear_ops = { static const snd_pcm_ops_t snd_pcm_linear_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_linear_hw_refine, .hw_refine = snd_pcm_linear_hw_refine,

View file

@ -223,8 +223,8 @@ struct _snd_pcm {
snd_pcm_channel_info_t *mmap_channels; snd_pcm_channel_info_t *mmap_channels;
snd_pcm_channel_area_t *running_areas; snd_pcm_channel_area_t *running_areas;
snd_pcm_channel_area_t *stopped_areas; snd_pcm_channel_area_t *stopped_areas;
snd_pcm_ops_t *ops; const snd_pcm_ops_t *ops;
snd_pcm_fast_ops_t *fast_ops; const snd_pcm_fast_ops_t *fast_ops;
snd_pcm_t *op_arg; snd_pcm_t *op_arg;
snd_pcm_t *fast_op_arg; snd_pcm_t *fast_op_arg;
void *private_data; void *private_data;

View file

@ -501,7 +501,7 @@ static void snd_pcm_meter_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(meter->gen.slave, out); snd_pcm_dump(meter->gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_meter_ops = { static const snd_pcm_ops_t snd_pcm_meter_ops = {
.close = snd_pcm_meter_close, .close = snd_pcm_meter_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_meter_hw_refine, .hw_refine = snd_pcm_meter_hw_refine,
@ -516,7 +516,7 @@ static snd_pcm_ops_t snd_pcm_meter_ops = {
.munmap = snd_pcm_generic_munmap, .munmap = snd_pcm_generic_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_meter_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_meter_fast_ops = {
.status = snd_pcm_generic_status, .status = snd_pcm_generic_status,
.state = snd_pcm_generic_state, .state = snd_pcm_generic_state,
.hwsync = snd_pcm_generic_hwsync, .hwsync = snd_pcm_generic_hwsync,
@ -1143,7 +1143,7 @@ static void s16_reset(snd_pcm_scope_t *scope)
s16->old = meter->now; s16->old = meter->now;
} }
snd_pcm_scope_ops_t s16_ops = { static const snd_pcm_scope_ops_t s16_ops = {
.enable = s16_enable, .enable = s16_enable,
.disable = s16_disable, .disable = s16_disable,
.close = s16_close, .close = s16_close,

View file

@ -329,7 +329,7 @@ static void snd_pcm_mmap_emul_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(map->gen.slave, out); snd_pcm_dump(map->gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_mmap_emul_ops = { static const snd_pcm_ops_t snd_pcm_mmap_emul_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_mmap_emul_hw_refine, .hw_refine = snd_pcm_mmap_emul_hw_refine,
@ -344,7 +344,7 @@ static snd_pcm_ops_t snd_pcm_mmap_emul_ops = {
.munmap = snd_pcm_generic_munmap, .munmap = snd_pcm_generic_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_mmap_emul_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_mmap_emul_fast_ops = {
.status = snd_pcm_generic_status, .status = snd_pcm_generic_status,
.state = snd_pcm_generic_state, .state = snd_pcm_generic_state,
.hwsync = snd_pcm_generic_hwsync, .hwsync = snd_pcm_generic_hwsync,

View file

@ -406,7 +406,7 @@ static void snd_pcm_mulaw_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(mulaw->plug.gen.slave, out); snd_pcm_dump(mulaw->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_mulaw_ops = { static const snd_pcm_ops_t snd_pcm_mulaw_ops = {
.close = snd_pcm_generic_close, .close = snd_pcm_generic_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_mulaw_hw_refine, .hw_refine = snd_pcm_mulaw_hw_refine,

View file

@ -762,7 +762,7 @@ static void snd_pcm_multi_dump(snd_pcm_t *pcm, snd_output_t *out)
} }
} }
static snd_pcm_ops_t snd_pcm_multi_ops = { static const snd_pcm_ops_t snd_pcm_multi_ops = {
.close = snd_pcm_multi_close, .close = snd_pcm_multi_close,
.info = snd_pcm_multi_info, .info = snd_pcm_multi_info,
.hw_refine = snd_pcm_multi_hw_refine, .hw_refine = snd_pcm_multi_hw_refine,
@ -777,7 +777,7 @@ static snd_pcm_ops_t snd_pcm_multi_ops = {
.munmap = snd_pcm_multi_munmap, .munmap = snd_pcm_multi_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_multi_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_multi_fast_ops = {
.status = snd_pcm_multi_status, .status = snd_pcm_multi_status,
.state = snd_pcm_multi_state, .state = snd_pcm_multi_state,
.hwsync = snd_pcm_multi_hwsync, .hwsync = snd_pcm_multi_hwsync,

View file

@ -277,7 +277,7 @@ static void snd_pcm_null_dump(snd_pcm_t *pcm, snd_output_t *out)
} }
} }
static snd_pcm_ops_t snd_pcm_null_ops = { static const snd_pcm_ops_t snd_pcm_null_ops = {
.close = snd_pcm_null_close, .close = snd_pcm_null_close,
.info = snd_pcm_null_info, .info = snd_pcm_null_info,
.hw_refine = snd_pcm_null_hw_refine, .hw_refine = snd_pcm_null_hw_refine,
@ -292,7 +292,7 @@ static snd_pcm_ops_t snd_pcm_null_ops = {
.munmap = snd_pcm_generic_munmap, .munmap = snd_pcm_generic_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_null_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_null_fast_ops = {
.status = snd_pcm_null_status, .status = snd_pcm_null_status,
.state = snd_pcm_null_state, .state = snd_pcm_null_state,
.hwsync = snd_pcm_null_hwsync, .hwsync = snd_pcm_null_hwsync,

View file

@ -1051,7 +1051,7 @@ static void snd_pcm_plug_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(plug->gen.slave, out); snd_pcm_dump(plug->gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_plug_ops = { static const snd_pcm_ops_t snd_pcm_plug_ops = {
.close = snd_pcm_plug_close, .close = snd_pcm_plug_close,
.info = snd_pcm_plug_info, .info = snd_pcm_plug_info,
.hw_refine = snd_pcm_plug_hw_refine, .hw_refine = snd_pcm_plug_hw_refine,

View file

@ -560,7 +560,7 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
return 0; return 0;
} }
snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops = { const snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops = {
.status = snd_pcm_plugin_status, .status = snd_pcm_plugin_status,
.state = snd_pcm_generic_state, .state = snd_pcm_generic_state,
.hwsync = snd_pcm_generic_hwsync, .hwsync = snd_pcm_generic_hwsync,

View file

@ -63,7 +63,7 @@ typedef struct {
void snd_pcm_plugin_init(snd_pcm_plugin_t *plugin); void snd_pcm_plugin_init(snd_pcm_plugin_t *plugin);
extern snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops; extern const snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops;
snd_pcm_sframes_t snd_pcm_plugin_undo_read_generic snd_pcm_sframes_t snd_pcm_plugin_undo_read_generic
(snd_pcm_t *pcm, (snd_pcm_t *pcm,

View file

@ -1195,7 +1195,7 @@ static int snd_pcm_rate_close(snd_pcm_t *pcm)
return snd_pcm_generic_close(pcm); return snd_pcm_generic_close(pcm);
} }
static snd_pcm_fast_ops_t snd_pcm_rate_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_rate_fast_ops = {
.status = snd_pcm_rate_status, .status = snd_pcm_rate_status,
.state = snd_pcm_rate_state, .state = snd_pcm_rate_state,
.hwsync = snd_pcm_rate_hwsync, .hwsync = snd_pcm_rate_hwsync,
@ -1221,7 +1221,7 @@ static snd_pcm_fast_ops_t snd_pcm_rate_fast_ops = {
.poll_revents = snd_pcm_rate_poll_revents, .poll_revents = snd_pcm_rate_poll_revents,
}; };
static snd_pcm_ops_t snd_pcm_rate_ops = { static const snd_pcm_ops_t snd_pcm_rate_ops = {
.close = snd_pcm_rate_close, .close = snd_pcm_rate_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_rate_hw_refine, .hw_refine = snd_pcm_rate_hw_refine,

View file

@ -405,7 +405,7 @@ static void linear_close(void *obj)
free(obj); free(obj);
} }
static snd_pcm_rate_ops_t linear_ops = { static const snd_pcm_rate_ops_t linear_ops = {
.close = linear_close, .close = linear_close,
.init = linear_init, .init = linear_init,
.free = linear_free, .free = linear_free,

View file

@ -747,7 +747,7 @@ static void snd_pcm_route_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(route->plug.gen.slave, out); snd_pcm_dump(route->plug.gen.slave, out);
} }
static snd_pcm_ops_t snd_pcm_route_ops = { static const snd_pcm_ops_t snd_pcm_route_ops = {
.close = snd_pcm_route_close, .close = snd_pcm_route_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_route_hw_refine, .hw_refine = snd_pcm_route_hw_refine,

View file

@ -1308,7 +1308,7 @@ static void snd_pcm_share_dump(snd_pcm_t *pcm, snd_output_t *out)
snd_pcm_dump(slave->pcm, out); snd_pcm_dump(slave->pcm, out);
} }
static snd_pcm_ops_t snd_pcm_share_ops = { static const snd_pcm_ops_t snd_pcm_share_ops = {
.close = snd_pcm_share_close, .close = snd_pcm_share_close,
.info = snd_pcm_share_info, .info = snd_pcm_share_info,
.hw_refine = snd_pcm_share_hw_refine, .hw_refine = snd_pcm_share_hw_refine,
@ -1323,7 +1323,7 @@ static snd_pcm_ops_t snd_pcm_share_ops = {
.munmap = snd_pcm_share_munmap, .munmap = snd_pcm_share_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_share_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_share_fast_ops = {
.status = snd_pcm_share_status, .status = snd_pcm_share_status,
.state = snd_pcm_share_state, .state = snd_pcm_share_state,
.hwsync = snd_pcm_share_hwsync, .hwsync = snd_pcm_share_hwsync,

View file

@ -591,7 +591,7 @@ static void snd_pcm_shm_dump(snd_pcm_t *pcm, snd_output_t *out)
} }
} }
static snd_pcm_ops_t snd_pcm_shm_ops = { static const snd_pcm_ops_t snd_pcm_shm_ops = {
.close = snd_pcm_shm_close, .close = snd_pcm_shm_close,
.info = snd_pcm_shm_info, .info = snd_pcm_shm_info,
.hw_refine = snd_pcm_shm_hw_refine, .hw_refine = snd_pcm_shm_hw_refine,
@ -606,7 +606,7 @@ static snd_pcm_ops_t snd_pcm_shm_ops = {
.munmap = snd_pcm_shm_munmap, .munmap = snd_pcm_shm_munmap,
}; };
static snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = { static const snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = {
.status = snd_pcm_shm_status, .status = snd_pcm_shm_status,
.state = snd_pcm_shm_state, .state = snd_pcm_shm_state,
.hwsync = snd_pcm_shm_hwsync, .hwsync = snd_pcm_shm_hwsync,

View file

@ -739,7 +739,7 @@ static int softvol_load_control(snd_pcm_t *pcm, snd_pcm_softvol_t *svol,
return 0; return 0;
} }
static snd_pcm_ops_t snd_pcm_softvol_ops = { static const snd_pcm_ops_t snd_pcm_softvol_ops = {
.close = snd_pcm_softvol_close, .close = snd_pcm_softvol_close,
.info = snd_pcm_generic_info, .info = snd_pcm_generic_info,
.hw_refine = snd_pcm_softvol_hw_refine, .hw_refine = snd_pcm_softvol_hw_refine,