summaryrefslogtreecommitdiff
path: root/audio
AgeCommit message (Collapse)AuthorFilesLines
2010-08-04spice: add audioGerd Hoffmann3-0/+316
Add support for the spice audio interface. The driver is first in the driver list, but can_be_default is set only in case spice is active. So if you are using spice the spice audio driver is the default one, otherwise whatever comes first after spice in the list. Overriding the default using QEMU_AUDIO_DRV works in any case.
2010-07-06savevm: Add DeviceState paramAlex Williamson1-1/+1
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 <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-22audio/sdlaudio: remove unused variableSerge Ziryukin1-9/+2
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 <ftrvxmtrx@gmail.com> Signed-off-by: malc <av1474@comtv.ru>
2010-04-21audio/alsa: Avoid snd_pcm_format_t vs audfmt_e mixupmalc1-5/+6
Spotted by Serge Ziryukin and based on his patch, thanks. Signed-off-by: malc <av1474@comtv.ru>
2010-03-16monitor: Separate "default monitor" and "current monitor" cleanlyMarkus Armbruster1-2/+2
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 which we're reading instead (the "current monitor"). Monitor command handlers run within monitor_read() or monitor_control_read(). Default monitor and current monitor are really separate things, and squashing them together is confusing and error-prone. For instance, usb_host_scan() can run both in "info usbhost" and periodically via usb_host_auto_check(). It prints to cur_mon, which is what we want in the former case: the monitor executing "info usbhost". But since that's the default monitor in the latter case, it periodically spams the default monitor there. A few places use cur_mon to log stuff to the default monitor. If we ever log something while cur_mon points to current monitor instead of default monitor, the log temporarily "jumps" to another monitor. Whether that can or cannot happen isn't always obvious. Maybe logging to the default monitor (which may not even exist) is a bad idea, and we should log to stderr or a logfile instead. But that's outside the scope of this commit. Change cur_mon to point to the current monitor. Create new default_mon to point to the default monitor. Update users of cur_mon accordingly. This fixes the periodical spamming of the default monitor by usb_host_scan(). It also stops "log jumping", should that problem exist.
2010-03-11audio: fix commentmalc1-1/+1
Signed-off-by: malc <av1474@comtv.ru>
2010-02-28audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handlermalc1-0/+4
Signed-off-by: malc <av1474@comtv.ru>
2010-02-28audio/alsa: Spelling typo (paramters)Vagrant Cascadian1-1/+1
Trivial patch to fix the spelling of "parameters". Signed-off-by: malc <av1474@comtv.ru>
2010-01-17audio: include more information into audio_bug's outputmalc1-0/+9
Signed-off-by: malc <av1474@comtv.ru>
2010-01-17Revert "sdlaudio: make it suck less"malc1-30/+50
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: Claes Gyllenswrd vekin Chris But above all thanks to Toralf Foerster who actually provied enough information to pinpoint the breakage to sdlaudio. http://bugs.gentoo.org/show_bug.cgi?id=294269
2010-01-13Workaround for broken OSS_GETVERSION on FreeBSD, part twoJuergen Lock1-4/+26
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 returns the errno it does currently on FreeBSD. (Rev 2 after private discussion with malc.) Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: malc <av1474@comtv.ru>
2010-01-09oss: fix fragment settingmalc1-13/+16
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 <av1474@comtv.ru>
2010-01-09oss: issue OSS_GETVERSION ioctl only when neededmalc1-17/+17
Signed-off-by: malc <av1474@comtv.ru>
2010-01-09oss: refactor code around policy settingmalc1-12/+8
This fixes a problem with a previous patch spotted by Juergen Lock, thanks to him again. Signed-off-by: malc <av1474@comtv.ru>
2010-01-08oss: workaround for cases when OSS_GETVERSION is not definedmalc1-1/+12
Thanks to Juergen Lock. Signed-off-by: malc <av1474@comtv.ru>
2009-12-03audio: port to vmstateJuan Quintela1-17/+9
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03audio: fix compilation of DEBUG_PLIVEJuan Quintela1-3/+3
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-18audio: Remove conditional around sw which can not be NULLmalc1-17/+15
Noticed by Steve Grubb. Signed-off-by: malc <av1474@comtv.ru>
2009-10-15winwave: ADC supportmalc1-24/+336
Signed-off-by: malc <av1474@comtv.ru>
2009-10-15audio: remove last remnants of _tmalc3-5/+5
Signed-off-by: malc <av1474@comtv.ru>
2009-10-15winwave: make error logging more consistentmalc1-6/+7
Signed-off-by: malc <av1474@comtv.ru>
2009-10-15winwave: follow the rules when closing the output devicemalc1-0/+19
a. call waveOutReset to drain the queue b. unprepare headers before freeing underlying memory Signed-off-by: malc <av1474@comtv.ru>
2009-10-13qemu: allow pulseaudio to be the defaultMichael S. Tsirkin1-1/+1
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 The pulseaudio backend seems to work well, so we should allow it to be selected as the default. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2009-10-11winwave: pause/restore playing upon seeing VOICE_DISABLE/ENABLEmalc1-0/+18
Signed-off-by: malc <av1474@comtv.ru>
2009-10-11winwave: close event handle and delete wait object after closing HWAVEOUTmalc1-2/+2
To avoid possibly being called back and thus racing. Signed-off-by: malc <av1474@comtv.ru>
2009-10-11winwave: remove wait object when finalizing DAC voicemalc1-13/+14
Signed-off-by: malc <av1474@comtv.ru>
2009-10-10winwave: poll modemalc1-0/+61
Signed-off-by: malc <av1474@comtv.ru>
2009-10-10Windows Waveform Audio driver (no ADC support yet)malc5-95/+433
Signed-off-by: malc <av1474@comtv.ru>
2009-10-03oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)malc2-21/+27
Signed-off-by: malc <av1474@comtv.ru>
2009-10-02alsa: Change default buffer/period sizemalc1-1/+2
Increase buffer size but do not rely on ALSA picking up default period size. Signed-off-by: malc <av1474@comtv.ru>
2009-10-02oss/alsa: Do not invoke UB described in 7.15.1.1malc2-33/+39
Additional argument (whether to try poll mode) is only passed with VOICE_ENABLE command. Thanks to Markus Armbruster for noticing the potential breakage.
2009-09-30sdlaudio: make it suck lessmalc1-50/+30
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18audio: use correct email addressmalc2-2/+2
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18audio: internal API changemalc12-81/+33
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. Signed-off-by: malc <av1474@comtv.ru>
2009-09-18sdlaudio: use correct function names in sdl_XXX callsmalc1-3/+3
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18oss: use audio_pcm_hw_clip_outmalc1-47/+46
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18alsa: use audio_pcm_hw_clip_outmalc1-45/+43
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18audio: introduce audio_pcm_hw_clip_out helper functionmalc2-0/+25
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18audio: use muldiv64 where it makes sensemalc4-5/+8
Signed-off-by: malc <av1474@comtv.ru>
2009-09-18coreaudio: fix sloppy "posixification" by ↵malc1-1/+1
1ea879e5580f63414693655fcf0328559cdce138 Signed-off-by: malc <av1474@comtv.ru>
2009-09-14alsa: Use proper value when testing returned events in alsa_poll_handlermalc1-4/+6
Signed-off-by: malc <av1474@comtv.ru>
2009-09-14alsa/oss: Remove fd transfer handlers before closing oss/alsa fd/handlemalc2-27/+32
Signed-off-by: malc <av1474@comtv.ru>
2009-09-13audio: Fix typo that broke QEMU_AUDIO_ADC_TRY_POLLJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru>
2009-09-13oss: Simplify mmap codemalc1-22/+5
Signed-off-by: malc <av1474@comtv.ru>
2009-09-13oss: OSS v4 supportmalc1-9/+50
a. Use SNDCTL_DSP_POLICY instead of SNDCTL_DSP_SETFRAGMENT b. Add ability to open device in exclusive mode, thus bypassing vmix Signed-off-by: malc <av1474@comtv.ru>
2009-09-12Fix sys-queue.h conflict for goodBlue Swirl4-43/+43
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12audio: remove lsbindex/popcount in favour of host-utils's ctz32malc3-21/+2
Signed-off-by: malc <av1474@comtv.ru>
2009-09-12alsa: poll mode handlingmalc1-21/+204
Signed-off-by: malc <av1474@comtv.ru>
2009-09-12oss: poll mode handlingmalc1-5/+74
Signed-off-by: malc <av1474@comtv.ru>