summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
* audio: Don't free hw resources until after hw backend is stoppedPeter Maydell2014-12-221-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
* audio: Drop superfluous conditionals around g_free()Markus Armbruster2014-06-133-23/+10
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* audio: replace fprintf(stderr, ...) with error_report() in audioLe Tan2014-05-262-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>
* savevm: Remove all the unneeded version_minimum_id_old (rest)Juan Quintela2014-05-141-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>
* build: convert some obj-specific CFLAGS to use new foo.o-cflags syntaxMichael Tokarev2014-05-081-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>
* Add the ability to vary Spice playback and record rates, to facilitate Opus ↵Jeremy White2014-02-031-2/+25
| | | | | | | support. Signed-off-by: Jeremy White <jwhite@codeweavers.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* audio: adjust pulse to 100Hz wakeup rateGerd Hoffmann2013-12-091-4/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* audio: Lower default wakeup rate to 100 times / secondHans de Goede2013-12-091-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>
* ossaudio: check for oss support in oss_audio_initGerd Hoffmann2013-11-071-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>
* Revert "ossaudio: do not enable by default"Gerd Hoffmann2013-11-071-1/+1
| | | | | | | | This reverts commit c905c5012ac0c6fde3b8094d2206a3139deddba2. There is a better fix for the issue at hand. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ossaudio: do not enable by defaultAnthony Liguori2013-11-051-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
* Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori2013-10-311-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>
| * audio/mixeng_template.h: fix inline declarationAlex Bligh2013-10-261-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>
* | audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* secondHans de Goede2013-10-231-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>
* audio: remove CONFIG_MIXEMU configure optionBandan Das2013-09-241-6/+0
| | | | | Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-224-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>
* audio: Replace static functions in header file by macros, remove GCC_ATTRStefan Weil2013-06-211-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>
* Remove OSS support for OpenBSDBrad Smith2013-05-261-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>
* remove some double-includesMichael Tokarev2013-05-181-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>
* audio: Replace non-portable asprintf in debug code by g_strdup_printfStefan Weil2013-01-161-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>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-192-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-197-8/+8
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* monitor: move include files to include/monitor/Paolo Bonzini2012-12-192-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* janitor: do not include qemu-char everywherePaolo Bonzini2012-12-192-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>
* janitor: do not rely on indirect inclusions of or from qemu-char.hPaolo Bonzini2012-12-192-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>
* build: move rules from Makefile to */Makefile.objsPaolo Bonzini2012-12-191-0/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Revert "audio/wavcapture: Clarify licensing"Anthony Liguori2012-11-301-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>
* Revert "audio/audio_pt_int: Clarify licensing"Anthony Liguori2012-11-301-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>
* audio/audio_pt_int: Clarify licensingmalc2012-11-191-0/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio/wavcapture: Clarify licensingmalc2012-11-191-0/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: Fix warning from static code analysisStefan Weil2012-09-231-3/+3
| | | | | | | | | | | | 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 <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
* audio/winwave: previous audio buffer should be flushedmunkyu.im2012-08-281-9/+3
| | | | | | | | | | | 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 user expected sound when user restart audio. So changes it to waveOutReset() Signed-off-by: Munkyu Im <munkyu.im@samsung.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: Unbreak capturing in mixemu casemalc2012-07-161-0/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio/winwave: Fix typomalc2012-06-151-1/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* build: move audio/ objects to nested Makefile.objsPaolo Bonzini2012-06-071-0/+14
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* audio: Always call fini on exitJan Kiszka2012-05-241-4/+8
| | | | | | | | | | | | 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 as it got stuck on some pa-internal synchronization point. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: split IN_T into two separate constantsRoger Pau Monne2012-05-182-13/+27
| | | | | | | | | | | | | | 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. This change has been tested successfully under Debian Linux and NetBSD 6.0BETA. Cc: Vassili Karpov (malc) <av1474@comtv.ru> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Signed-off-by: malc <av1474@comtv.ru>
* fix build with pulseaudio versions older than 0.9.11Gerd Hoffmann2012-05-041-1/+29
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* fix paaudio.c warningsGerd Hoffmann2012-04-251-2/+1
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* Allow controlling volume with PulseAudio backendMarc-André Lureau2012-04-171-5/+94
| | | | | Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* Do not use pa_simple PulseAudio APIMarc-André Lureau2012-04-171-38/+339
| | | | | | | | | | | | 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 <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio/spice: add support for volume controlMarc-André Lureau2012-04-171-0/+41
| | | | | | | Use Spice server volume control API when available. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: don't apply volume effect if backend has VOICE_VOLUME_CAPMarc-André Lureau2012-04-173-2/+14
| | | | | | | | | | 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 control. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: add VOICE_VOLUME ctlMarc-André Lureau2012-04-172-0/+13
| | | | | | | | | | | | 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. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* audio: Add some fall through commentsStefan Weil2012-02-252-1/+4
| | | | | | | | Static code analysers expect these comments for case statements without a break statement. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
* Fix spelling in comments, documentation and messagesStefan Weil2011-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | accidently->accidentally annother->another choosen->chosen consideres->considers decriptor->descriptor developement->development paramter->parameter preceed->precede preceeding->preceding priviledge->privilege propogation->propagation substraction->subtraction throught->through upto->up to usefull->useful Fix also grammar in posix-aio-compat.c Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* fmodaudio: Remove unused variable 'bits16' (reported by cppcheck)Stefan Weil2011-11-181-4/+2
| | | | | | | | The variable is assigned a value which is never used, so remove variable and assignment. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2011-09-201-1/+1
|\
| * Replace the VMSTOP macros with a proper state typeLuiz Capitulino2011-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. One example to demonstrate this problem is that vm_start() calls vm_state_notify() with reason=0, which turns out to be VMSTOP_USER. This commit fixes that by replacing the VMSTOP macros with a proper state type called RunState. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | wavaudio: Use stdio instead of QEMUFileJuan Quintela2011-09-201-10/+36
| | | | | | | | | | | | | | | | | | | | 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 <quintela@redhat.com> CC: malc <av1474@comtv.ru> Signed-off-by: malc <av1474@comtv.ru>
OpenPOWER on IntegriCloud