aboutsummaryrefslogtreecommitdiff
path: root/audio
AgeCommit message (Collapse)AuthorFilesLines
2019-04-02audio: fix audio timer rate conversion bugVolker Rümelin2-1/+7
Currently the default audio timer frequency is 10000Hz instead of a period of 10000us. Also the audiodev timer-period property gets converted like a frequency. Only handling of the legacy QEMU_AUDIO_TIMER_PERIOD environment variable is correct because it's actually a frequency. With this patch the property timer-period is really a timer period and QEMU_AUDIO_TIMER_PERIOD remains a frequency. Fixes: 71830221fb "-audiodev command line option basic implementation." Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Zoltán Kővágó <DirtY.iCE.hu@gmail.com> Message-id: 90b95e4f-39ef-2b01-da6a-857ebaee1ec5@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-22trace-events: Shorten file names in commentsMarkus Armbruster1-3/+3
We spell out sub/dir/ in sub/dir/trace-events' comments pointing to source files. That's because when trace-events got split up, the comments were moved verbatim. Delete the sub/dir/ part from these comments. Gets rid of several misspellings. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190314180929.27722-3-armbru@redhat.com Message-Id: <20190314180929.27722-3-armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-03-18audio/paaudio: fix microphone input being unusableMartin Schrodt1-1/+7
The current code does not specify the metrics of the buffers for the input device. This makes PulseAudio choose very bad defaults, which causes input to be unusable: Audio put in gets out 30 seconds later. This patch fixes that and makes the latency configurable as well. Signed-off-by: Martin Schrodt <martin@schrodt.org> Message-id: 20190315084653.120020-4-martin@schrodt.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18audio/paaudio: prolong and make latency configurableMartin Schrodt1-6/+6
The latency of a connection to the PulseAudio server is determined by the tlength parameter. This was hardcoded to 10ms, which is a bit too tight on my machine, causing audio on host and guest to malfunction. A setting of 15ms works fine here. To allow tweaking, I also made the setting configurable via the new -audiodev config. This allows to squeeze out better timings in scenarios where the emulation allows it. I also removed setting of the minreq parameter to (seemingly arbitrary) half the latency, since it showed worse audio quality during my tests. Allowing PulseAudio to request smaller chunks helped. Signed-off-by: Martin Schrodt <martin@schrodt.org> Message-id: 20190315084653.120020-3-martin@schrodt.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18audio/paaudio: fix ignored buffer_length settingMartin Schrodt1-3/+21
Audiodev configuration allows to set the length of the buffered data. The setting was ignored and a constant value used instead. This patch makes the code apply the setting properly, and uses the previous default if nothing is supplied. Signed-off-by: Martin Schrodt <martin@schrodt.org> Message-id: 20190315084653.120020-2-martin@schrodt.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11audio: -audiodev command line option: cleanupKővágó, Zoltán2-199/+4
Remove no longer needed code. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 82c176a5222a56e4fde45d2b423ada797caddd5d.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11wavaudio: port to -audiodev configKővágó, Zoltán2-49/+25
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 28c2bf374c447c20937a192695c7b9f5367dea7e.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11spiceaudio: port to -audiodev configKővágó, Zoltán1-5/+0
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 040d1241f29104ecfeecb26b0a14f0d042484fc5.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11sdlaudio: port to -audiodev configKővágó, Zoltán2-18/+16
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 1dc596cba39378df862582a0b952e497a16c6c31.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11paaudio: port to -audiodev configKővágó, Zoltán2-52/+67
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: c74dc9c282075fba6928c40b2deae057fa0d4049.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11ossaudio: port to -audiodev configKővágó, Zoltán2-110/+83
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 31c899f2f78e40fbc01f563ee4829c98debb68db.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11noaudio: port to -audiodev configKővágó, Zoltán1-1/+0
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 0c35b1956ed1105244309a774c038816c040108c.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11dsoundaudio: port to -audiodev configKővágó, Zoltán3-45/+63
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: f25562cb88246b41c3e6380685a108fd341d5b50.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11coreaudio: port to -audiodev configKővágó, Zoltán2-38/+39
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: ba58f7e2501b1454b5e0f91c03aad416a404fc6a.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11alsaaudio: port to -audiodev configKővágó, Zoltán2-234/+183
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: 663d2c918a11ef44d4042e56c796d6dbf40be70c.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11audio: -audiodev command line option basic implementationKővágó, Zoltán15-379/+644
Audio drivers now get an Audiodev * as config paramters, instead of the global audio_option structs. There is some code in audio/audio_legacy.c that converts the old environment variables to audiodev options (this way backends do not have to worry about legacy options). It also contains a replacement of -audio-help, which prints out the equivalent -audiodev based config of the currently specified environment variables. Note that backends are not updated and still rely on environment variables. Also note that (due to moving try-poll from global to backend specific option) currently ALSA and OSS will always try poll mode, regardless of environment variables or -audiodev options. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: e99a7cbdac0d13512743880660b2032024703e4c.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11audio: use qapi AudioFormat instead of audfmt_eKővágó, Zoltán10-140/+147
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_FORMAT_MAX caused problems. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 01251b2758a1679c66842120b77c0fb46d7d0eaf.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-28audio/sdlaudio: Simplify the sdl_callback functionThomas Huth1-26/+19
At the end of the while-loop, either "samples" or "sdl->live" is zero, so now that we've removed the semaphore code, the content of the while-loop is always only executed once. Thus we can remove the while-loop now to get rid of one indentation level here. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1549336101-17623-3-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-28audio/sdlaudio: Remove the semaphore codeThomas Huth1-140/+5
The semaphore code was only working with SDL1.2 - with SDL2, it causes a deadlock. Since we've removed support for SDL1.2 recently, we can now completely remove the semaphore code from sdlaudio.c. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 1549336101-17623-2-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-28audio: Do not check for audio_calloc failureFrediano Ziglio1-42/+6
audio_calloc uses g_malloc0 which never returns in case of memory failure. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Message-id: 20190225154335.11397-2-fziglio@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-28audio: Use g_strdup_printf instead of manual building a stringFrediano Ziglio1-20/+5
Instead of using lot of low level function and manually allocate the temporary string in audio_process_options use more high level GLib function. The function is not used in hot path but to read some initial setting. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Message-id: 20190225154335.11397-1-fziglio@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-14wavcapture: Convert to error_reportDr. David Alan Gilbert1-22/+17
Kill off a pile of monitor_printf's and cur_mon usage. The only one left in wavcapture.c is the info case. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20170320173840.3626-3-dgilbert@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-01-24audio: error message tweakGerd Hoffmann1-5/+7
Only print a message about the failed driver initialization in case it was the driver explicitly requested by the user via QEMU_AUDIO_DRV=$drv. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190124112055.547-6-kraxel@redhat.com
2019-01-24audio: check for pulseaudio daemon pidfileGerd Hoffmann1-0/+15
Check whenever the pulseaudio daemon pidfile is present before trying to initialize the pulseaudio backend. Just return NULL if that is not the case, so qemu will check the next backend in line. In case the user explicitly configured a non-default pulseaudio server skip the check. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20190124112055.547-5-kraxel@redhat.com
2019-01-22audio: Remove AudioState from "qemu/typedefs.h"Philippe Mathieu-Daudé1-2/+2
Files requiring AudioState already include "audio_int.h". To clean "qemu/typedefs.h", move the declaration to "audio_int.h" (removing the forward declaration). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-12-12audio/alsaaudio: Remove compiler check around pragmaThomas Huth1-2/+0
Both GCC v4.8 and Clang v3.4 support the -Waddress option, so we do not need the compiler version check here anymore. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-11-12pulseaudio: process audio data in smaller chunksGerd Hoffmann1-2/+2
The rate of pulseaudio absorbing the audio stream is used to control the the rate of the guests audio stream. When the emulated hardware uses small chunks (like intel-hda does) we need small chunks on the audio backend side too, otherwise that feedback loop doesn't work very well. Cc: Max Ehrlich <maxehr@umiacs.umd.edu> Cc: Martin Schrodt <martin@schrodt.org> Buglink: https://bugs.launchpad.net/bugs/1795527 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20181109142032.1628-1-kraxel@redhat.com
2018-07-03audio: add audio timer trace pointsGerd Hoffmann2-3/+30
Track audio timer starts and stops. Also trace delayed audio timer calls. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180702161524.17268-1-kraxel@redhat.com
2018-06-25audio: Convert use of atoi to qemu_strtoiNia Alarie1-2/+1
If qemu_strtoi indicates an error, return the default value. Signed-off-by: Nia Alarie <nia.alarie@gmail.com> Message-Id: <20180316144047.30904-1-nia.alarie@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12audio/sdl: build as moduleGerd Hoffmann1-3/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-8-kraxel@redhat.com
2018-03-12audio/pulseaudio: build as moduleGerd Hoffmann1-2/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-7-kraxel@redhat.com
2018-03-12audio/oss: build as moduleGerd Hoffmann1-2/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-6-kraxel@redhat.com
2018-03-12audio/alsa: build as moduleGerd Hoffmann1-2/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306074053.22856-5-kraxel@redhat.com
2018-03-12audio: add module loading supportGerd Hoffmann1-0/+20
Make audio_driver_lookup() try load the module in case it doesn't find the driver in the registry. Also load all modules for -audio-help, so the help output includes the help text for modular audio drivers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180306074053.22856-3-kraxel@redhat.com
2018-03-12audio: add driver registryGerd Hoffmann11-44/+105
Add registry for audio drivers, using the existing audio_driver struct. Make all drivers register themself. The old list of audio_driver struct pointers is now a list of audio driver names, specifying the priority (aka probe order) in case no driver is explicitly asked for. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180306074053.22856-2-kraxel@redhat.com
2018-03-05audio: rename CONFIG_* to CONFIG_AUDIO_*Gerd Hoffmann2-7/+7
This avoids a name clash for CONFIG_SDL, which is used by both sdl video support and sdl audio support. It also more clear that this is a audio driver configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-13-kraxel@redhat.com
2018-02-09Include qapi/error.h exactly where neededMarkus Armbruster1-0/+1
This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed]
2018-02-06audio: Replace AUDIO_FUNC with __func__Alistair Francis11-93/+85
Apparently we don't use __MSC_VER as a compiler anymore and we always require a C99 compiler (which means we always have __func__) so we don't need a special AUDIO_FUNC macro. We can just replace AUDIO_FUNC with __func__ instead. Checkpatch failures were manually fixed. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180203084315.20497-2-armbru@redhat.com>
2018-01-16maint: Fix macros with broken 'do/while(0); ' usageEric Blake1-2/+2
The point of writing a macro embedded in a 'do { ... } while (0)' loop (particularly if the macro has multiple statements or would otherwise end with an 'if' statement) is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our coding style frowns on brace-less 'if': if (cond) statement; else something else; that is the classic case where failure to use do/while(0) wrapping would cause the 'else' to pair with any embedded 'if' in the macro rather than the intended outer 'if'. But conversely, if the macro includes an embedded ';', then the same brace-less coding style would now have two statements, making the 'else' a syntax error rather than pairing with the outer 'if'. Thus, even though our coding style with required braces is not impacted, ending a macro with ';' makes our code harder to port to projects that use brace-less styles. The change should have no semantic impact. I was not able to fully compile-test all of the changes (as some of them are examples of the ugly bit-rotting debug print statements that are completely elided by default, and I didn't want to recompile with the necessary -D witnesses - cleaning those up is left as a bite-sized task for another day); I did, however, audit that for all files touched, all callers of the changed macros DID supply a trailing ';' at the callsite, and did not appear to be used as part of a brace-less conditional. Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\ Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20171201232433.25193-7-eblake@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-09-22buildsys: Move audio libs to per objectFam Zheng1-0/+5
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170907082918.7299-5-famz@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22buildsys: Move sdl cflags/libs to per objectFam Zheng1-0/+1
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170907082918.7299-3-famz@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-01trace-events: fix code style: %# -> 0x%Vladimir Sementsov-Ogievskiy1-2/+2
In trace format '#' flag of printf is forbidden. Fix it to '0x%'. This patch is created by the following: check that we have a problem > find . -name trace-events | xargs grep '%#' | wc -l 56 check that there are no cases with additional printf flags before '#' > find . -name trace-events | xargs grep "%[-+ 0'I]+#" | wc -l 0 check that there are no wrong usage of '#' and '0x' together > find . -name trace-events | xargs grep '0x%#' | wc -l 0 fix the problem > find . -name trace-events | xargs sed -i 's/%#/0x%/g' [Eric Blake noted that xargs grep '%[-+ 0'I]+#' should be xargs grep "%[-+ 0'I]+#" instead so the shell quoting is correct. --Stefan] Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170731160135.12101-3-vsementsov@virtuozzo.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-07-31docs: fix broken paths to docs/devel/tracing.txtPhilippe Mathieu-Daudé1-1/+1
With the move of some docs/ to docs/devel/ on ac06724a71, no references were updated. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-07-17audio: st_rate_flow exist a infinite loopPeng Hao1-0/+6
If a voice recording equipment is opened for a long time(several days) in windows guest, rate->ipos will overflow and rate->opos will never have a chance to change. It will result to a infinite loop. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn> Message-id: 1500128061-20849-1-git-send-email-peng.hao2@zte.com.cn Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04audio: fix WAVState leakMarc-André Lureau1-0/+1
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20170503223846.6559-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04audio: release capture buffersGerd Hoffmann1-0/+2
AUD_add_capture() allocates two buffers which are never released. Add the missing calls to AUD_del_capture(). Impact: Allows vnc clients to exhaust host memory by repeatedly starting and stopping audio capture. Fixes: CVE-2017-8309 Cc: P J P <ppandit@redhat.com> Cc: Huawei PSIRT <PSIRT@huawei.com> Reported-by: "Jiangxin (hunter, SCC)" <jiangxin1@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20170428075612.9997-1-kraxel@redhat.com
2017-03-01audio/sdlaudio: Allow audio playback with SDL2Thomas Huth1-0/+48
When compiling with SDL2, the semaphore trick used in sdlaudio.c does not work - QEMU locks up completely in this case. To avoid the hang and get at least some audio playback up and running (it's a little bit crackling, but better than nothing), we can use the SDL locking functions SDL_LockAudio() and SDL_UnlockAudio() to sync with the sound playback thread instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1485852398-2327-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-03-01audio: make audio poll timer deterministicPavel Dovgalyuk1-1/+1
This patch changes resetting strategy of the audio polling timer. It does not change expiration time if the timer is already set. This patch is needed to make this timer deterministic and to use execution record/replay for audio devices. audio_reset_timer is used in the function audio_vm_change_state_handler. Therefore every time VM is stopped or restarted the timer will be reset to new timeout. Virtual clock does not proceed while VM is stopped. Therefore there is no need in resetting the timeout when VM restarts. v2: updated commit message v3: now using timer_mod_anticipate function (as suggested by Yurii Zubrytskyi) Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-id: 20170214071510.6112.76764.stgit@PASHA-ISP Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-03-01replay: add record/replay for audio passthroughPavel Dovgalyuk3-2/+44
This patch adds recording and replaying audio data. Is saves synchronization information for audio out and inputs from the microphone. v2: removed unneeded whitespace change Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-id: 20170202055054.4848.94901.stgit@PASHA-ISP.lan02.inno [ kraxel: add qemu/error-report.h include to fix osx build failure ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-08-12trace-events: fix first line comment in trace-eventsLaurent Vivier1-1/+1
Documentation is docs/tracing.txt instead of docs/trace-events.txt. find . -name trace-events -exec \ sed -i "s?See docs/trace-events.txt for syntax documentation.?See docs/tracing.txt for syntax documentation.?" \ {} \; Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-id: 1470669081-17860-1-git-send-email-lvivier@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>