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 | |
parent | 7e16215900a133db99c2c8f817c55d05395874ed (diff) | |
download | alsa-lib-1b6d05f77a9e87ef1f03bf27a25075351f88ad01.tar.gz |
Initial Contribution
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.c | 6 | ||||
-rw-r--r-- | src/conf/alsa.conf | 2 | ||||
-rw-r--r-- | src/conf/cards/aliases.conf | 54 | ||||
-rw-r--r-- | src/control/ctl_symbols_list.c | 1 | ||||
-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 |
8 files changed, 27 insertions, 59 deletions
@@ -471,7 +471,7 @@ static int safe_strtoll(const char *str, long long *val) if (!*str) return -EINVAL; errno = 0; - if (sscanf(str, "%Li%n", &v, &endidx) < 1) + if (sscanf(str, "%lli%n", &v, &endidx) < 1) return -EINVAL; if (str[endidx]) return -EINVAL; @@ -1339,7 +1339,7 @@ static int _snd_config_save_leaf(snd_config_t *n, snd_output_t *out, snd_output_printf(out, "%ld", n->u.integer); break; case SND_CONFIG_TYPE_INTEGER64: - snd_output_printf(out, "%Ld", n->u.integer64); + snd_output_printf(out, "%lld", n->u.integer64); break; case SND_CONFIG_TYPE_REAL: snd_output_printf(out, "%-16g", n->u.real); @@ -2232,7 +2232,7 @@ int snd_config_get_ascii(const snd_config_t *config, char **ascii) { char res[32]; int err; - err = snprintf(res, sizeof(res), "%Li", config->u.integer64); + err = snprintf(res, sizeof(res), "%lli", config->u.integer64); if (err < 0 || err == sizeof(res)) { assert(0); return -ENOMEM; diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf index 4bf8f07..8013612 100644 --- a/src/conf/alsa.conf +++ b/src/conf/alsa.conf @@ -8,7 +8,7 @@ { func load files [ - "/etc/asound.conf" + "/system/etc/asound.conf" "~/.asoundrc" ] errors false diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf index c788621..09cae70 100644 --- a/src/conf/cards/aliases.conf +++ b/src/conf/cards/aliases.conf @@ -2,56 +2,6 @@ # Define aliases for various drivers # -YMF724 cards.YMF744 -YMF724F cards.YMF744 -YMF740 cards.YMF744 -YMF740C cards.YMF744 -YMF754 cards.YMF744 -CMIPCI cards.CMI8338 -CMI8738 cards.CMI8338 -CMI8738-SWIEC cards.CMI8338-SWIEC -CMI8738-MC4 cards.CMI8738-MC6 -'E-mu APS' cards.EMU10K1 -'GUS MAX' cards.GUS -'GUS ACE' cards.GUS -'GUS Extreme' cards.GUS -'AMD InterWave' cards.GUS -'Dynasonic 3-D' cards.GUS -'InterWave STB' cards.GUS -au8810 cards.AU8810 -au8820 cards.AU8820 -au8830 cards.AU8830 -Prodigy71 cards.Aureon71 -Prodigy71LT cards.Aureon71 -Prodigy71HIFI cards.Aureon71 -Aureon71Univ cards.Aureon71 -VIA82XX-MODEM cards.ICH-MODEM -'MPU-401 UART' cards.MPU-401 -'VX222/Old' cards.VX222 -'VX222/v2' cards.VX222 -'VX222/Mic' cards.VX222 -'CMI8330/C3D' cards.CMI8330 -'SB AWE' cards.SBAWE -'SB Pro' cards.SBPro -'PMac Burgundy' cards.PMac -'PMac DACA' cards.PMac -'PMac Tumbler' cards.PMac -'PMac Snapper' cards.PMac -'PMac Screamer' cards.PMac -'PMac AWACS' cards.PMac -'PMac Toonie' cards.PMacToonie -AppleOnbdAudio cards.PMacToonie -'USB US-X2Y' cards.US-X2Y -'Serial MIDI' cards.SerialMIDI -'Prodif Plus' cards.ProdifPlus -ESM1 cards.ES1968 -ES1978 cards.ES1968 -Allegro cards.Maestro3 -Canyon3D-2 cards.Maestro3 -Azalia cards.HDA-Intel -aaci-pl041 cards.AACI -AV200 cards.CMI8788 - <confdir:pcm/default.conf> -<confdir:pcm/dmix.conf> -<confdir:pcm/dsnoop.conf> +# <confdir:pcm/dmix.conf> +# <confdir:pcm/dsnoop.conf> diff --git a/src/control/ctl_symbols_list.c b/src/control/ctl_symbols_list.c new file mode 100644 index 0000000..3283dd4 --- /dev/null +++ b/src/control/ctl_symbols_list.c @@ -0,0 +1 @@ +&_snd_module_control_ext, 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, |