summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
* monitor: Separate "default monitor" and "current monitor" cleanlyMarkus Armbruster2010-03-161-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.
* audio: fix commentmalc2010-03-111-1/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handlermalc2010-02-281-0/+4
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio/alsa: Spelling typo (paramters)Vagrant Cascadian2010-02-281-1/+1
| | | | | | Trivial patch to fix the spelling of "parameters". Signed-off-by: malc <av1474@comtv.ru>
* audio: include more information into audio_bug's outputmalc2010-01-171-0/+9
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Revert "sdlaudio: make it suck less"malc2010-01-171-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
* Workaround for broken OSS_GETVERSION on FreeBSD, part twoJuergen Lock2010-01-131-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>
* oss: fix fragment settingmalc2010-01-091-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>
* oss: issue OSS_GETVERSION ioctl only when neededmalc2010-01-091-17/+17
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss: refactor code around policy settingmalc2010-01-091-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>
* oss: workaround for cases when OSS_GETVERSION is not definedmalc2010-01-081-1/+12
| | | | | | Thanks to Juergen Lock. Signed-off-by: malc <av1474@comtv.ru>
* audio: port to vmstateJuan Quintela2009-12-031-17/+9
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* audio: fix compilation of DEBUG_PLIVEJuan Quintela2009-12-031-3/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* audio: Remove conditional around sw which can not be NULLmalc2009-11-181-17/+15
| | | | | | Noticed by Steve Grubb. Signed-off-by: malc <av1474@comtv.ru>
* winwave: ADC supportmalc2009-10-151-24/+336
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: remove last remnants of _tmalc2009-10-153-5/+5
| | | | Signed-off-by: malc <av1474@comtv.ru>
* winwave: make error logging more consistentmalc2009-10-151-6/+7
| | | | Signed-off-by: malc <av1474@comtv.ru>
* winwave: follow the rules when closing the output devicemalc2009-10-151-0/+19
| | | | | | | a. call waveOutReset to drain the queue b. unprepare headers before freeing underlying memory Signed-off-by: malc <av1474@comtv.ru>
* qemu: allow pulseaudio to be the defaultMichael S. Tsirkin2009-10-131-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>
* winwave: pause/restore playing upon seeing VOICE_DISABLE/ENABLEmalc2009-10-111-0/+18
| | | | Signed-off-by: malc <av1474@comtv.ru>
* winwave: close event handle and delete wait object after closing HWAVEOUTmalc2009-10-111-2/+2
| | | | | | To avoid possibly being called back and thus racing. Signed-off-by: malc <av1474@comtv.ru>
* winwave: remove wait object when finalizing DAC voicemalc2009-10-111-13/+14
| | | | Signed-off-by: malc <av1474@comtv.ru>
* winwave: poll modemalc2009-10-101-0/+61
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Windows Waveform Audio driver (no ADC support yet)malc2009-10-105-95/+433
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)malc2009-10-032-21/+27
| | | | Signed-off-by: malc <av1474@comtv.ru>
* alsa: Change default buffer/period sizemalc2009-10-021-1/+2
| | | | | | | Increase buffer size but do not rely on ALSA picking up default period size. Signed-off-by: malc <av1474@comtv.ru>
* oss/alsa: Do not invoke UB described in 7.15.1.1malc2009-10-022-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.
* sdlaudio: make it suck lessmalc2009-09-301-50/+30
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: use correct email addressmalc2009-09-182-2/+2
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: internal API changemalc2009-09-1812-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>
* sdlaudio: use correct function names in sdl_XXX callsmalc2009-09-181-3/+3
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss: use audio_pcm_hw_clip_outmalc2009-09-181-47/+46
| | | | Signed-off-by: malc <av1474@comtv.ru>
* alsa: use audio_pcm_hw_clip_outmalc2009-09-181-45/+43
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: introduce audio_pcm_hw_clip_out helper functionmalc2009-09-182-0/+25
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: use muldiv64 where it makes sensemalc2009-09-184-5/+8
| | | | Signed-off-by: malc <av1474@comtv.ru>
* coreaudio: fix sloppy "posixification" by ↵malc2009-09-181-1/+1
| | | | | | 1ea879e5580f63414693655fcf0328559cdce138 Signed-off-by: malc <av1474@comtv.ru>
* alsa: Use proper value when testing returned events in alsa_poll_handlermalc2009-09-141-4/+6
| | | | Signed-off-by: malc <av1474@comtv.ru>
* alsa/oss: Remove fd transfer handlers before closing oss/alsa fd/handlemalc2009-09-142-27/+32
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: Fix typo that broke QEMU_AUDIO_ADC_TRY_POLLJan Kiszka2009-09-131-1/+1
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: malc <av1474@comtv.ru>
* oss: Simplify mmap codemalc2009-09-131-22/+5
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss: OSS v4 supportmalc2009-09-131-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>
* Fix sys-queue.h conflict for goodBlue Swirl2009-09-124-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>
* audio: remove lsbindex/popcount in favour of host-utils's ctz32malc2009-09-123-21/+2
| | | | Signed-off-by: malc <av1474@comtv.ru>
* alsa: poll mode handlingmalc2009-09-121-21/+204
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss: poll mode handlingmalc2009-09-121-5/+74
| | | | Signed-off-by: malc <av1474@comtv.ru>
* audio: poll mode infrastructuremalc2009-09-122-11/+87
| | | | Signed-off-by: malc <av1474@comtv.ru>
* oss: Unbreak mmaping the ability to mmap oss fd on Linuxmalc2009-09-121-1/+4
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Unexport ticks_per_sec variable. Create get_ticks_per_sec() functionJuan Quintela2009-09-113-4/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove bit-rotten threshold handlingmalc2009-09-101-13/+2
| | | | | | | Thanks to Toshiya Takeda for bringing up an unrelated issue which led to this. Signed-off-by: malc <av1474@comtv.ru>
* Fix warning on x86_64Kirill A. Shutemov2009-09-021-2/+2
| | | | | | | | | | | | audio/esdaudio.c: In function 'qesd_thread_out': audio/esdaudio.c:136: error: format '%d' expects type 'int', but argument 3 has type 'ssize_t' audio/esdaudio.c: In function 'qesd_thread_in': audio/esdaudio.c:366: error: format '%d' expects type 'int', but argument 3 has type 'ssize_t' Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: malc <av1474@comtv.ru>
OpenPOWER on IntegriCloud