Commit graph

480 commits

Author SHA1 Message Date
Colin Guthrie
f73e9c19f7 x11: Use the default screen for X11 properties.
This commit restores the functionality originally included in 65e807
by Leszek Koltunski.
2010-09-18 12:05:38 +01:00
Colin Guthrie
24014e779c xcb: Ensure the XCB connection is valid before using it. 2010-09-18 12:05:19 +01:00
Colin Guthrie
38778117f8 x11: Partially convert to XCB.
This commit mostly converts the X11 handling to XCB. There are still
some uses of XLib to deal with the X11 session handling modules, however all
client-side code should now be free of XLib and thus this should fix Bug #799

Note that this removes the screen-based changes by Leszek Koltunski
in 65e80, however this will be restored in due course.
2010-09-18 12:04:09 +01:00
Pierre-Louis Bossart
9b6c84ad6e AC3 passthrough support
Second version after Tanu's feedback

TODO:
    - notify client that volume control is disabled
    - change sink rate in passthrough mode if needed
    - automatic detection of passthrough mode instead of hard
    coded profile names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-08-12 18:20:27 +01:00
Lennart Poettering
cdc2769162 thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-07 23:58:59 +02:00
Lennart Poettering
7098d60b30 proplist: explicitly mention a role 'test' 2010-02-21 17:48:42 +01:00
Lennart Poettering
27427c114c channelmap: Use "Subwoofer" as pretty name for LFE
The pretty name is suspposed to be understandable by non-technical
folks, and they are generally more used to the term "Subwoofer" than
"Low Frequency Emitter", so let's change the name here.
2010-02-21 17:48:36 +01:00
Lennart Poettering
66cfa72eb4 native: rework handling of seeks that depend on variables the client does not know anything about
All seeks/flushes that depend on the playback buffer read pointer cannot
be accounted for properly in the client since it does not know the
actual read pointer. Due to that the clients do not account for it at
all. We need do the same on the server side. And we did, but a little
bit too extreme. While we properly have not applied the changes to the
"request" counter we still do have to apply it to the "missing" counter.
This patch fixes that.
2010-02-09 22:45:59 +00:00
Lennart Poettering
d090995262 client: implement $PULSE_LATENCY_MSEC
This allows easy overriding of a clients latency setting for debugging
purposes.

http://pulseaudio.org/ticket/753
2010-02-09 22:44:49 +00:00
Lennart Poettering
9ac12b7048 client: verify connection state in pa_stream_connect_upload()
Make suer we check the connection state before going on, so that we can
rely that s->context->pstream is properly initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=539500
2010-02-09 22:31:01 +00:00
Lennart Poettering
7ab9bea29d client: detect forking in sample cache API, too 2010-02-09 22:30:20 +00:00
Lennart Poettering
699233fb47 native: fix request counter miscalculations
Do not subtract bytes the client sends us beyond what we requested from
our missing bytes counter.

This was mostly a thinko that caused servers asking for too little data
when the client initially sent more data than requested, because that
data sent too much was accounted for twice.

This commit fixes this miscalculation.

http://bugzilla.redhat.com/show_bug.cgi?id=534130
2010-02-09 22:29:20 +00:00
Lennart Poettering
66dbca1e06 dbus: remove filter functions only if they were actually set before
This fixes an assert when destructing modules that have not been fully
initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=548525
2010-02-09 22:28:17 +00:00
Paul Menzel
57b0397823 client.conf.in: Typo. s/a/are/
This is the same typo as reported in [1] and fixed in [2] in `client.conf.in`.

I did `git grep "values a commented"` and did not get anymore hits.

[1] http://pulseaudio.org/ticket/783
[2] http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=ea8927f1d47be101a1f64b2f87fd6e527ff76dbe
2010-02-02 09:02:21 +01:00
Lennart Poettering
62bfb511f6 client: include dolby channel names in comments 2010-01-14 21:32:26 +01:00
Lennart Poettering
21cbcc1a8a client: introduce auto-connect-display= following the scheme of auto-connect-localhost=
Just connecting to a PA server just because X11's $DISPLAY is set might
be a security hole.
2010-01-13 22:15:52 +01:00
Lennart Poettering
3d6cc026e2 client: introduce auto-connect-localhost= option in client.conf
Partly fixes:

http://pulseaudio.org/ticket/773

Also fixes a security hole since listening on the default port is not
access controlled right now.
2010-01-13 22:08:59 +01:00
Lennart Poettering
6dfb1ee27e Merge remote branch 'zonque/topic/osx' 2010-01-05 22:52:57 +01:00
Mads Kiilerich
6faf38313e headers: Some trivial fixes for some documentation typos
Note also the willneed/will_need inconsistency. I guess it could be nice to ASAP
choose one of them and introduce a backward compatibility hack for the other.

The issues was mostly found with:
for a in $(grep -r '^[ /]\*.*()' $(
	find -name '*.[ch]') |
	sed 's,^.* \([^ ]*\)().*$,\1,g' |
	sort |
	uniq |
	grep ^pa_)
do
	grep -rq "^.[^*].*\<$a(" $(find * -name '*.h') || echo $a
done
2010-01-05 21:27:33 +01:00
Daniel T Chen
c5fdbeab85 threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock
Compiler optimisations have been seen to initialise
m->n_waiting_for_accept to a positive non-zero value, so the while() in
pa_threaded_mainloop_signal() never proceeds. Fix this by properly
initializing m->n_waiting_for_accept in pa_threaded_mainloop_new().

Patch from Iain Bucław.

https://bugs.launchpad.net/bugs/502992
2010-01-05 19:57:16 +01:00
Daniel Mack
17d34462ea poll() is totally broken on Mac OS X
Even on 10.5.8, poll() does not do the right thing. Haven't checked on
newer versions. Hence, wrap all occurences of poll() to pa_poll and
emulate that call with select() on OSX. This is totally embarassing.
2009-12-16 16:11:36 +08:00
Arun Raghavan
978d33b609 Mark shared variables as volatile
'n_waiting' and 'n_waiting_for_accept' may be accessed from mulitple
threads, and thus need to be marked as volatile to suppres certain
compiler optimisations. All uses are protected by a mutex, so we don't
need to worry about cache issues (added documentation for this as well).

This addresses bug #738.
2009-12-06 11:51:17 +00:00
Tanu Kaskinen
4c793cfc76 libpulse: Store pa_stream pointers to hashmaps instead of dynarrays.
Since the stream identifiers (channels) are monotonically growing integer, it
isn't a good idea to use them as index to a dynamic array, because the array
will grow all the time. This is not a problem with client connections that
don't create many streams, but, for example, long-running clients that use
libcanberra for playing event sounds, this means that the client connection
effectively leaks memory.
2009-12-03 21:47:46 +00:00
Joe Marcus Clarke
5aa5c6c196 freebsd: implement pa_get_binary_name
Stolen from
http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/pulseaudio/files/patch-src_pulse_util.c?rev=1.1
and fixed for indentation.
2009-11-21 01:13:35 +01:00
Lennart Poettering
ba95b1939d pulse: ask for timing updates both *before* and *after* triggering a stream state change so that in the STARTED/UNDERFLOW callbacks we accurate transport latency information 2009-11-20 19:55:47 +01:00
Lennart Poettering
f05ae357b6 pulse: delay smoother update only when unpausing, not when pausing, since we don't want the timer to advance when we are supposedly already paused 2009-11-20 19:48:08 +01:00
Lennart Poettering
a3b5a94488 pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state 2009-11-20 17:49:30 +01:00
Colin Guthrie
dad36acea3 device-manager: Update docs version -> 0.9.20
Third time is a charm... maybe.
2009-11-11 17:24:57 +00:00
Colin Guthrie
9e45f198d0 device-manager: Update docs version -> 0.9.20 2009-11-09 21:57:07 +00:00
Vladimir Kokarev
d2c59354d5 volume: add pa_cvolume_inc_clamp function
added function to increase volume not exceeding specified limit
simply changed PA_VOLUME_MAX to 'limit' in pa_cvolume_inc
pa_cvolume_inc now calls pa_cvolume_inc_clamp with PA_VOLUME_MAX limit
2009-11-05 04:56:47 +01:00
Lennart Poettering
168be3830a use pa_fopen_cloexec() where applicable 2009-10-30 04:54:19 +01:00
Lennart Poettering
65e7bc18a9 use cloexec wrappers wherever applicable 2009-10-30 03:32:38 +01:00
Lennart Poettering
f27a50691c libpulse: introduce PA_STREAM_RELATIVE_VOLUME 2009-10-29 00:46:22 +01:00
Lennart Poettering
2501687579 libpulse: explain semantics of pa_stream_connect_playback() in more detail 2009-10-28 23:47:50 +01:00
Lennart Poettering
4538523a29 libpulse: introduce pa_context_get_tile_size() call 2009-10-28 23:26:48 +01:00
Lennart Poettering
c9375aa5e9 libpulse: add missing includes 2009-10-12 21:21:26 +02:00
Colin Guthrie
0ff2a6b434 device-manager: Rather than flagging the device as available, just include the sink/source index with PA_INVALID_INDEX meaning unavailable 2009-10-10 15:45:49 +01:00
Lennart Poettering
d0b478e9a6 Merge remote branch 'coling/history' 2009-10-07 03:46:06 +02:00
Tanu Kaskinen
019331d25b Merge branch 'master' into dbus-work
Conflicts:
	src/daemon/daemon-conf.c
2009-10-02 17:24:44 +03:00
Colin Guthrie
f9b2d6500b device-manager: Change the prefer/defer options to a single 'reorder' command.
We put in the devices from the wire into a hashmap and then add all like type device in the database
and then order them based on priority (with the ones specified on the wire always being in that order at
the top of the list.
2009-10-01 09:08:32 +01:00
Colin Guthrie
8b2cc4def3 device-manager: Expose the priority lists in the protocol extension.
Also leave space for 'icon' and 'available' details too, althought currently this info is dummy.
2009-10-01 09:08:32 +01:00
Colin Guthrie
f8ec8f382f device-manager: Change the write function to a rename function.
The structure itself will contain various bits of info so exposing this fully to the client is a bad idea.
By keeping to a rename operation we keep what we do store abstracted from the clients.

Also fix some doxy comments.
2009-10-01 09:08:29 +01:00
Colin Guthrie
aebe4787f2 device-manager: Provide a method for prefering/defering a device.
This allows clients to edit the priroity order. What is not yet in place is the initialisation of that priority list
when new devices are detected or the cleaning (remove holes) when devices are removed.

In order to keep the storage transparent I will likely remove the write functionality and replace it with a
simple rename method.

I also still need to expose the priority itself when reading the data.
2009-10-01 09:08:29 +01:00
Colin Guthrie
103897a1e3 device-manager: Provide a way for clients to enable/disable role-based device-priority routing.
The routing logic itself does not yet exist, but the command currently will unload/load module-stream-restore as approriate.
(module-stream-restore would conflict with the role-based priority-routing).
2009-10-01 09:08:29 +01:00
Colin Guthrie
9357bdf4e7 device-manager: Update docs version -> 0.9.19 (predicted) 2009-10-01 09:08:29 +01:00
Colin Guthrie
464e1a8986 device-manager: Fix copy+paste leftover 2009-10-01 09:08:29 +01:00
Colin Guthrie
37e82cec0a device-manager: Add an untested protocol extension.
This is effectively copied from the stream restore extension.
2009-10-01 09:08:28 +01:00
Colin Guthrie
8f4940b17a libpulse: Add *_NOFLAGS flags with value 0 for various enums
This avoids the need for ugly casting in client implementations.
2009-09-22 18:43:03 +01:00
Lennart Poettering
f84d755d6a mainloop: fix detection of rt clocks 2009-09-18 22:16:25 +02:00
Lennart Poettering
d6291511a2 mainloop: pass monotonic times back to user if he passed monotonic times to us 2009-09-18 04:21:01 +02:00