Statistics
| Branch: | Revision:

root / audio @ f487b677

# Date Author Comment
87e613ea 06/21/2013 09:52 pm Stefan Weil

audio: Replace static functions in header file by macros, remove GCC_ATTR

Using macros instead of static functions for dolog and for ldebug
simplifies the code and can also reduce the total code size.

GCC_ATTR was only used in audio_int.h, so it is now unused and...

4f6ab397 05/26/2013 02:14 pm Brad Smith

Remove OSS support for OpenBSD

Remove the OSS support for OpenBSD. The OSS API has not been usable
for quite some time.

Signed-off-by: Brad Smith <>
Reviewed-by: Laszlo Ersek <>
Reviewed-by: Andreas Färber <>...

997aba8e 05/18/2013 03:35 pm Michael Tokarev

remove some double-includes

Some source files #include the same header more than
once for no good reason. Remove second #includes in
such cases.

Signed-off-by: Michael Tokarev <>

457b6543 01/16/2013 08:03 pm Stefan Weil

audio: Replace non-portable asprintf in debug code by g_strdup_printf

sw->name already uses the correct g_free to free the allocated memory.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

f8fe7964 12/19/2012 09:29 am Paolo Bonzini

janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt. Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <>

077805fa 12/19/2012 09:29 am Paolo Bonzini

janitor: do not rely on indirect inclusions of or from qemu-char.h

Various header files rely on qemu-char.h including qemu-config.h or
main-loop.h, but they really do not need qemu-char.h at all (particularly
interesting is the case of the block layer!). Clean this up, and also...

525877c9 12/19/2012 09:29 am Paolo Bonzini

build: move rules from Makefile to */Makefile.objs

Signed-off-by: Paolo Bonzini <>

46ee77b3 11/30/2012 05:04 pm Anthony Liguori

Revert "audio/wavcapture: Clarify licensing"

This reverts commit 456a84d156a7c42f18b1da176dd6219e2dffd043.

This patch wasn't submitted to the list and did not get Acked by other
copyright holders in the file.

Signed-off-by: Anthony Liguori <>

d76aa45b 11/30/2012 05:04 pm Anthony Liguori

Revert "audio/audio_pt_int: Clarify licensing"

This reverts commit 72bc6f1bf710e205f175af9b1fc8bbd83e8da71f.

This patch wasn't submitted to the list and did not get Acked by other
copyright holders in the file.

Signed-off-by: Anthony Liguori <>

72bc6f1b 11/19/2012 08:26 pm malc

audio/audio_pt_int: Clarify licensing

Signed-off-by: malc <>

456a84d1 11/19/2012 08:23 pm malc

audio/wavcapture: Clarify licensing

Signed-off-by: malc <>

93b65997 09/23/2012 12:34 am Stefan Weil

audio: Fix warning from static code analysis

smatch report:
audio/audio_template.h:416 AUD_open_out(18) warn:
variable dereferenced before check 'as' (see line 414)

Moving the ldebug statement after the statement which checks 'as'
fixes that warning.

Signed-off-by: Stefan Weil <>...

13ef70f6 08/28/2012 06:11 pm munkyu.im

audio/winwave: previous audio buffer should be flushed

Winwave audio backend has problem with pausing and restart audio out.
Unlike other backends, Winwave pausing API does not flush audio buffer.
As a result, the previous audio data are played in front of...

83617103 07/16/2012 05:08 pm malc

audio: Unbreak capturing in mixemu case

Signed-off-by: malc <>

eb2aeacf 06/15/2012 07:58 pm malc

audio/winwave: Fix typo

Signed-off-by: malc <>

b0b68fc6 06/07/2012 10:21 am Paolo Bonzini

build: move audio/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

aeb29b64 05/24/2012 06:35 pm Jan Kiszka

audio: Always call fini on exit

Not only clean up enabled voices but any registered one. Backends like
pulsaudio rely on unconditional fini handler invocations.

This fixes "Memory pool destroyed but not all memory blocks freed!"
warnings on VM shutdowns when pa is used and lockups of QEMU on shutdown...

a2885387 05/18/2012 02:19 pm Roger Pau Monne

audio: split IN_T into two separate constants

Split IN_T into BSIZE and ITYPE, to avoid expansion if the OS has
defined macros for the intX_t and uintX_t types. The IN_T constant is
then defined in mixeng_template.h so it can be used by the
functions/macros on this header file....

8f473dd1 05/03/2012 11:47 pm Gerd Hoffmann

fix build with pulseaudio versions older than 0.9.11

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: malc <>

d6c05bbf 04/25/2012 08:04 pm Gerd Hoffmann

fix paaudio.c warnings

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: malc <>

a70c99c6 04/17/2012 03:57 pm Marc-André Lureau

audio/spice: add support for volume control

Use Spice server volume control API when available.

Signed-off-by: Marc-Andr? Lureau <>
Signed-off-by: malc <>

ea9ebc2c 04/17/2012 03:57 pm Marc-André Lureau

Do not use pa_simple PulseAudio API

Unfortunately, pa_simple is a limited API which doesn't let us
retrieve the associated pa_stream. It is needed to control the volume
of the stream.

In v4:
- add missing braces

Signed-off-by: Marc-Andr? Lureau <>...

6e7a7f3d 04/17/2012 03:57 pm Marc-André Lureau

Allow controlling volume with PulseAudio backend

Signed-off-by: Marc-Andr? Lureau <>
Signed-off-by: malc <>

6c95ab94 04/17/2012 03:57 pm Marc-André Lureau

audio: add VOICE_VOLUME ctl

Add a new PCM control operation to update the stream volume on the
audio backend. The argument given is a SWVoiceOut/SWVoiceIn.

v4:
- verified other backends didn't fail/assert on this new control
they randomly return 0 or -1, but we ignore return value....

c01b2456 04/17/2012 03:57 pm Marc-André Lureau

audio: don't apply volume effect if backend has VOICE_VOLUME_CAP

If the audio backend is capable of volume control, don't apply
software volume (mixeng_volume ()), but instead, rely on backend
volume control. This will allow guest to have full range volume...

b4bd0b16 02/25/2012 04:16 pm Stefan Weil

audio: Add some fall through comments

Static code analysers expect these comments for case statements without
a break statement.

Signed-off-by: Stefan Weil <>
Signed-off-by: malc <>

e7d81004 12/14/2011 01:09 pm Stefan Weil

Fix spelling in comments, documentation and messages

accidently->accidentally
annother->another
choosen->chosen
consideres->considers
decriptor->descriptor
developement->development
paramter->parameter
preceed->precede
preceeding->preceding
priviledge->privilege...

15d4a723 11/18/2011 07:55 pm Stefan Weil

fmodaudio: Remove unused variable 'bits16' (reported by cppcheck)

The variable is assigned a value which is never used,
so remove variable and assignment.

Signed-off-by: Stefan Weil <>
Signed-off-by: malc <>

7f67d892 09/20/2011 11:16 pm Anthony Liguori

Merge remote-tracking branch 'qmp/queue/qmp' into staging

27acf660 09/20/2011 04:55 pm Juan Quintela

wavaudio: Use stdio instead of QEMUFile

QEMUFile * is only intended for migration nowadays. Using it for
anything else just adds pain and a layer of buffers for no good
reason.

Signed-off-by: Juan Quintela <>
CC: malc <>...

b04df2a4 09/20/2011 04:50 pm Juan Quintela

wavcapture: Use stdio instead of QEMUFile

QEMUFile * is only intended for migration nowadays. Using it for
anything else just adds pain and a layer of buffers for no good
reason.

Signed-off-by: Juan Quintela <>
CC: malc <>...

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

Replace the VMSTOP macros with a proper state type

Today, when notifying a VM state change with vm_state_notify(),
we pass a VMSTOP macro as the 'reason' argument. This is not ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

744d3644 06/23/2011 05:56 pm Andreas Färber

coreaudio: Fix OSStatus format specifier

OSStatus type is defined as SInt32. That's signed int on LP64 and
signed long otherwise.
Since it is an explicit 32-bit-width type, cast to corresponsing POSIX type
and use PRId32 format specifier. This avoids a warning on ppc64....

cbc36cb0 06/23/2011 05:56 pm Andreas Färber

coreaudio: Avoid formatting UInt32 type

coreaudioVoiceOut's audioDevicePropertyBufferFrameSize is defined as UInt32
and is being used by reference for AudioDevice{Get,Set}Property().
UInt32 is unsigned int on LP64 but unsigned long otherwise.

Cast to POSIX type and use PRIu32 format specifier to hide the details....

d9cbb0f3 06/14/2011 04:08 am Alexandre Raymond

Fix compilation warning due to incorrectly specified type

In audio/coreaudio.c, a variable named "str" was assigned "const char" values,
which resulted in the following warnings:

-----8<-----
audio/coreaudio.c: In function ‘coreaudio_logstatus’:
audio/coreaudio.c:59: warning: initialization discards qualifiers from pointer target type...

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

578c7b2c 05/31/2011 11:14 pm Juha Riihim?ki

audio: fix integer overflow expression

Fix an integer overflow that can happen for signed 32 bit types
when using FLOAT_MIXENG. (Note that at the moment this is only true
when using the MacOSX coreaudio audio driver.)

Signed-off-by: Juha Riihim?ki <>...

4ff9786c 04/03/2011 10:42 pm Stefan Weil

Fix trivial "endianness bugs"

Replace endianess -> endianness.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
bf1064b5 01/25/2011 06:56 pm Gerd Hoffmann

pulseaudio: tweak config

Zap unused divisor field.
Raise the buffer size default.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: malc <>

e6d16fa4 01/25/2011 06:56 pm Gerd Hoffmann

pulseaudio: setup buffer attrs

Request reasonable buffer sizes from pulseaudio. Without this
pa_simple_write() can block quite long and lead to dropouts,
especially with guests which use small audio ring buffers.

Signed-off-by: Gerd Hoffmann <>...

6315633b 01/25/2011 06:56 pm Gerd Hoffmann

pulseaudio: process 1/4 buffer max at once

Limit the size of data pieces processed by the pulseaudio worker
threads. Never ever process more than 1/4 of the buffer at once.

Background: The buffer area currently processed by the pulseaudio thread
is blocked, i.e. the main thread (or iothread) can't fill in more data...

00e07679 01/12/2011 05:36 pm Michael Walle

audio: split sample conversion and volume mixing

Refactor the volume mixing, so it can be reused for capturing devices.
Additionally, it removes superfluous multiplications with the nominal
volume within the hardware voice code path.

Signed-off-by: Michael Walle <>...

d66bddd7 01/09/2011 02:06 am Michael Walle

alsaaudio: add endianness support for VoiceIn

Signed-off-by: Michael Walle <>
Signed-off-by: malc <>

b6c9c940 01/09/2011 02:05 am Michael Walle

ossaudio: add endianness support for VoiceIn

Signed-off-by: Michael Walle <>
Signed-off-by: malc <>

8a7d0890 01/04/2011 02:53 am Michael Walle

noaudio: correctly account acquired samples

This will fix the return value of the function which otherwise returns too
many samples because sw->total_hw_samples_acquired isn't correctly
accounted.

Signed-off-by: Michael Walle <>
Signed-off-by: malc <>

85882c71 12/10/2010 04:25 am Michael Walle

noaudio: fix return value for read()

Read should return bytes instead of samples.

Signed-off-by: Michael Walle <>
Signed-off-by: malc <>

ab9de369 12/04/2010 10:51 pm Stefan Weil

audio: Use GCC_FMT_ATTR (format checking)

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

39deb1e4 11/18/2010 01:30 pm malc

audio: Only use audio timer when necessary

Originally proposed by Gerd Hoffmann.

Signed-off-by: malc <>
Acked-by: Gerd Hoffmann <>

cf2c1839 11/11/2010 04:59 pm Gerd Hoffmann

add copyright to spiceaudio

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: malc <>

3e313753 11/09/2010 10:39 pm Gerd Hoffmann

spice: add audio

Add support for the spice audio interface. With this patch applied
audio can be forwarded over the network from/to the spice client. Both
recording and playback is supported.

The driver is first in the driver list, but the can_be_default flag is...

38cc9b60 10/17/2010 11:39 pm Jindrich Makovicka

issue snd_pcm_start() when capturing audio

snd_pcm_start() starts the capture process and ensures that the events
are delivered to the poll handler. Without the call, capture can be started
only when there is simultaneous playback running.

Signed-off-by: Jindrich Makovicka <>...

22d948a2 10/17/2010 11:39 pm Jindrich Makovicka

fix 100% CPU load when idle with ALSA

Playback control function did not disable polling when playback stops.
Caused busy spinning of the main loop due to unprocessed events.

Signed-off-by: Jindrich Makovicka <>
Signed-off-by: malc <>

8b7968f7 10/03/2010 09:34 am Stefan Weil

Use GCC_FMT_ATTR (format checking)

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

e5924d89 10/03/2010 09:34 am Stefan Weil

Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking)

Since version 4.4.x, gcc supports additional format attributes.
attribute ((format (gnu_printf, 1, 2)))
should be used instead of
attribute ((format (printf, 1, 2))...

fd5723b3 09/29/2010 07:24 am Wu Fengguang

pulse-audio: fix bug on updating rpos

Fix a rpos coordination bug between qpa_run_out() and qpa_thread_out(),
which shows up as playback noises.

qpa_run_out()
qpa_thread_out loop N critical section 1
qpa_run_out() qpa_thread_out loop N doing pa_simple_write()...
575c153f 09/28/2010 07:56 am malc

audio: Fix memory size for resampling buffer in DAC case

Signed-off-by: malc <>

9c9e7d51 09/22/2010 11:15 pm Stefan Weil

Move macros GCC_ATTR and GCC_FMT_ATTR to common header file

By moving the definition of GCC_ATTR and GCC_FMT_ATTR
from audio_int.h to qemu-common.h these macros are
now generally available for further patches which add
the gcc format attribute.

Newer gcc versions support format gnu_printf which is...

60592edd 08/07/2010 07:04 pm malc

audio/sdl: return on error

Signed-off-by: malc <>

d087bb3e 08/06/2010 12:15 pm malc

audio/sdl: be more anal about errors

Signed-off-by: malc <>

4b7c0418 08/06/2010 12:15 pm malc

audio: make audio_pt_init block all signals

Signed-off-by: malc <>

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

0bfcd599 05/22/2010 11:02 am Blue Swirl

Fix %lld or %llx printf format use

Signed-off-by: Blue Swirl <>

6c557ab9 04/22/2010 02:21 pm Serge Ziryukin

audio/sdlaudio: remove unused variable

Remove unused 'shift' variable spotted by clang.
Also clean up aud_to_sdlfmt which used to get the value
of shift.

Signed-off-by: Serge Ziryukin <>
Signed-off-by: malc <>

8bb414d2 04/21/2010 02:40 pm malc

audio/alsa: Avoid snd_pcm_format_t vs audfmt_e mixup

Spotted by Serge Ziryukin and based on his patch, thanks.

Signed-off-by: malc <>

8631b608 03/16/2010 05:55 pm Markus Armbruster

monitor: Separate "default monitor" and "current monitor" cleanly

Commits 376253ec..731b0364 introduced global variable cur_mon, which
points to the "default monitor" (if any), except during execution of
monitor_read() or monitor_control_read() it points to the monitor from...

ad483a51 03/11/2010 05:28 pm malc

audio: fix comment

Signed-off-by: malc <>

d9812b03 02/28/2010 05:34 pm malc

audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handler

Signed-off-by: malc <>

f093feb7 02/28/2010 05:20 pm Vagrant Cascadian

audio/alsa: Spelling typo (paramters)

Trivial patch to fix the spelling of "parameters".

Signed-off-by: malc <>

82584e21 01/17/2010 01:03 am malc

audio: include more information into audio_bug's output

Signed-off-by: malc <>

ff541499 01/16/2010 11:25 pm malc

Revert "sdlaudio: make it suck less"

This reverts commit 4839abe78fd466a3cf06faa7c362154afd5404f1.

The commit was badly broken, Gentoo has sdl as the default driver,
consequently 5 gentoo users have hit the breakage and were kind enough
to report, so thank you:...

72ff25e4 01/13/2010 12:59 am Juergen Lock

Workaround for broken OSS_GETVERSION on FreeBSD, part two

Turns out on those versions of FreeBSD (>= 7.x) that know OSS_GETVERSION
the ioctl doesn't actually work yet (except in the Linuxolator), so if
building on FreeBSD assume the sound drivers are new enough if the ioctl...

3d709fe7 01/09/2010 05:07 pm malc

oss: fix fragment setting

Previous patch introduced subtle regression, in cases when
OSS_GETVERSION fails the code wasn't falling back to
SNDCTL_DSP_SETFRAGMENT.

Signed-off-by: malc <>

6d246526 01/09/2010 04:55 pm malc

oss: issue OSS_GETVERSION ioctl only when needed

Signed-off-by: malc <>

78d9356d 01/08/2010 11:28 pm malc

oss: refactor code around policy setting

This fixes a problem with a previous patch spotted by Juergen Lock,
thanks to him again.

Signed-off-by: malc <>

e726fe7d 01/08/2010 10:26 am malc

oss: workaround for cases when OSS_GETVERSION is not defined

Thanks to Juergen Lock.

Signed-off-by: malc <>

a244eb74 12/03/2009 05:41 pm Juan Quintela

audio: fix compilation of DEBUG_PLIVE

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d959fce9 12/03/2009 05:41 pm Juan Quintela

audio: port to vmstate

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

7cbb28ed 11/18/2009 06:22 pm malc

audio: Remove conditional around sw which can not be NULL

Noticed by Steve Grubb.

Signed-off-by: malc <>

a58c16dc 10/15/2009 09:43 am malc

winwave: ADC support

Signed-off-by: malc <>

cb4f03e8 10/15/2009 01:40 am malc

audio: remove last remnants of _t

Signed-off-by: malc <>

bc578fe0 10/15/2009 01:15 am malc

winwave: make error logging more consistent

Signed-off-by: malc <>

2a117d40 10/15/2009 01:11 am malc

winwave: follow the rules when closing the output device

a. call waveOutReset to drain the queue
b. unprepare headers before freeing underlying memory

Signed-off-by: malc <>

1a4ea1e3 10/13/2009 05:14 pm Michael S. Tsirkin

qemu: allow pulseaudio to be the default

We're seeing various issues with the SDL audio backend and want to
switch to the pulseaudio backend. See e.g.

https://bugzilla.redhat.com/495964
https://bugzilla.redhat.com/519540
https://bugzilla.redhat.com/496627...
6165a426 10/11/2009 05:52 am malc

winwave: pause/restore playing upon seeing VOICE_DISABLE/ENABLE

Signed-off-by: malc <>

875ef647 10/11/2009 05:38 am malc

winwave: close event handle and delete wait object after closing HWAVEOUT

To avoid possibly being called back and thus racing.

Signed-off-by: malc <>

f4e8d0b7 10/11/2009 04:39 am malc

winwave: remove wait object when finalizing DAC voice

Signed-off-by: malc <>

e0bda367 10/10/2009 04:16 pm malc

winwave: poll mode

Signed-off-by: malc <>

d5631638 10/10/2009 12:18 am malc

Windows Waveform Audio driver (no ADC support yet)

Signed-off-by: malc <>

a628b869 10/03/2009 02:30 am malc

oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)

Signed-off-by: malc <>

de2ca4fb 10/02/2009 02:19 am malc

alsa: Change default buffer/period size

Increase buffer size but do not rely on ALSA picking up default period
size.

Signed-off-by: malc <>

301901b5 10/02/2009 01:37 am malc

oss/alsa: Do not invoke UB described in 7.15.1.1

Additional argument (whether to try poll mode) is only passed with
VOICE_ENABLE command.

Thanks to Markus Armbruster for noticing the potential breakage.

4839abe7 09/30/2009 03:34 pm malc

sdlaudio: make it suck less

Signed-off-by: malc <>

3fd7f635 09/18/2009 01:04 pm malc

sdlaudio: use correct function names in sdl_XXX calls

Signed-off-by: malc <>

bdff253c 09/18/2009 01:04 pm malc

audio: internal API change

pcm_ops.run_out now takes number of live samples (which will be always
greater than zero) as a second argument, every driver was calling
audio_pcm_hw_get_live_out anyway with exception of fmod which used
audio_pcm_hw_get_live_out2 for no good reason....

155a8ad3 09/18/2009 01:04 pm malc

audio: use correct email address

Signed-off-by: malc <>