summaryrefslogtreecommitdiff
path: root/audio/alsaaudio.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-17 22:19:29 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-17 22:19:29 +0000
commitf941aa256f2254c3f35f00fcf5d7f20dba55a5b7 (patch)
tree7e92c23171d665c8841d2afb7765ac45c94b70aa /audio/alsaaudio.c
parentb93aebecb0844b220c1652b79e698db2afe3bbab (diff)
downloadqemu-f941aa256f2254c3f35f00fcf5d7f20dba55a5b7.tar.gz
qemu-f941aa256f2254c3f35f00fcf5d7f20dba55a5b7.tar.bz2
qemu-f941aa256f2254c3f35f00fcf5d7f20dba55a5b7.zip
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
Diffstat (limited to 'audio/alsaaudio.c')
-rw-r--r--audio/alsaaudio.c26
1 files changed, 26 insertions, 0 deletions
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;