summaryrefslogtreecommitdiff
path: root/audio/alsaaudio.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: do not include qemu-char everywherePaolo Bonzini1-1/+0
Touching char/char.h basically causes the whole of QEMU to be rebuilt. Avoid this, it is usually unnecessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: do not rely on indirect inclusions of or from qemu-char.hPaolo Bonzini1-0/+1
Various header files rely on qemu-char.h including qemu-config.h or main-loop.h, but they really do not need qemu-char.h at all (particularly interesting is the case of the block layer!). Clean this up, and also add missing inclusions of qemu-char.h itself. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-5/+5
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-01-12audio: split sample conversion and volume mixingMichael Walle1-1/+1
Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
2011-01-09alsaaudio: add endianness support for VoiceInMichael Walle1-7/+27
Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
2010-10-18issue snd_pcm_start() when capturing audioJindrich Makovicka1-6/+17
snd_pcm_start() starts the capture process and ensures that the events are delivered to the poll handler. Without the call, capture can be started only when there is simultaneous playback running. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: malc <av1474@comtv.ru>
2010-10-18fix 100% CPU load when idle with ALSAJindrich Makovicka1-0/+4
Playback control function did not disable polling when playback stops. Caused busy spinning of the main loop due to unprocessed events. Signed-off-by: Jindrich Makovicka <makovick@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-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>
2009-10-03oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)malc1-12/+15
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.1malc1-11/+14
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-18audio: internal API changemalc1-7/+2
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-18alsa: use audio_pcm_hw_clip_outmalc1-45/+43
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/handlemalc1-25/+28
Signed-off-by: malc <av1474@comtv.ru>
2009-09-12alsa: poll mode handlingmalc1-21/+204
Signed-off-by: malc <av1474@comtv.ru>
2009-08-11Aestheticsmalc1-48/+67
Reformat to make item borders more visible Fix cases of stray tabs and vertical misalignments Signed-off-by: malc <av1474@comtv.ru>
2009-08-11use C99 initializers for all audio/*Juan Quintela1-2/+4
Signed-off-by: Juan Quintela <quintela@redhat.com>
2009-08-11use C99 initializers for audio_pcm_opsJuan Quintela1-11/+11
Signed-off-by: Juan Quintela <quintela@redhat.com>
2009-08-11Use C99 initializers for audio_optionJuan Quintela1-31/+45
Signed-off-by: Juan Quintela <quintela@redhat.com>
2009-08-11Use proper struct initializers and remove INIT_FIELD() macroJuan Quintela1-11/+11
Signed-off-by: Juan Quintela <quintela@redhat.com>
2009-07-30alsa: add host suspend/resume supportBjørn Mork1-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>
2009-07-17Ignore -Waddress for alsaaudio.cmalc1-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.
2009-06-18alsa: fix warningGerd Hoffmann1-4/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2008-12-03Make audio violate POSIX lessmalc1-6/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-06Prepare for changing audio_pcm_ops dynamically (partially revert r5422)blueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5435 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-05Make audio_pcm_opsstatic constblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5422 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-09Restore old value of buffer_sizemalc1-0/+1
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
2008-07-09Warn about rejected buffer/period size/time when it was specified by the usermalc1-2/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4864 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-09Call proper function when trying to set period sizemalc1-2/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4863 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-03Fix typomalc1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4835 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-21Emit warning message if user supplied buffer/period size/time was rejectedmalc1-0/+16
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4773 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-21Rework period/buffer size settingmalc1-138/+52
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4768 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-14pthreads-based audio and miscellaneous audio clean-up (malc).balrog1-41/+47
ESD support (malc, Frederick Reeve). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3917 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16Fix wrong signedness, by Andre Przywara.ths1-3/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17Remove stray uses of vl.h.pbrook1-1/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3675 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-12Spelling fix, by Stuart Brady.ths1-16/+16
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3076 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-02Don't define HIGH_LATENCY for ARM, this was a workaround for an ALSA problem.balrog1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2766 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-17Qemu support for S32 and U32 alsa output, by Vassili Karpov.ths1-0/+26
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2427 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-04audio endianness API changes (malc)bellard1-10/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2042 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-04audio fixes + initial audio capture support (malc)bellard1-3/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2040 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-20added LF missing in logs (malc)bellard1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1637 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-20audio merge (malc)bellard1-89/+129
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1636 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-11debug fix (malc)bellard1-30/+33
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1619 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-05audio merge (malc)bellard1-37/+49
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1601 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30merged 15a_aqemu.patch audio patch (malc)bellard1-0/+926
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1584 c046a42c-6fe2-441c-8c8c-71466251a162