summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix dsound typosConsul2009-08-261-3/+3
| | | | | | | | Dsound currently does not compile due to the typos in the code. This patch makes it compile again.{PATCH} Signed-off-by: Alex Ivanov <void@aleksoft.net> Signed-off-by: malc <av1474@comtv.ru>
* Fix typomalc2009-08-121-1/+1
|
* Aestheticsmalc2009-08-1110-288/+394
| | | | | | | Reformat to make item borders more visible Fix cases of stray tabs and vertical misalignments Signed-off-by: malc <av1474@comtv.ru>
* use C99 initializers for all audio/*Juan Quintela2009-08-118-53/+56
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* use C99 initializers for audio_pcm_opsJuan Quintela2009-08-1110-109/+92
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* Use C99 initializers for audio_optionJuan Quintela2009-08-1110-168/+258
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* Use proper struct initializers and remove INIT_FIELD() macroJuan Quintela2009-08-1111-116/+110
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* Fix Sparse warnings: "Using plain integer as NULL pointer"Blue Swirl2009-07-312-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* alsa: add host suspend/resume supportBjørn Mork2009-07-301-2/+47
| | | | | | | | | | | | | Both input and output streams may be in SND_PCM_STATE_SUSPENDED after the host is suspended and resumed, meaning "Hardware is suspended". snd_pcm_readi() and snd_pcm_writei() will return -ESTRPIPE if called while the stream is in this state. Call snd_pcm_resume() to enable audio output and capture after host resume. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: malc <av1474@comtv.ru>
* Generate config-host.h from config-host.makJuan Quintela2009-07-271-1/+6
| | | | | | | | Generate CONFIG_AUDIO_DRIVERS. Order is important here, because the first driver in the list is the one used by default. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIANJuan Quintela2009-07-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix period initializationmalc2009-07-241-1/+1
| | | | Signed-off-by: malc <av1474@comtv.ru>
* use struct initializer for audio.cJuan Quintela2009-07-221-26/+26
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Ignore -Waddress for alsaaudio.cmalc2009-07-171-0/+4
| | | | | | | | | | /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 evaluate as 'true'" which combined with -Werror prevents alsaaudio.o from being built with certain versions of GCC.
* fix qemu_alloc/qemu_free for audio subsystemJean-Christophe Dubois2009-06-191-2/+2
| | | | Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
* alsa: fix warningGerd Hoffmann2009-06-181-4/+6
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Remove any pretense that there can be more than one AudioStatemalc2009-05-145-80/+68
|
* Make AUD_init failure fatalPaul Brook2009-05-121-24/+20
| | | | | | | | | | | | 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 to proceed without an audio backend seems pointless. Also protect against multiple calls to AUD_init so that this can be pushed down into individual devices. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove redundant #defineConsul2009-05-011-1/+0
| | | | | | | | Suppress a warning audio/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)blueswir12009-03-071-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
* monitor: Rework API (Jan Kiszka)aliguori2009-03-052-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the monitor API and prepare it for decoupled terminals: term_print functions are renamed to monitor_* and all monitor services gain a new parameter (mon) that will once refer to the monitor instance the output is supposed to appear on. However, the argument remains unused for now. All monitor command callbacks are also extended by a mon parameter so that command handlers are able to pass an appropriate reference to monitor output services. For the case that monitor outputs so far happen without clearly identifiable context, the global variable cur_mon is introduced that shall once provide a pointer either to the current active monitor (while processing commands) or to the default one. On the mid or long term, those use case will be obsoleted so that this variable can be removed again. Due to the broad usage of the monitor interface, this patch mostly deals with converting users of the monitor API. A few of them are already extended to pass 'mon' from the command handler further down to internal functions that invoke monitor_printf. At this chance, monitor-related prototypes are moved from console.h to a new monitor.h. The same is done for the readline API. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
* Avoid running audio ctl's when vm is not runningmalc2009-02-182-2/+10
| | | | 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)aliguori2009-02-052-20/+8
| | | | | | | | 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 warningsmalc2009-01-221-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6411 c046a42c-6fe2-441c-8c8c-71466251a162
* Rework vm_state_change notifiers (Jan Kiszka)aliguori2009-01-221-1/+2
| | | | | | | 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.malc2008-12-222-6/+6
| | | | | | | | | 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 lessmalc2008-12-0320-119/+123
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
* Attached patch fixes a series of this warningblueswir12008-11-161-2/+2
| | | | | | | | | | | when 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
OpenPOWER on IntegriCloud