aboutsummaryrefslogtreecommitdiffstats
path: root/audio/alsaaudio.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
committerDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
commit5d8f37ad78fc66901af50c762029a501561f3b23 (patch)
tree206790f8f21000850a98c4f9590a79e779106278 /audio/alsaaudio.c
parentcd059b15f2c7df69f4a087bd66900eb172e41d1c (diff)
downloadexternal_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.zip
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.gz
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.bz2
Merge upstream QEMU 10.0.50 into the Android source tree.
This change integrates many changes from the upstream QEMU sources. Its main purpose is to enable correct ARMv6 and ARMv7 support to the Android emulator. Due to the nature of the upstream code base, this unfortunately also required changes to many other parts of the source. Note that to ensure easier integrations in the future, some source files and directories that have heavy Android-specific customization have been renamed with an -android suffix. The original files are still there for easier integration tracking, but *never* compiled. For example: net.c net-android.c qemu-char.c qemu-char-android.c slirp/ slirp-android/ etc... Tested on linux-x86, darwin-x86 and windows host machines.
Diffstat (limited to 'audio/alsaaudio.c')
-rw-r--r--audio/alsaaudio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 1cc4d6e..1ae42b6 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include <alsa/asoundlib.h>
+#include "qemu-common.h"
#include "audio.h"
#define AUDIO_CAP "alsa"
@@ -92,10 +93,10 @@
/* these are inlined functions in the original headers */
#define FF_snd_pcm_hw_params_alloca(ptr) \
- do { assert(ptr); *ptr = (snd_pcm_hw_params_t *) alloca(FF(snd_pcm_hw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_hw_params_sizeof)()); } while (0)
+ do { *ptr = (snd_pcm_hw_params_t *) alloca(FF(snd_pcm_hw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_hw_params_sizeof)()); } while (0)
#define FF_snd_pcm_sw_params_alloca(ptr) \
- do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(FF(snd_pcm_sw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_sw_params_sizeof)()); } while (0)
+ do { *ptr = (snd_pcm_sw_params_t *) alloca(FF(snd_pcm_sw_params_sizeof)()); memset(*ptr, 0, FF(snd_pcm_sw_params_sizeof)()); } while (0)
static void* alsa_lib;
@@ -600,7 +601,7 @@ static int alsa_run_out (HWVoiceOut *hw)
int rpos, live, decr;
int samples;
uint8_t *dst;
- st_sample_t *src;
+ struct st_sample *src;
snd_pcm_sframes_t avail;
live = audio_pcm_hw_get_live_out (hw);
@@ -685,13 +686,13 @@ static void alsa_fini_out (HWVoiceOut *hw)
}
}
-static int alsa_init_out (HWVoiceOut *hw, audsettings_t *as)
+static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as)
{
ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw;
struct alsa_params_req req;
struct alsa_params_obt obt;
snd_pcm_t *handle;
- audsettings_t obt_as;
+ struct audsettings obt_as;
int result = -1;
/* shut alsa debug spew */
@@ -776,13 +777,13 @@ static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...)
return -1;
}
-static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as)
+static int alsa_init_in (HWVoiceIn *hw, struct audsettings *as)
{
ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw;
struct alsa_params_req req;
struct alsa_params_obt obt;
snd_pcm_t *handle;
- audsettings_t obt_as;
+ struct audsettings obt_as;
int result = -1;
/* shut alsa debug spew */
@@ -887,7 +888,7 @@ static int alsa_run_in (HWVoiceIn *hw)
for (i = 0; i < 2; ++i) {
void *src;
- st_sample_t *dst;
+ struct st_sample *dst;
snd_pcm_sframes_t nread;
snd_pcm_uframes_t len;