summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pulse: immediately trigger EIO when connection is droppedHEADmasterLennart Poettering2009-08-051-1/+8
| | | | | | | | | | When the connection is dropped notify the application immediately instead of waiting until the applications calls into us the next time. This makes "aplay" handle connections shutdown similar to hardware unplugs: an immediate EIO is thrown. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: rework object destruction paths a bitLennart Poettering2009-08-042-14/+12
| | | | | | | | | Make sure we deal better with partially initialized structs. Don't check for pointer state before calling free() since free() does that anyway. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: unify stream/context state checksLennart Poettering2009-08-042-67/+95
| | | | | | | | | Unify (and simplify) the paths that check for the validity of a stream/context: always call into check_stream()/pulse_check_connection() when applicable instead of rolling our own checks each time. Also check for validity of mainloop before locking it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: get rid of redundant state variableLennart Poettering2009-08-042-17/+3
| | | | | | | | snd_pulse_t::state was mostly shadowing the state of pa_context_get_state(snd_pulse_t::context), so get rid of it and use the state of the context directly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: move a couple of PCM related functions from pulse.c to pcm_pulse.cLennart Poettering2009-08-043-82/+95
| | | | | | | | A number of functions in pulse.c are only relevant for the PCM handling, so let's move them to pcm_pulse.c. This allows us to simplify their argument lists a bit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: replace manual mainloop by pa_mainloop_iterate()Lennart Poettering2009-08-041-9/+1
| | | | | | | The pa_mainloop_prepare()/_poll()/_dispatch() can be simplified by simply calling pa_mainloop_iterate() which does all this in one call. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: call pa_threaded_mainloop_wait() to handle spurious wakeupsLennart Poettering2009-08-031-3/+10
| | | | | | | | pa_threaded_mainloop_wait() can wake up for no reason, according to the specs of the underlying POSIX ptrhead_cond_wait() docs, so we need to call it in a loop here which should be cleaner anyway. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: unify destruction of snd_pulse_tLennart Poettering2009-08-031-19/+12
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: use PA_CONTEXT_IS_GOOD where applicableLennart Poettering2009-08-032-4/+3
| | | | | | | | | PA_CONTEXT_IS_GOOD is a safer way to check whether a context is still valid. This patch also bumps the version requirement of libpulse to 0.9.11. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: get rid of a number of assert()sLennart Poettering2009-08-033-36/+112
| | | | | | | | | | Instead of hitting an assert when any of the plugin functions is called in an invalid context we should return a clean error to make sure programs are not unnecessarily aborted. This should fix issues such as http://pulseaudio.org/ticket/595 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* oss - Add missing initialization of fragmentsTakashi Iwai2009-07-171-0/+1
| | | | | | The periods calculation was missing for initializing OSS fragments. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* alsa-plugins/pulse: Implement 'pause'.Troy Moure2009-06-181-0/+25
| | | | | | | Just cork or uncork the stream to pause or unpause it. Signed-off-by: Troy Moure <twmoure@szypr.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* speex - Add echo-cancelling option to speexdsp pluginTakashi Iwai2009-06-162-10/+85
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add PCM rates query support for PCM rate pluginsTakashi Iwai2009-06-023-6/+87
| | | | | | | Follow the new PCM rate-plugin protocol to support the rate range queries, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Release v1.0.20Jaroslav Kysela2009-05-061-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* arcam_av: Refactor event callback to facilitate addition of "numid" optimisationPeter Stokes2009-03-022-76/+52
| | | | | Signed-off-by: Peter Stokes <linux@dadeos.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* arcam_av: Refactor control specifications to facilitate addition of "numid" ↵Peter Stokes2009-02-231-101/+91
| | | | | | | optimisation Signed-off-by: Peter Stokes <linux@dadeos.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* arcam_av: Remove incorrect usage of the static SHM ID variablePeter Stokes2009-02-231-38/+20
| | | | | Signed-off-by: Peter Stokes <linux@dadeos.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* oss: Add numid check in ctl pluginTakashi Iwai2009-02-171-1/+15
| | | | | | | Added the check of non-zero numid to optimize the look-up for the element. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse: Add numid check in ctl pluginTakashi Iwai2009-02-171-0/+5
| | | | | | | Added the check of non-zero numid and optimize the look-up for the element. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Clean up Makefile.amTakashi Iwai2009-01-221-9/+8
| | | | | | Avoid unnecessary substitution and use simply SUBDIRS += ... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add arcam-av pluginPeter Stokes2009-01-228-2/+1884
| | | | | | | Added arcam-av control plugin (type "arcam_av") for accessing Arcam AV amplifier via ALSA mixer interface. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add missing continue in config parser of pcm-upmix plugin (again)Takashi Iwai2009-01-221-0/+1
| | | | | | | This change was reverted accidentally by the previous git-stash operation on my local tree... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add Speex pre-processing pluginTakashi Iwai2009-01-216-3/+358
| | | | | | Added Speex pre-processing filter plugin for denoise, AGC, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Fix build of pph plugin with speex-1.2rc1Takashi Iwai2009-01-213-10/+12
| | | | | | The resampler code is moved to libspeexdsp instead of libspeex. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add missing continue in config parser of pcm-upmix pluginTakashi Iwai2009-01-211-0/+1
|
* Add missing -lm to pph pluginTakashi Iwai2009-01-211-0/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Release v1.0.19Jaroslav Kysela2009-01-191-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Added m4/attributes.m4 to extra dist.Jaroslav Kysela2009-01-051-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Mark as static the functions not used outside their unit.Diego E. 'Flameeyes' Pettenò2008-11-214-7/+7
| | | | | | | This allows the compiler to assume more about their interface, if at all possible. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Make some static tables and strings constants.Diego E. 'Flameeyes' Pettenò2008-11-215-18/+18
| | | | | | | | | | | By doing this we move them from the .data section to .rodata setion, or from .data.rel to .data.rel.ro. The .rodata section is mapped directly from the on-disk file, which is always a save, while .data.rel.ro is mapped directly when using prelink, which is a save in a lot of cases. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* [RFC] Don't use pow() for calculating a power of 2, use shift instead.Diego E. 'Flameeyes' Pettenò2008-11-212-3/+3
| | | | | | | This assumes that the power2 argument is in the 0-32 range, so this need to be carefully checked. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Cleanup flags in maemo/Makefile.amDiego E. 'Flameeyes' Pettenò2008-11-211-4/+4
| | | | | | | | | Pass libraries on LIBADD rather than LDFLAGS, don't link to libdl since it's unneeded, no need to pass -shared since libtool's -module takes care of that, the same goes for -fPIC -DPIC (which might not even be the right option). Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Check for --no-undefined linker flag and use it.Diego E. 'Flameeyes' Pettenò2008-11-2111-10/+12
| | | | | | | This adds extra safety that the built libraries will have all the correct dependencies linked in. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Add the attributes.m4 macro file from xine/lscube.Diego E. 'Flameeyes' Pettenò2008-11-214-0/+318
| | | | | | | | This is a shared macro file that is currently maintained in both xine and lscube repositories and contains a series of utility macros to check compiler and linker features. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Allow opt-out from jack, pulseaudio and avcodec dependencies.Diego 'Flameeyes' Pettenò2008-11-131-5/+26
| | | | | | | | | | | | Without this patch the jack, pulseaudio and avcodec discovery was "automagic", without a way for the user to disable the relative plugins if the dependencies are installed but the plugin is unwanted. This patch does not change the default behaviour but allows to opt-out from the plugins by passing the relative --without option at ./configure time. Signed-off-by: Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Release v1.0.18Jaroslav Kysela2008-10-291-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pulse - Fix capture problemTakashi Iwai2008-10-151-7/+4
| | | | | | | | In pulse_start(), pa_stream_trigger() may return NULL for the capture stream, and this caused -EIO error. Allow now pa_stream_trigger() returning NULL. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Fix destruction logic on failed constructionLennart Poettering2008-09-261-0/+6
| | | | | | | We need to stop the main loop first, then free the context and finally free the mainloop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Fix destruction order on failureLennart Poettering2008-09-261-5/+2
| | | | | | | | If we failure we should make sure the event loop thread is not running and hence not accessing our source/sink strings before we free those strings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - fix minor memory leakLennart Poettering2008-09-261-0/+1
| | | | | | If we fail, we need to free the device string Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Start PA event loop after we have created the contextLennart Poettering2008-09-261-3/+3
| | | | | | | | We shouldn't be passing the main loop object to the pa_context while that loop is running and not locked. Push the main loop startup after we created the main loop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Release v1.0.18rc3Jaroslav Kysela2008-09-091-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* A bag of clean-ups for pcm_ctl.cLennart Poettering2008-09-031-95/+184
| | | | | Use more error checking where appropriate, optimize a few things, split common code into seperate functions.
* Remove our own poll handler implementation entirelyLennart Poettering2008-09-032-27/+0
| | | | | Neither pcm_pulse.c nor ctl_pulse.c is using our poll handler implementation anymore, so let's get rid of the common parts previously used by them, too
* Don't implement our own poll handlers, we can use the default onesLennart Poettering2008-09-031-43/+3
| | | | | As long as we have only a single fd to watch we can use the default poll handler implementations. So let's do this.
* Add const to our snd_pcm_ioplug_callback_t instancesLennart Poettering2008-09-031-2/+2
| | | | The fields are constant so let's declare that they actually are.
* Use S32/FLOAT32 only where available in the PA libsLennart Poettering2008-09-031-0/+8
| | | | | S32 samples are a recent addition to the PA API, so check if they are available before actually using them.
* Use PA_STREAM_EARLY_REQUESTS if availableLennart Poettering2008-09-031-3/+10
| | | | | | | | | | | Use PA_STREAM_EARLY_REQUESTS if PA knows it. PA >= 0.9.12 learned this flag which will make the buffering more similar to traditional fragment/period-based scheduling. Instead of delaying buffer fillup until the latest moment possible this will cause fillups much earlier. This is useful for compatibility for broken ALSA clients that don't care about 'readability' of the ALSA fd but instead schedule audio via usleep() or a similar call. (One exampler being mplayer)
* Make sure we always have a sensible channel mappingLennart Poettering2008-09-031-12/+13
| | | | | If PA doesn't know a default channel map for the specified number of channels, synthesize one by extending a known one with a smaller channel number.