diff options
author | Xiaopeng Yang <xiaopeng.yang@windriver.com> | 2008-11-20 10:37:39 +0800 |
---|---|---|
committer | Xiaopeng Yang <xiaopeng.yang@windriver.com> | 2008-11-20 10:37:39 +0800 |
commit | 1b6d05f77a9e87ef1f03bf27a25075351f88ad01 (patch) | |
tree | 92c1264f00ded1dc75320c4a7861fb2d2a92726b /src/pcm | |
parent | 7e16215900a133db99c2c8f817c55d05395874ed (diff) | |
download | alsa-lib-1b6d05f77a9e87ef1f03bf27a25075351f88ad01.tar.gz |
Initial Contribution
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/pcm_misc.c | 9 | ||||
-rw-r--r-- | src/pcm/pcm_mmap.c | 3 | ||||
-rw-r--r-- | src/pcm/pcm_null.c | 2 | ||||
-rw-r--r-- | src/pcm/pcm_symbols_list.c | 9 |
4 files changed, 20 insertions, 3 deletions
diff --git a/src/pcm/pcm_misc.c b/src/pcm/pcm_misc.c index c075b24..ef6c417 100644 --- a/src/pcm/pcm_misc.c +++ b/src/pcm/pcm_misc.c @@ -26,6 +26,15 @@ #include <byteswap.h> #include "pcm_local.h" +/* Bionic does not provide bswap_64() */ +#ifndef bswap_64 +#undef __ASM_ARM_BYTEORDER_H +#include <asm/byteorder.h> +#include <linux/byteorder/swab.h> + +#define bswap_64 __swab64 +#endif + /** * \brief Return sign info for a PCM sample linear format diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c index 4621fe6..9771b6d 100644 --- a/src/pcm/pcm_mmap.c +++ b/src/pcm/pcm_mmap.c @@ -24,11 +24,12 @@ #include <sys/poll.h> #include <sys/mman.h> #include <sys/shm.h> +#include <unistd.h> #include "pcm_local.h" size_t page_size(void) { - long s = sysconf(_SC_PAGE_SIZE); + int s = getpagesize(); assert(s > 0); return s; } diff --git a/src/pcm/pcm_null.c b/src/pcm/pcm_null.c index 0e84f8d..60ee9b6 100644 --- a/src/pcm/pcm_null.c +++ b/src/pcm/pcm_null.c @@ -139,7 +139,6 @@ static int snd_pcm_null_start(snd_pcm_t *pcm) static int snd_pcm_null_drop(snd_pcm_t *pcm) { snd_pcm_null_t *null = pcm->private_data; - assert(null->state != SND_PCM_STATE_OPEN); null->state = SND_PCM_STATE_SETUP; return 0; } @@ -147,7 +146,6 @@ static int snd_pcm_null_drop(snd_pcm_t *pcm) static int snd_pcm_null_drain(snd_pcm_t *pcm) { snd_pcm_null_t *null = pcm->private_data; - assert(null->state != SND_PCM_STATE_OPEN); null->state = SND_PCM_STATE_SETUP; return 0; } diff --git a/src/pcm/pcm_symbols_list.c b/src/pcm/pcm_symbols_list.c new file mode 100644 index 0000000..12221fd --- /dev/null +++ b/src/pcm/pcm_symbols_list.c @@ -0,0 +1,9 @@ +&_snd_module_pcm_copy, +&_snd_module_pcm_linear, +&_snd_module_pcm_plug, +&_snd_module_pcm_null, +&_snd_module_pcm_empty, +&_snd_module_pcm_hooks, +&_snd_module_pcm_asym, +&_snd_module_pcm_extplug, +&_snd_module_pcm_ioplug, |