From f941aa256f2254c3f35f00fcf5d7f20dba55a5b7 Mon Sep 17 00:00:00 2001 From: ths Date: Sat, 17 Feb 2007 22:19:29 +0000 Subject: Qemu support for S32 and U32 alsa output, by Vassili Karpov. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2427 c046a42c-6fe2-441c-8c8c-71466251a162 --- audio/alsaaudio.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'audio/alsaaudio.c') diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 71e5235664..2e59dfa4c4 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -157,6 +157,12 @@ static int aud_to_alsafmt (audfmt_e fmt) case AUD_FMT_U16: return SND_PCM_FORMAT_U16_LE; + case AUD_FMT_S32: + return SND_PCM_FORMAT_S32_LE; + + case AUD_FMT_U32: + return SND_PCM_FORMAT_U32_LE; + default: dolog ("Internal logic error: Bad audio format %d\n", fmt); #ifdef DEBUG_AUDIO @@ -199,6 +205,26 @@ static int alsa_to_audfmt (int alsafmt, audfmt_e *fmt, int *endianness) *fmt = AUD_FMT_U16; break; + case SND_PCM_FORMAT_S32_LE: + *endianness = 0; + *fmt = AUD_FMT_S32; + break; + + case SND_PCM_FORMAT_U32_LE: + *endianness = 0; + *fmt = AUD_FMT_U32; + break; + + case SND_PCM_FORMAT_S32_BE: + *endianness = 1; + *fmt = AUD_FMT_S32; + break; + + case SND_PCM_FORMAT_U32_BE: + *endianness = 1; + *fmt = AUD_FMT_U32; + break; + default: dolog ("Unrecognized audio format %d\n", alsafmt); return -1; -- cgit v1.2.3