summaryrefslogtreecommitdiff
path: root/audio
AgeCommit message (Collapse)AuthorFilesLines
2015-07-08ossaudio: fix memory leakGonglei1-0/+1
Variable "conf" going out of scope leaks the storage it points to in line 856. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Message-Id: <1435021270-7768-1-git-send-email-arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-06-22qerror: Move #include out of qerror.hMarkus Armbruster2-0/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
2015-06-15ossaudio: use trace events instead of debug config flagKővágó, Zoltán1-21/+4
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15alsaaudio: use trace events instead of verboseKővágó, Zoltán1-46/+14
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15dsoundaudio: remove primary bufferKővágó, Zoltán1-104/+0
Enabling this option just creates a playback buffer with the specified settings, and then ignores it. It's probably some outdated hack to set audio formats on windows. (The first created stream dictates all other streams settings, at least on some Windows versions). Setting DAC_FIXED_SETTINGS should have the same effect as setting (the now removed) primary buffer. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15dsoundaudio: remove *_retries kludgesKővágó, Zoltán2-83/+20
According to MSDN this may happen when the window is not in the foreground, but the default is 1 since a long time (which means no retries), so it should be ok. I've found no problems during testing it on Windows 7 and wine, so this was probably only the case with some old Windows versions. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: remove pliveKővágó, Zoltán2-53/+0
It was useless even 3 years ago, so it can probably safely go away: https://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg02427.html Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: remove LOG_TO_MONITOR along with default_monKővágó, Zoltán1-20/+3
Setting QEMU_AUDIO_LOG_TO_MONITOR=1 can crash qemu (if qemu tries to log to the monitor before it's being initialized), and also nothing else in qemu logs to the monitor. This log to monitor feature was the last thing that used the default_mon variable, so I removed it too (as using it can cause problems). Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15sdlaudio: do not allow multiple instancesKővágó, Zoltán1-0/+7
Since SDL uses a lot of global data, we can't create independent instances of sdl audio backend. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15coreaudio: do not use global variables where possibleKővágó, Zoltán1-19/+24
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15dsoundaudio: do not use global variablesKővágó, Zoltán2-50/+74
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15paaudio: fix possible resource leakKővágó, Zoltán1-1/+5
qpa_audio_init did not clean up resources properly if the initialization failed. This hopefully fixes it. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15wavaudio: do not use global variablesKővágó, Zoltán1-16/+21
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15ossaudio: do not use global variablesKővágó, Zoltán1-49/+61
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15alsaaudio: do not use global variablesKővágó, Zoltán1-68/+82
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15paaudio: do not use global variablesKővágó, Zoltán1-46/+52
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: expose drv_opaque to init_out and init_inKővágó, Zoltán11-20/+27
Currently the opaque pointer returned by audio_driver's init is only exposed to the driver's fini, but not to audio_pcm_ops. This way if someone wants to share a variable with the driver and the pcm, he must use global variables. This patch fixes it by adding a third parameter to audio_pcm_op's init_out and init_in. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: remove winwave audio driverKővágó, Zoltán3-719/+0
DirectSound should be a superior choice on Windows. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: remove fmod backendKővágó, Zoltán3-688/+0
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-15audio: remove esd backendKővágó, Zoltán3-559/+0
ESD is no longer developed and replaced by PulseAudio. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-12oss: Remove unused error handling of qemu_set_fd_handlerFam Zheng1-6/+8
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-11-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-06-12alsaaudio: Remove unused error handling of qemu_set_fd_handlerFam Zheng1-14/+2
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-10-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-22audio: Don't free hw resources until after hw backend is stoppedPeter Maydell1-1/+1
When stopping an audio voice, call the audio backend's fini method before calling audio_pcm_hw_free_resources_ rather than afterwards. This allows backends which use helper threads (like pulseaudio) to terminate those threads before the conv_buf or mix_buf are freed and avoids race conditions where the helper may access a NULL pointer or freed memory. Cc: qemu-stable@nongnu.org Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1418406239-9838-1-git-send-email-peter.maydell@linaro.org
2014-06-13audio: Drop superfluous conditionals around g_free()Markus Armbruster3-23/+10
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-26audio: replace fprintf(stderr, ...) with error_report() in audioLe Tan2-3/+2
Replace fprintf(stderr,...) with error_report() in files audio/*. The trailing "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan <tamlokveer@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-14savevm: Remove all the unneeded version_minimum_id_old (rest)Juan Quintela1-2/+1
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-08build: convert some obj-specific CFLAGS to use new foo.o-cflags syntaxMichael Tokarev1-1/+1
Current Makefile system allows using foo.o-cflags variables to store object-specific CFLAGS. Convert some usages of old syntax (using QEMU_CFLAGS += construct) to the new syntax. Do not touch multifile modules for now, as build system isn't ready for this. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-02-03Add the ability to vary Spice playback and record rates, to facilitate Opus ↵Jeremy White1-2/+25
support. Signed-off-by: Jeremy White <jwhite@codeweavers.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-09audio: adjust pulse to 100Hz wakeup rateGerd Hoffmann1-4/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-09audio: Lower default wakeup rate to 100 times / secondHans de Goede1-1/+1
This is more then plenty to keep audio card fifos filles / emptied. This drops host cpu-load for audio playback inside a linux vm from 13% to 9%. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-07ossaudio: check for oss support in oss_audio_initGerd Hoffmann1-0/+4
Check whenever the device path (/dev/dsp by default) exists and qemu is allowed to access it. Return NULL if it isn't, so ossaudio will not be used on systems wihtout oss support (increasinly common on modern linux systems). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-07Revert "ossaudio: do not enable by default"Gerd Hoffmann1-1/+1
This reverts commit c905c5012ac0c6fde3b8094d2206a3139deddba2. There is a better fix for the issue at hand. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-11-05ossaudio: do not enable by defaultAnthony Liguori1-1/+1
Modern Linux's no longer support /dev/dsp so enabling it by default causes audio failures on newer Linux distros. Signed-off-by: Anthony Liguori <aliguori@amazon.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1383497154-9271-1-git-send-email-aliguori@amazon.com
2013-10-31Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori1-2/+2
* mjt/trivial-patches: audio/mixeng_template.h: fix inline declaration misc: Spelling and grammar fixes in comments docs/ccid.txt: fix the typo qapi: fix documentation example .gitignore: ignore qmp-commands.txt misc: New spelling fixes in comments configure: create fsdev/ directory Message-id: 1382779887-15971-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-10-26audio/mixeng_template.h: fix inline declarationAlex Bligh1-2/+2
Fix error: ‘inline’ is not at beginning of declaration [-Werror=old-style-declaration] Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-10-23audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* secondHans de Goede1-1/+2
Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to 4000 times / second. This still causes a host cpu load of 50 % for simply playing audio, where as with this patch git master is at 13%, so we should backport this to 1.5 and 1.6 too. Note this will not apply to 1.5 and 1.6 as is. Cc: qemu-stable@nongnu.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-24audio: remove CONFIG_MIXEMU configure optionBandan Das1-6/+0
Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-08-22aio / timers: Switch entire codebase to the new timer APIAlex Bligh4-8/+8
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-21audio: Replace static functions in header file by macros, remove GCC_ATTRStefan Weil1-28/+3
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 the definition can be removed from compiler.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-26Remove OSS support for OpenBSDBrad Smith1-4/+0
Remove the OSS support for OpenBSD. The OSS API has not been usable for quite some time. Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-18remove some double-includesMichael Tokarev1-1/+0
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 <mjt@tls.msk.ru>
2013-01-16audio: Replace non-portable asprintf in debug code by g_strdup_printfStefan Weil1-2/+3
sw->name already uses the correct g_free to free the allocated memory. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini2-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini7-8/+8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19monitor: move include files to include/monitor/Paolo Bonzini2-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: do not include qemu-char everywherePaolo Bonzini2-2/+0
Touching char/char.h basically causes the whole of QEMU to be rebuilt. Avoid this, it is usually unnecessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: do not rely on indirect inclusions of or from qemu-char.hPaolo Bonzini2-0/+2
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 add missing inclusions of qemu-char.h itself. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19build: move rules from Makefile to */Makefile.objsPaolo Bonzini1-0/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-30Revert "audio/wavcapture: Clarify licensing"Anthony Liguori1-1/+0
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 <aliguori@us.ibm.com>
2012-11-30Revert "audio/audio_pt_int: Clarify licensing"Anthony Liguori1-1/+0
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 <aliguori@us.ibm.com>