audio: fix compilation of DEBUG_PLIVE
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
audio: port to vmstate
audio: Remove conditional around sw which can not be NULL
Noticed by Steve Grubb.
Signed-off-by: malc <av1474@comtv.ru>
winwave: ADC support
audio: remove last remnants of _t
winwave: make error logging more consistent
winwave: follow the rules when closing the output device
a. call waveOutReset to drain the queueb. unprepare headers before freeing underlying memory
qemu: allow pulseaudio to be the default
We're seeing various issues with the SDL audio backend and want toswitch to the pulseaudio backend. See e.g.
https://bugzilla.redhat.com/495964 https://bugzilla.redhat.com/519540 https://bugzilla.redhat.com/496627...
winwave: pause/restore playing upon seeing VOICE_DISABLE/ENABLE
winwave: close event handle and delete wait object after closing HWAVEOUT
To avoid possibly being called back and thus racing.
winwave: remove wait object when finalizing DAC voice
winwave: poll mode
Windows Waveform Audio driver (no ADC support yet)
oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)
alsa: Change default buffer/period size
Increase buffer size but do not rely on ALSA picking up default periodsize.
oss/alsa: Do not invoke UB described in 7.15.1.1
Additional argument (whether to try poll mode) is only passed withVOICE_ENABLE command.
Thanks to Markus Armbruster for noticing the potential breakage.
sdlaudio: make it suck less
coreaudio: fix sloppy "posixification" by 1ea879e5580f63414693655fcf0328559cdce138
audio: use muldiv64 where it makes sense
audio: introduce audio_pcm_hw_clip_out helper function
alsa: use audio_pcm_hw_clip_out
oss: use audio_pcm_hw_clip_out
sdlaudio: use correct function names in sdl_XXX calls
audio: internal API change
pcm_ops.run_out now takes number of live samples (which will be alwaysgreater than zero) as a second argument, every driver was callingaudio_pcm_hw_get_live_out anyway with exception of fmod which usedaudio_pcm_hw_get_live_out2 for no good reason....
audio: use correct email address
alsa/oss: Remove fd transfer handlers before closing oss/alsa fd/handle
alsa: Use proper value when testing returned events in alsa_poll_handler
audio: Fix typo that broke QEMU_AUDIO_ADC_TRY_POLL
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: malc <av1474@comtv.ru>
oss: OSS v4 support
a. Use SNDCTL_DSP_POLICY instead of SNDCTL_DSP_SETFRAGMENTb. Add ability to open device in exclusive mode, thus bypassing vmix
oss: Simplify mmap code
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
oss: Unbreak mmaping the ability to mmap oss fd on Linux
audio: poll mode infrastructure
oss: poll mode handling
alsa: poll mode handling
audio: remove lsbindex/popcount in favour of host-utils's ctz32
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Remove bit-rotten threshold handling
Thanks to Toshiya Takeda for bringing up an unrelated issue which ledto this.
Fix warning on x86_64
audio/esdaudio.c: In function 'qesd_thread_out':audio/esdaudio.c:136: error: format '%d' expects type 'int', butargument 3 has type 'ssize_t'audio/esdaudio.c: In function 'qesd_thread_in':audio/esdaudio.c:366: error: format '%d' expects type 'int', but...
Fix dsound typos
Dsound currently does not compile due to the typos in the code. Thispatch makes it compile again.{PATCH}
Signed-off-by: Alex Ivanov <void@aleksoft.net>Signed-off-by: malc <av1474@comtv.ru>
Fix typo
use C99 initializers for audio_pcm_ops
Signed-off-by: Juan Quintela <quintela@redhat.com>
use C99 initializers for all audio/*
Aesthetics
Reformat to make item borders more visibleFix cases of stray tabs and vertical misalignments
Use proper struct initializers and remove INIT_FIELD() macro
Use C99 initializers for audio_option
Fix Sparse warnings: "Using plain integer as NULL pointer"
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
alsa: add host suspend/resume support
Both input and output streams may be in SND_PCM_STATE_SUSPENDEDafter the host is suspended and resumed, meaning "Hardware issuspended". snd_pcm_readi() and snd_pcm_writei() will return-ESTRPIPE if called while the stream is in this state....
Generate config-host.h from config-host.mak
Generate CONFIG_AUDIO_DRIVERS. Order is important here, because thefirst driver in the list is the one used by default.
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Fix period initialization
use struct initializer for audio.c
Ignore -Waddress for alsaaudio.c
/usr/include/alsa/pcm.h contains:
#define snd_pcm_sw_params_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(snd_pcm_sw_params_sizeof()); memset(*ptr, 0, snd_pcm_sw_params_sizeof()); } while (0)
The assert generates: "error: the address of 'sw_params' will always...
fix qemu_alloc/qemu_free for audio subsystem
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
alsa: fix warning
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Remove any pretense that there can be more than one AudioState
Make AUD_init failure fatal
Failure to initialize the audio subsystem is not handled consistently.Where it is handled it has guest visible effects, which is wrong.We already have a "nosound" audio driver as a last resort, so trying toproceed without an audio backend seems pointless....
Remove redundant #define
Suppress a warningaudio/dsoundaudio.c:35:1: warning: "WIN32_LEAN_AND_MEAN" redefined<command line>:4:1: warning: this is the location of the previous definition
Signed-off-by: Alex Ivanov <void@aleksoft.net>
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
Avoid running audio ctl's when vm is not running
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6627 c046a42c-6fe2-441c-8c8c-71466251a162
audio: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6528 c046a42c-6fe2-441c-8c8c-71466251a162
Fix NAME2/FIELD2 warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6411 c046a42c-6fe2-441c-8c8c-71466251a162
Rework vm_state_change notifiers (Jan Kiszka)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6402 c046a42c-6fe2-441c-8c8c-71466251a162
Use the ARRAY_SIZE() macro where appropriate.
Change from v1: Avoid changing the existing coding style in certain files.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
Make audio violate POSIX less
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
Attached patch fixes a series of this warningwhen compiling on NetBSD:
warning: array subscript has type 'char'
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162
Rename hz to hertz to keep AIX happy
The issue was first noticed/addressed by Laurent Vivier in his QEMU onAIX patches.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5712 c046a42c-6fe2-441c-8c8c-71466251a162
Set default audio timer period to a sane value (otherwise qemu becomes unusable if -icount N is specified)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5623 c046a42c-6fe2-441c-8c8c-71466251a162
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
Fix undefined pthread_sigmask warning on FreeBSD (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5537 c046a42c-6fe2-441c-8c8c-71466251a162
Fix undefined pthread_sigmask warning on OpenBSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5530 c046a42c-6fe2-441c-8c8c-71466251a162
Prepare for changing audio_pcm_ops dynamically (partially revert r5422)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5435 c046a42c-6fe2-441c-8c8c-71466251a162
Move wav_start_capture prototype to avoid a warning with -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5423 c046a42c-6fe2-441c-8c8c-71466251a162
Make audio_pcm_opsstatic const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5422 c046a42c-6fe2-441c-8c8c-71466251a162
Fix more r5087 breakage
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5337 c046a42c-6fe2-441c-8c8c-71466251a162
Revert a part of r5087 that didn't need fixing (thanks to malc for spotting)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5090 c046a42c-6fe2-441c-8c8c-71466251a162
Fix more bugs in r5044
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5087 c046a42c-6fe2-441c-8c8c-71466251a162
Fix OpenBSD linker warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
Move audio/sys-queue.h => sys-queue.h
This makes it easier to reuse in other parts of QEMU.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4975 c046a42c-6fe2-441c-8c8c-71466251a162
Update sys-queue.h (Gerd Hoffmann)
- got recent copy from netbsd. - deleted debug code. - deleted some list implementations, left in only the ones which qemu already has.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Restore old value of buffer_size
This brings latency down to acceptable levels when using dmix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4865 c046a42c-6fe2-441c-8c8c-71466251a162
Warn about rejected buffer/period size/time when it was specified by the user
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4864 c046a42c-6fe2-441c-8c8c-71466251a162
Call proper function when trying to set period size
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4863 c046a42c-6fe2-441c-8c8c-71466251a162
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4835 c046a42c-6fe2-441c-8c8c-71466251a162
Pulseaudio driver
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4827 c046a42c-6fe2-441c-8c8c-71466251a162
Add NULL argument to SNDCTL_DSP_NONBLOCK ioctl call
Comes from here:http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/emulators/qemu/patches/patch-am?rev=1.2&content-type=text/x-cvsweb-markup
http://manuals.opensound.com/developer/SNDCTL_DSP_NONBLOCK.htmlNo explanation for NULL given....
Change the way audio is configured
Instead of having separate option for each card and driver use--audio-drv-list and --audio-card-list options.
Under Linux it allows to set the default(first probed) driverto something other than OSS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4792 c046a42c-6fe2-441c-8c8c-71466251a162
Make mixer emulation a configure option (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4783 c046a42c-6fe2-441c-8c8c-71466251a162
Add missing [SU]32
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4777 c046a42c-6fe2-441c-8c8c-71466251a162
Emit warning message if user supplied buffer/period size/time was rejected
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4773 c046a42c-6fe2-441c-8c8c-71466251a162
Rework period/buffer size setting
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4768 c046a42c-6fe2-441c-8c8c-71466251a162
Check the returned audio_buf_info fields
At least on one system zero is returned in either fragsize orfragstotal (reported by Dave Scott), this results in an audio_callocfailing the audio_bug check and another ominous error message. Failearly and blame the system....
First cut at WM8750 volume control (Jan Kiszka).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4321 c046a42c-6fe2-441c-8c8c-71466251a162
Audio endianness and mutex usage fixes (malc.git).
From http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/audio :
Implicitly lock the mutex at startup of playback/capture threads, otherwisepthread_mutex_destroy (in audio_pt_fini) fails with EBUSY....
Typo fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4163 c046a42c-6fe2-441c-8c8c-71466251a162
Remove remaining .cvsignore files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4159 c046a42c-6fe2-441c-8c8c-71466251a162
Miscellaneous fixes after recent audio additions (malc).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3925 c046a42c-6fe2-441c-8c8c-71466251a162
Make dsound compile again (patch by malc, spotted by C.W. Betts).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3920 c046a42c-6fe2-441c-8c8c-71466251a162
pthreads-based audio and miscellaneous audio clean-up (malc).ESD support (malc, Frederick Reeve).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3917 c046a42c-6fe2-441c-8c8c-71466251a162