summaryrefslogtreecommitdiffstats
path: root/audio/alsaaudio.c
Commit message (Collapse)AuthorAgeFilesLines
* alsaaudio: Remove unused error handling of qemu_set_fd_handlerFam Zheng2015-06-121-14/+2
| | | | | | | | The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-10-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* audio: Drop superfluous conditionals around g_free()Markus Armbruster2014-06-131-8/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* janitor: do not include qemu-char everywherePaolo Bonzini2012-12-191-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>
* janitor: do not rely on indirect inclusions of or from qemu-char.hPaolo Bonzini2012-12-191-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>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-5/+5
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* audio: split sample conversion and volume mixingMichael Walle2011-01-121-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>
* alsaaudio: add endianness support for VoiceInMichael Walle2011-01-091-7/+27
| | | | | Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
* issue snd_pcm_start() when capturing audioJindrich Makovicka2010-10-181-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>
* fix 100% CPU load when idle with ALSAJindrich Makovicka2010-10-181-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>
* audio/alsa: Avoid snd_pcm_format_t vs audfmt_e mixupmalc2010-04-211-5/+6
| | | | | | Spotted by Serge Ziryukin and based on his patch, thanks. 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>
* oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)malc2009-10-031-12/+15
| | | | 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-021-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.
* audio: internal API changemalc2009-09-181-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>
* alsa: use audio_pcm_hw_clip_outmalc2009-09-181-45/+43
| | | | 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-141-25/+28
| | | | Signed-off-by: malc <av1474@comtv.ru>
* alsa: poll mode handlingmalc2009-09-121-21/+204
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Aestheticsmalc2009-08-111-48/+67
| | | | | | | 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-111-2/+4
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* use C99 initializers for audio_pcm_opsJuan Quintela2009-08-111-11/+11
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* Use C99 initializers for audio_optionJuan Quintela2009-08-111-31/+45
| | | | Signed-off-by: Juan Quintela <quintela@redhat.com>
* Use proper struct initializers and remove INIT_FIELD() macroJuan Quintela2009-08-111-11/+11
| | | | Signed-off-by: Juan Quintela <quintela@redhat.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>
* 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.
* alsa: fix warningGerd Hoffmann2009-06-181-4/+6
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Make audio violate POSIX lessmalc2008-12-031-6/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
* Prepare for changing audio_pcm_ops dynamically (partially revert r5422)blueswir12008-10-061-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5435 c046a42c-6fe2-441c-8c8c-71466251a162
* Make audio_pcm_opsstatic constblueswir12008-10-051-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5422 c046a42c-6fe2-441c-8c8c-71466251a162
* Restore old value of buffer_sizemalc2008-07-091-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
* Warn about rejected buffer/period size/time when it was specified by the usermalc2008-07-091-2/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4864 c046a42c-6fe2-441c-8c8c-71466251a162
* Call proper function when trying to set period sizemalc2008-07-091-2/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4863 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix typomalc2008-07-031-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4835 c046a42c-6fe2-441c-8c8c-71466251a162
* Emit warning message if user supplied buffer/period size/time was rejectedmalc2008-06-211-0/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4773 c046a42c-6fe2-441c-8c8c-71466251a162
* Rework period/buffer size settingmalc2008-06-211-138/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4768 c046a42c-6fe2-441c-8c8c-71466251a162
* pthreads-based audio and miscellaneous audio clean-up (malc).balrog2008-01-141-41/+47
| | | | | | | ESD support (malc, Frederick Reeve). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3917 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix wrong signedness, by Andre Przywara.ths2007-12-161-3/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove stray uses of vl.h.pbrook2007-11-171-1/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3675 c046a42c-6fe2-441c-8c8c-71466251a162
* Spelling fix, by Stuart Brady.ths2007-07-121-16/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3076 c046a42c-6fe2-441c-8c8c-71466251a162
* Don't define HIGH_LATENCY for ARM, this was a workaround for an ALSA problem.balrog2007-05-021-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2766 c046a42c-6fe2-441c-8c8c-71466251a162
* Qemu support for S32 and U32 alsa output, by Vassili Karpov.ths2007-02-171-0/+26
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2427 c046a42c-6fe2-441c-8c8c-71466251a162
* audio endianness API changes (malc)bellard2006-07-041-10/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2042 c046a42c-6fe2-441c-8c8c-71466251a162
* audio fixes + initial audio capture support (malc)bellard2006-07-041-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2040 c046a42c-6fe2-441c-8c8c-71466251a162
* added LF missing in logs (malc)bellard2005-11-201-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1637 c046a42c-6fe2-441c-8c8c-71466251a162
* audio merge (malc)bellard2005-11-201-89/+129
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1636 c046a42c-6fe2-441c-8c8c-71466251a162
* debug fix (malc)bellard2005-11-111-30/+33
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1619 c046a42c-6fe2-441c-8c8c-71466251a162
* audio merge (malc)bellard2005-11-051-37/+49
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1601 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud