summaryrefslogtreecommitdiffstats
path: root/pulse/pcm_pulse.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 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>
* 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.
* 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.
* Adjust buffering metrics to match what PA internally usesLennart Poettering2008-09-031-4/+4
| | | | | Follow more closely the buffering metrics PA uses internally. This avoids clamping of the metricsin PA internally.
* Rework hardware parameter selectionLennart Poettering2008-09-031-5/+5
| | | | Follow more closely the real limits of PulseAudio's API.
* Remove fix for bug 0003470Lennart Poettering2008-09-031-12/+0
| | | | | This fix is completely broken (introduces new segfaults) and the assert is tries to fix is superfluous anyway, so let's just remove this altogether.
* Add more error checkingLennart Poettering2008-09-031-12/+32
| | | | Add a bit more error checking where necessary
* Get rid of pulse_poll_revents()Lennart Poettering2008-09-031-5/+0
| | | | pulse_poll_revents() has no real purpose, so let's remove it.
* Support S32 sample typesLennart Poettering2008-09-031-1/+9
| | | | | PulseAudio has been supporting these for a while, so let's make use of them here.
* use SNDERR instead of fprintf to print error messagesLennart Poettering2008-09-031-3/+2
| | | | | We shouldn't spam on stderr unconditionally, so let's use ALSA subsystem for printing errors.
* Add Emacs-style /*-*- linux-c -*-*/ header commentLennart Poettering2008-09-031-0/+2
| | | | | As suggested in the kernel's CodingStyle document force Emacs into kernel-style indenting to prevent future indenting chaos, at least for Emacs users.
* Reindent to Linux kernel styleLennart Poettering2008-09-031-473/+525
| | | | | | | The PulseAudio plugin was horrible mix-up of different indenting styles even in the same files. Indenting by 4, by 2, by 8 characters, sometimes with tabs, sometimes with spaces. To fix this chaos I ran all files through "indent -kr -i8". Hopefully future patches will follow kernel style indenting too.
* send both an uncork and a trigger in _start()Lennart Poettering2008-07-201-6/+15
| | | | | | | | | | | | | | Heya! Here's a patch for alsa-plugins: When playing very short streams, the pulse plugin needs call pa_stream_trigger() in snd_pcm_start() to make sure the stream is actually started, in addition to uncorking the stream. Lennart Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Returns errors instead of assert()Takashi Iwai2008-07-161-4/+16
| | | | | | | | | | | Some sanity checks in pcm_pulse.c with assert() causes the program to abort unexpectedly when the pulseaudio daemon is dead. This is suboptimal. Examples: https://bugzilla.novell.com/show_bug.cgi?id=409532 Now fixed to return an error instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Various plugins don't support "hint" sectionsTakashi Iwai2008-06-061-1/+1
| | | | | | | | | Ignore hint sections defined by hand. Those are heplful to get listed in various places, such as aplay -L ALSA bug#3834: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3834 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Remove another assertTakashi Iwai2008-06-061-2/+3
| | | | | | Remove another assert that results in an unexpected crash. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pulse - Fix useless assertTakashi Iwai2008-06-061-2/+4
| | | | | | | | | If stream connection failes, don't assume that stream is connected upon closing. ALSA bug#3831: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3831 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PulseAudio plugin: report XRUN state back to applicationTakashi Iwai2007-12-141-1/+22
| | | | | | | | | | | From: Lennart Poettering <mznyfn@0pointer.de> It adds support to report back XRUN to the application if one happens. This is required to make some applications work on top of the pulse plugin. One being XMMS, which checks if a song finished to play by waiting for an XRUN (yes, I don't argue that XMMS shouldn't do that, but nonetheless it is a good thing if XRUNs are reported properly.)
* Use different buffer metrics in the PulseAudio pluginTakashi Iwai2007-11-261-3/+3
| | | | | | | | | | | | | | | | It increases the "pre-buffering level" (i.e. start threshold) to the full buffer size minus one period. This makes PA work a little bit more like normal audio devices, and makes a few drop outs go away for software which uses very small period sizes. It also increases the initial maximum buffer size, which allows a small overcommit. That's not really an issue, but cleaner nonetheless so I smuggled it into this patch. Also reported in the ALSA BTS: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3578 From: Lennart Poettering <mznyfn@0pointer.de>
* pulse - Add minmax condition for period_bytes and periodsTakashi Iwai2007-11-131-0/+7
| | | | | | | Added the minmax conditions for period_bytes and periods to pulse plugin. This fixes ALSA bug#2601. Patch from Mike Gorse <mgorse@mgorse.dhs.org>
* Fix wrong assert in pulse pluginTakashi Iwai2007-11-121-2/+10
| | | | | | assert(!pcm->stream) shouldn't be checked when the PCM state is SETUP, too (ALSA bug#3470). The original patch by Mike Gorse <mgorse@mgorse.dhs.org>
* Fix unexpected assert with pulse pluginTakashi Iwai2007-10-291-2/+5
| | | | | | | | | | This patch fixes the unexpected assert call at calling snd_pcm_hw_params in PREPARED state. Since multiple hw_params calls are allowed, the pulse plugin shouldn't call assert. Handled in ALSA bug#3470. From: Sean McNamara <smcnam@gmail.com>
* Improve parameter constraints in alsa-pulsePierre Ossman2007-03-071-16/+1
| | | | | | | | Remove parameter constraints where we actually have none. Also, restrict total buffer size to 4 MB as current versions of the PulseAudio server will refuse streams larger than that. Signed-off-by: Pierre Ossman <ossman@cendio.se>
* Remove stray Polypaudio stringsPierre Ossman2006-08-281-3/+3
| | | | | | | Some stray mentions of the old Polypaudio name was still present in the PulseAudio plug-in. Signed-off-by: Pierre Ossman <ossman@cendio.se>
* Follow Polypaudio/PulseAudio name changePierre Ossman2006-07-121-0/+748
Polypaudio recently changed its name to PulseAudio which affects the names of libraries of header files. Update the polyp, now pulse, plug-in to follow this name change. Signed-off-by: Pierre Ossman <ossman@cendio.se>