Commit graph

120 commits

Author SHA1 Message Date
Lennart Poettering
52e3628c3e Yes, yet another evil all-in-one commit of intervowen changes. I suck.
* Drop "state" directory, fold that into "runtime directory"
* No longer automatically rewind when a new stream connects
* Rework sound file stream, to cause a rewind on initialisation, shorten _pop() code a bit
* Fix reference counting of pa_socket_server in the protocol implementations
* Rework daemon initialization code to be compatible with non-SUID-root setups where RLIMIT_RTPRIO is non-zero
* Print warning if RT/HP is enabled in the config, but due to missing caps, rlimits, policy we cannot enable it.
* Fix potential memory leak in pa_open_config_file()
* Add pa_find_config_file() which works much like pa_open_config_file() but doesn't actually open the config file in question. Just searches for it.
* Add portable pa_is_path_absolute()
* Add pa_close_all() and use it on daemon startup to close leaking file descriptors (inspired from what I did for libdaemon)
* Add pa_unblock_sigs() and use it on daemon startup to unblock all signals (inspired from libdaemon, too)
* Add pa_reset_sigs() and use it on daemon startup to reset all signal handlers (inspired from libdaemon as well)
* Implement pa_set_env()
* Define RLIMIT_RTTIME and friends if not defined by glibc
* Add pa_strempty()
* rename state testing macros to include _IS_, to make clearer that they are no states, but testing macros
* Implement pa_source_output_set_requested_latency_within_thread() to be able to forward latency info to sources from within the IO thread
* Similar for sink inputs
* generelize since_underrun counter in sink inputs to "playing_for" and "underrun_for". Use only this for ignore potential rewind requests over underruns
* Add new native protocol message PLAYBACK_STREAM_MESSAGE_STARTED for notification about the end of an underrun
* Port native protocol to use underrun_for/playing_for which is maintained by the sink input anyway
* Pass underrun_for/playing_for in timing info to client
* Drop pa_sink_skip() since it breaks underrun detection code
* Move PID file and unix sockets to the runtime dir (i.e. ~/.pulse). This fixes a potention DoS attack from other users stealing dirs in /tmp from us so that we cannot take them anymore)
* Allow setting of more resource limits from the config file. Set RTTIME by default
* Streamline daemon startup code
* Rework algorithm to find default configuration files
* If run in system mode use "system.pa" instead of "default.pa" as default script file
* Change ladspa sink to use pa_clamp_samples() for clamping samples
* Teach module-null-sink how to deal with rewinding
* Try to support ALSA devices with no implicit channel map. Synthesize one by padding with PA_CHANNEL_POSITION_AUX channels. This is not tested since I lack hardware with these problems.
* Make use of time smoother in the client libraries.
* Add new pa_stream_is_corked() and pa_stream_set_started_callback() functions to public API
* Since our native socket moved, add some code for finding sockets created by old versions of PA. This should ease upgrades


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2329 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:51:05 +00:00
Lennart Poettering
4f99c431d0 check for $PULSE_INTERNAL before enabling padsp
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2321 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:15:49 +00:00
Lennart Poettering
9a486efa5f implement --process-time
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2293 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:38:51 +00:00
Lennart Poettering
144b237d86 print a message on xrun
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2270 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:38:33 +00:00
Lennart Poettering
55f273eb00 s/pulsecore\/gccmacro.h/pulse\/gccmacro.h/
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2261 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-11 17:06:41 +00:00
Lennart Poettering
aad9d39838 dump all info we know about sinks/sources/... in pactl
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2259 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-11 17:03:18 +00:00
Lennart Poettering
ad18107223 add new latency argument
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2224 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-09 01:15:23 +00:00
Lennart Poettering
ecf6439661 catch up with trunk HEAD (i.e. 2118:2213)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2214 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31 23:08:01 +00:00
Lennart Poettering
6ad7621b61 work around solaris printf %s and NULL string brain damage
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2117 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-14 13:32:33 +00:00
Lennart Poettering
75e1ebdf77 Improve compatibility with applications which like to pass invalid strings to the libc functions we overwrite, by handing directly to the original function. Patch by Colin Guthrie and Gustavo De Nardin, Closes #227
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2106 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-02-15 11:50:48 +00:00
Lennart Poettering
14a9b80afb - Check process name when dealing with PID files
- Add new PA_STREAM_FIX_CHANNELS, FIX_RATE, FIX_FORMAT, DONT_MOVE, VARIABLE_RATES to pa_sream_flags_t adn implement it
- Expose those flags in pacat
- Add notifications about device suspend/resume to the protocol and expose them in libpulse
- Allow changing of buffer_attr during playback
- allow disabling for remixing globally
- hookup polkit support


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2067 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-21 01:30:40 +00:00
Lennart Poettering
7b321eda3a increase the pacmd timeout a bit
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2051 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-13 19:21:15 +00:00
Lennart Poettering
ecf349dc6c add missing #include
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2035 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 01:30:46 +00:00
Lennart Poettering
14b974a6d8 parse the pasuspend argument like any other boolean in PulseAudio
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2031 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-08 22:42:33 +00:00
Lennart Poettering
1ef4bafc9a warn if the sound server is not local
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2028 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-07 13:52:07 +00:00
Lennart Poettering
0eb011bda0 minor cleanups of --help texts
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2025 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-05 23:56:30 +00:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Pierre Ossman
0694d2ae35 Make sure mixer ioctls work on /dev/dsp aswell.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1473 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-13 07:21:57 +00:00
Pierre Ossman
14cbbe1096 Support stat() and friends as some programs (audacity) likes to check if
the device node is there first.


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1467 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-11 11:22:30 +00:00
Pierre Ossman
13a4c5290a Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1466 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-04 09:52:03 +00:00
Lennart Poettering
1e12e0ee8d Kill spaces on EOL
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-29 17:24:48 +00:00
Lennart Poettering
8e738ede9b fix a few obvious copynpaste errors when handling volumes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1444 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 15:30:34 +00:00
Pierre Ossman
9ee398107e Add support for SNDCTL_DSP_SETTRIGGER. (closes #56)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1437 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-03-07 09:27:30 +00:00
Pierre Ossman
06211b7c8f Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Pierre Ossman
4171f2504a Make sure we report success for SNDCTL_DSP_SETDUPLEX.
(Patch by ZlatkO)


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1422 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-19 08:00:31 +00:00
Pierre Ossman
4c0a481f79 Report IO error on ioctl() when we're in a fatal error state.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1421 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:20:53 +00:00
Pierre Ossman
c992ed9c47 Free stream objects when they've been invalidated.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1420 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:17:57 +00:00
Pierre Ossman
19bd9148c5 Fix error messages for failure connecting streams.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1419 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:06:24 +00:00
Pierre Ossman
521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Pierre Ossman
d4ca81fc2e Fix some missing line breaks.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1410 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 13:16:15 +00:00
Pierre Ossman
6ca819354c The OSS spec is unclear what should happen when a reset is requested. Let's
have a nicer attitude and keep as much settings as possible.


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1406 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 10:17:39 +00:00
Pierre Ossman
29ab939570 Stop using x86-isms and use ISO C (oversized shifts are undefined).
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1397 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-14 16:00:57 +00:00
Pierre Ossman
5f828c2c3d Fix debug output for SNDCTL_DSP_SETFRAGMENT.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1396 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-14 14:56:31 +00:00
Lennart Poettering
66ec460845 fix a bogus debug line
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1374 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-06 21:37:09 +00:00
Lennart Poettering
6569199778 implement a few more ioctl()s, including a subset of SNDCTL_DSP_GETOPTR. Just enough to make JavaSound work.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1373 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-06 19:47:53 +00:00
Lennart Poettering
5fa9cdb6b4 Merge FreeBSD compatibility patch (from Flameeyes)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1359 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-02 12:03:18 +00:00
Lennart Poettering
0f6098bf64 work around bug in firefox which apparently misuses access() as NULL pointer test. Original patch by "alon". (Closes #27)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1352 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-31 15:31:33 +00:00
Pierre Ossman
078420a9d2 We need to have a callback when changing volume or we might deadlock.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1345 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-30 13:02:29 +00:00
Lennart Poettering
26201b27ec fix pactl output (sink drivers and names where switched)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1306 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-21 22:37:09 +00:00
Lennart Poettering
e385d93e5a remove all occurences of
pa_logXXX(__FILE__":  
   
and replace them by 
  
   pa_logXXX("



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 21:38:40 +00:00
Lennart Poettering
b5cbea940e fix bad printf()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1236 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 16:14:06 +00:00
Lennart Poettering
ad95c96a72 implement "pactl move-source-output"
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1185 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-03 22:33:54 +00:00
Lennart Poettering
7f93d08d40 bump API and protocol version. Return PA_ERR_NOTSUPPORTED if pa_context_move_sink_input_by_*()is called for servers that don't support it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1179 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-01 21:04:43 +00:00
Lennart Poettering
bc30e2d934 add new "move-sink-input" command to pactl
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1178 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-31 21:55:42 +00:00
Lennart Poettering
b325e07c73 handle EOF correctly if it is read before the stream was created
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1164 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-29 15:02:24 +00:00
Lennart Poettering
ba31adcf3e make pulseaudio compile again on FreeBSD (patch from Diego "Flameeyes" Petteno)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1096 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-16 23:20:27 +00:00
Lennart Poettering
3b2843d5a8 show value of PA_SINK_HARDWARE/PA_SOURCE_HARDWARE in pactl
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1093 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-16 17:29:09 +00:00
Lennart Poettering
a87c43d61e Don't call pa_path_get_filename() anymore since it is implicitly called by pa_get_binary_name() anyway
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1078 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-14 00:18:21 +00:00
Lennart Poettering
1fd18d6b5f * add proper error handling to pabrowse.c
* properly destroy pa_browser object on exit


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1071 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-13 17:35:10 +00:00
Pierre Ossman
320bedb580 Fix handling of the io flags in duplex mode.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1048 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-20 16:43:46 +00:00