Skip to content

Commit

Permalink
Configure script allows for the disabling of the pcm module. When
Browse files Browse the repository at this point in the history
disabled, the pcm symbols will not be available. Add guards to remove
symbols from version map when not present.

Closes: #376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
nvinson authored and perexg committed Jan 24, 2024
1 parent 159a4b0 commit d7b82eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ SUBDIRS += mixer
libasound_la_LIBADD += mixer/libmixer.la
endif
if BUILD_PCM
if VERSIONED_SYMBOLS
VERSION_CPPFLAGS += -DHAVE_PCM_SYMS -DHAVE_TIMER_SYMS
endif
SUBDIRS += pcm timer
libasound_la_LIBADD += pcm/libpcm.la timer/libtimer.la
endif
Expand Down
13 changes: 13 additions & 0 deletions src/Versions.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ALSA_0.9 {
};

ALSA_0.9.0rc4 {
#ifdef HAVE_PCM_SYMS
global:

@SYMBOL_PREFIX@snd_pcm_hw_params_get_access;
Expand All @@ -42,6 +43,7 @@ ALSA_0.9.0rc4 {
@SYMBOL_PREFIX@snd_pcm_hw_params_get_rate_max;
@SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_near;
@SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_first;

@SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_last;

@SYMBOL_PREFIX@snd_pcm_hw_params_get_period_time;
Expand Down Expand Up @@ -85,29 +87,38 @@ ALSA_0.9.0rc4 {
@SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_near;
@SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_first;
@SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_last;
#endif

} ALSA_0.9;

ALSA_0.9.0rc8 {
#ifdef HAVE_PCM_SYMS
global:

@SYMBOL_PREFIX@snd_pcm_forward;
@SYMBOL_PREFIX@snd_pcm_status_get_trigger_htstamp;
@SYMBOL_PREFIX@snd_pcm_status_get_htstamp;
#endif

} ALSA_0.9.0rc4;

ALSA_0.9.0 {
#if defined HAVE_PCM_SYMS || defined HAVE_TIMER_SYMS
global:

#if defined HAVE_PCM_SYMS
@SYMBOL_PREFIX@snd_pcm_type_name;
#endif
#ifdef HAVE_TIMER_SYMS
@SYMBOL_PREFIX@snd_timer_query_info;
@SYMBOL_PREFIX@snd_timer_query_params;
@SYMBOL_PREFIX@snd_timer_query_status;
@SYMBOL_PREFIX@snd_timer_params_set_exclusive;
@SYMBOL_PREFIX@snd_timer_params_get_exclusive;
@SYMBOL_PREFIX@snd_timer_params_set_filter;
@SYMBOL_PREFIX@snd_timer_params_get_filter;
#endif
#endif
} ALSA_0.9.0rc8;

ALSA_0.9.3 {
Expand Down Expand Up @@ -146,11 +157,13 @@ ALSA_1.2.6 {
} ALSA_1.1.6;

ALSA_1.2.9 {
#ifdef HAVE_PCM_SYMS
global:

@SYMBOL_PREFIX@snd_pcm_hw_params_is_perfect_drain;
@SYMBOL_PREFIX@snd_pcm_hw_params_set_drain_silence;
@SYMBOL_PREFIX@snd_pcm_hw_params_get_drain_silence;
#endif
} ALSA_1.2.6;

ALSA_1.2.10 {
Expand Down

0 comments on commit d7b82eb

Please sign in to comment.