diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-05-25 14:40:44 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-25 14:49:00 +0200 |
commit | 86b9cf9de6c8310730b04d136f1bbd239ee4a001 (patch) | |
tree | 787cc46211002fce9098fd73ccbb90c9fbe1a214 | |
parent | e1f8cb08030dfc7926dfb43875ae9a421bc808ff (diff) | |
download | salsa-lib-86b9cf9de6c8310730b04d136f1bbd239ee4a001.tar.gz |
Add --disable-4bit configure option
To disable IMA ADPCM support. Reduce the code size slightly.
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | src/pcm.c | 20 | ||||
-rw-r--r-- | src/recipe.h.in | 3 |
3 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a74757e..5c863a2 100644 --- a/configure.ac +++ b/configure.ac @@ -116,6 +116,11 @@ AC_ARG_ENABLE(float, [support floatin-point unit]), support_float="$enableval", support_float="no") +AC_ARG_ENABLE(float, + AS_HELP_STRING([--disable-4bit], + [drop the support for 4bit PCM (IMA ADPCM)]), + support_4bit="$enableval", support_4bit="yes") + AC_ARG_ENABLE(everything, AS_HELP_STRING([--enable-everything], [enable everything :)]), @@ -135,6 +140,7 @@ if test "$everything" = "yes"; then symfuncs="yes" output_buffer="yes" support_float="yes" + support_4bit="yes" fi SALSA_DEPLIBS="" @@ -192,6 +198,13 @@ else fi AC_SUBST(SALSA_SUPPORT_FLOAT) +if test "$support_4bit" = "yes"; then + SALSA_SUPPORT_4BIT_PCM=1 +else + SALSA_SUPPORT_4BIT_PCM=0 +fi +AC_SUBST(SALSA_SUPPORT_4BIT_PCM) + if test "$delight_valgrind" = "yes"; then AC_DEFINE(DELIGHT_VALGRIND) fi @@ -573,6 +573,7 @@ void *snd_pcm_channel_area_addr(const snd_pcm_channel_area_t *area, return (char *) area->addr + bitofs / 8; } +#if SALSA_SUPPORT_4BIT_PCM static int area_silence_4bit(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, unsigned int samples, snd_pcm_format_t format) @@ -595,6 +596,14 @@ static int area_silence_4bit(const snd_pcm_channel_area_t *dst_area, } return 0; } +#else +static int area_silence_4bit(const snd_pcm_channel_area_t *dst_area, + snd_pcm_uframes_t dst_offset, + unsigned int samples, snd_pcm_format_t format) +{ + return -EINVAL; +} +#endif /* SALSA_SUPPORT_4BIT_PCM */ int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, @@ -635,6 +644,7 @@ int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_areas, return 0; } +#if SALSA_SUPPORT_4BIT_PCM static int area_copy_4bit(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_area, @@ -677,6 +687,16 @@ static int area_copy_4bit(const snd_pcm_channel_area_t *dst_area, } return 0; } +#else +static int area_copy_4bit(const snd_pcm_channel_area_t *dst_area, + snd_pcm_uframes_t dst_offset, + const snd_pcm_channel_area_t *src_area, + snd_pcm_uframes_t src_offset, + unsigned int samples, snd_pcm_format_t format) +{ + return -EINVAL; +} +#endif /* SALSA_SUPPORT_4BIT_PCM */ int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_area, snd_pcm_uframes_t dst_offset, diff --git a/src/recipe.h.in b/src/recipe.h.in index db88918..b59b867 100644 --- a/src/recipe.h.in +++ b/src/recipe.h.in @@ -19,6 +19,9 @@ /* Support floating pointer */ #define SALSA_SUPPORT_FLOAT @SALSA_SUPPORT_FLOAT@ +/* Support 4bit PCM (IMA ADPCM) */ +#define SALSA_SUPPORT_4BIT_PCM @SALSA_SUPPORT_4BIT_PCM@ + #define SALSA_DEVPATH "@DEVPATH@" #endif /* __ALSA_RECIPE_H */ |