Commit graph

48 commits

Author SHA1 Message Date
Lennart Poettering
edc56a7f7a rename pa_property_xxx to pa_shared_xxx to avoid confusion with property lists 2008-08-01 01:56:09 +03:00
Lennart Poettering
98c26b179d add proper update_max_request handler to native protocol streams 2008-06-28 01:09:07 +02:00
Lennart Poettering
05400321c0 fix underrun detection for prebuf=0 streams 2008-06-27 00:35:40 +02:00
Lennart Poettering
7755f759aa use (uint32_t) -1 to signify default buffer_attr values instead of 0, to allow prebuf=0 2008-06-27 00:34:17 +02:00
Lennart Poettering
1514d13835 split pa_memblockq_flush() into two flush commands, one which fixes up the read ptr, and one which fixes up the write ptr 2008-06-26 00:39:31 +02:00
Lennart Poettering
add6c0361a Rework module-combine to work with glitch-free core; add new max_request field to pa_sink 2008-06-20 22:32:41 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
ba64de8f3c reset prebuf if it is too large
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2548 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-17 20:08:08 +00:00
Lennart Poettering
8ba8265e19 server side of new shm negotiation scheme; fix a bad memory access
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2545 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-17 18:29:00 +00:00
Lennart Poettering
ce534976ce avoid division by zero when informing user about unloaded lazy samples in the sample cache
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2529 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-14 21:33:21 +00:00
Lennart Poettering
b27cc1d426 fix a bad memory access pulsecore/client.c
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2527 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-13 21:56:19 +00:00
Lennart Poettering
7297bd91e7 always expect name field in upload datagram
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2489 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-27 22:07:27 +00:00
Lennart Poettering
28405e3dcf big mumbo jumo of interleaved patches.
* Use seperate "state" and "config" paths
* Pass the fact that we are in system mode via an env var $PULSE_SYSTEM instead of as var in pa_core
* Properly check proc name when checking PID files. Don't check exename, because we cannot read that for other uids


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2480 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-21 22:50:58 +00:00
Lennart Poettering
ef4c6bf9d2 remove a misplaced assert
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2466 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-18 19:10:32 +00:00
Lennart Poettering
971342de0b dump latency metrics for recording streams, too
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2454 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-17 09:11:21 +00:00
Lennart Poettering
045c1d602d merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
bc5e3f1555 properly notify clients about suspended state when moving source output streams. Closes #244. Patch from slicer
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2181 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-27 23:59:37 +00:00
Sjoerd Simons
c5678ae400 Don't send opcodes introduced in protocol versions 12 to clients using protocol
version 11. (fixes #183)


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2097 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-01-04 14:59:09 +00:00
Lennart Poettering
40db06de5f when speaking to a client with a version < 12, hide S32 sample specs, and make them appaear as FLOAT32
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2069 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-21 22:55:28 +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
d17bb53d3e Completely rework ALSA device selection code: choose the device to open depending on the requested number of channels and channel map. In most cases it will now suffice to set default-channels=6 to enable 5.1 sound for all devices that support it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2050 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-13 17:37:44 +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
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
918cacb4f4 Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes sense
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1459 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-27 20:38:14 +00:00
Lennart Poettering
cf925b10e1 Fix yet another DoS vulnerability, also identified Luigi Auriemma (re #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1448 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:42:26 +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
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
8dc6214276 Revert r1404 and keep it on a development branch until it is fully tested.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 13:06:01 +00:00
Lennart Poettering
d210ebbb09 rework memory block management to be thread-safe and mostly lock-free.
pa_memblock is now an opaque structure. Access to its fields is now done
through various accessor functions in a thread-safe manner.

pa_memblock_acquire() and pa_memblock_release() are now used to access the
attached audio data. Why? To allow safe manipulation of the memory pointer
maintained by the memory block. Internally _acquire() and _release() maintain a
reference counter. Please do not confuse this reference counter whith the one
maintained by pa_memblock_ref()/_unref()!

As a side effect this patch removes all direct usages of AO_t and replaces it
with pa_atomic_xxx based code.

This stuff needs some serious testing love. Especially if threads are actively
used.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-26 23:50:56 +00:00
Lennart Poettering
5264d235d2 make pa_mempool_stat thread-safe/lock-free
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1343 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-29 02:01:39 +00:00
Lennart Poettering
bffde5da05 If a client leaves the sink/source for a stream unspecified by passing NULL as
sink/source name sink/source we should pass NULL to
pa_sink_input_new()/pa_source_output_new() as too. This allows
hooks to change the sink/source device only if it is left unspecified by the client



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1303 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-19 23:06:45 +00:00
Lennart Poettering
e33abc3089 activate SHM support on the server side only when new client supports it and when client and server have the same UID.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1277 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 23:44:35 +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
0e436a6926 Rework memory management to allow shared memory data transfer. The central idea
is to allocate all audio memory blocks from a per-process memory pool which is
available as read-only SHM segment to other local processes. Then, instead of
writing the actual audio data to the socket just write references to this
shared memory pool.

To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or
PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory
blocks of this type by default.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 19:55:18 +00:00
Lennart Poettering
a75e1ed9ef implement hook_source_ouput_new. For this I modified the pa_source_output_new constructor to take a struct similar to what I already did for pa_sink_input_new()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1250 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 19:55:17 +00:00
Lennart Poettering
abbabd848a ignore if we recieved a memory block for an invalid stream, since this might happen unwillingly due to the asychnronous nature of the protocol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1241 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 17:31:58 +00:00
Lennart Poettering
a621d90285 allow hooking into the process of creating playback streams. To implement this I modified the pa_sink_input_new() signature to take a pa_sink_input_new_data structure instead of direct arguments.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1237 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-13 16:19:56 +00:00
Lennart Poettering
02e083cbc4 test if sink->monitor_source is set before making use of it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1228 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-12 17:06:39 +00:00
Lennart Poettering
5fdc39dc26 wrap pa_source_output_move_to() in the native protocol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1183 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-03 22:32:23 +00:00
Lennart Poettering
785477ba93 add new native protocol function for moving sink inputs between sinks
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1176 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-31 21:54:46 +00:00
Lennart Poettering
d1db037577 for the playing field of pa_timing_info use pa_sink_input::state == PA_SINK_INPUT_RUNNING. This means that this variable will now refer to the current state and not to the expected future state, which is probably more what clients expect.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1163 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-28 23:29:37 +00:00
Lennart Poettering
90b521d73e add missing #ifdef HAVE_CREDS (thanks, Flameeyes)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1130 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-20 22:46:41 +00:00
Lennart Poettering
44beeaa648 implement "auth-ip-acl=" in the native and esound protocols
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1125 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-20 18:43:20 +00:00
Lennart Poettering
a382492204 * add new function pa_check_in_group()
* abstract credential APis a little bit by introducing HAVE_CREDS and a structure pa_creds
* rework credential authentication
* fix module-volume-restore and friends for usage in system-wide instance
* remove loopback= argument from moulde-*-protocol-tcp since it is a superset of listen= and usually a bad idea anyway since the user shouldn't load the TCP module at all if he doesn't want remote access
* rename a few variables in the jack modules to make sure they don't conflict with symbols defined in the system headers
* add server address for system-wide daemons to the default server list for the the client libs
* update todo


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1109 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-19 21:48:35 +00:00
Lennart Poettering
9c87a65ce9 * add new --system command line parameter to the daemon for running PulseAudio as system-wide instance
* add PA_ prefixes to all global #defines
* modify auth-by-creds: define a new group "pulse-access" which is used for authentication
* add proper privilige dropping when running in --system mode
* create runtime directory once on startup and not by each module seperately


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1105 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-19 17:44:19 +00:00
Lennart Poettering
494fa68327 add new PA_SOURCE_HARDWARE/PA_SINK_HARDWARE flag
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1091 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-16 17:28:10 +00:00
Lennart Poettering
18b8b84b7e increase the maxium number of concurrent esd and native connections
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1053 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-21 16:36:58 +00:00
Lennart Poettering
f44ba09265 big s/polyp/pulse/g
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 21:53:48 +00:00
Renamed from src/polypcore/protocol-native.c (Browse further)