Commit graph

5223 commits

Author SHA1 Message Date
Lennart Poettering
21250ff1a7 bluetooth: destruct stream only if it is not already destructed
https://bugzilla.redhat.com/show_bug.cgi?id=551842
2010-02-09 22:29:56 +00:00
Lennart Poettering
345547853b core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
2010-02-09 22:29:38 +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
Lennart Poettering
5e2a80c7e3 bump soname 2010-02-09 22:16:05 +00:00
Lennart Poettering
63abcc8330 build-sys: bump soname 2010-02-09 22:12:16 +00:00
Colin Guthrie
cd559553a0 core: Fix macro typo - PA_SINK_IS_LINKED -> PA_SINK_INPUT_IS_LINKED 2010-02-09 21:59:55 +00:00
Colin Guthrie
6fd2d08758 stream-restore: Clear the save_sink/save_source flags on apply_entry.
If the user specifically removes the device element from the stream
restore rule, we have to clear the save_sink/save_source flag of the
stream. This means that other stream routing systems
(e.g. module-device-manager) can take over routing for this
stream. In order to facilitate the reapplication of other routing
rules, we fire a stream change event. Arguably the stream itself
has not changed, but the rules governing its routing have, so
I feel this is justified.
2010-02-05 15:12:19 +00:00
Daniel Mack
2f86ba4fc2 osx: don't build the once-test binary on OS X
OS X lacks the barrier pthread APIs
2010-02-02 12:01:17 +01: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
Paul Menzel
0ac13f17ba man pages: correct formatting/markup of options 2010-02-02 09:01:32 +01:00
Lennart Poettering
f250179b4e shm: explicitly mark shm seg for MAP_NORESERVE to request overcommiting no matter what 2010-02-02 09:01:04 +01:00
Paul Menzel
ea8927f1d4 Typo. s/a/are/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2010-01-21 14:49:28 +00:00
Lennart Poettering
62bfb511f6 client: include dolby channel names in comments 2010-01-14 21:32:26 +01:00
Lennart Poettering
1bfa1c3b03 start: we don't need to check for $PULSE_SERVER anymore
pulseaudio --start does that internally anyway, so we can get rid of
this here.
2010-01-14 20:33:40 +01:00
Lennart Poettering
2465cfac61 native: when run in system mode, do not look for fallback port 2010-01-14 00:15:51 +01:00
Lennart Poettering
76089b11eb native: fallback to another port if the default port is taken
Unless the port number is explicitly configured we will now fallback to
a kernel picked port if the one we'd like by default we cannot get.

http://pulseaudio.org/ticket/773
2010-01-14 00:13:13 +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
4b1679e06d Merge remote branch 'tanuk/fixes' 2010-01-13 21:33:11 +01:00
Lennart Poettering
ba255bfc42 tests: add pa_once_xxx() test 2010-01-13 17:40:31 +01:00
Tanu Kaskinen
f1d1447e10 daemon: Don't autospawn if a server address is explicitly configured. 2010-01-09 12:43:05 +02:00
Tanu Kaskinen
25435bf373 sink-input: Replace a tab indentation with spaces. 2010-01-06 11:03:19 +02:00
Tanu Kaskinen
cc82553d7e idxset: Fix _get_by_data() comment. 2010-01-06 10:48:32 +02:00
huan zheng
aa9348441d core: volume ramping fix
Hi,
I found that volume ramping is inside PA now.
there's a minor fix here, it is a bug i found after the patch is submitted:

line 1781 of sink-input.c :
if ((i->thread_info.ramp_info.envelope_dying - nbytes) <= 0) {
need to be changed to
if ((i->thread_info.ramp_info.envelope_dying - (ssize_t) nbytes) <= 0) {

otherwise this argument will never be negative since nbytes is of type
size_t which is unsigned.
Please change it when you have time, sorry if bring any inconvenience.  :)
2010-01-06 00:22:23 +01:00
Lennart Poettering
6dfb1ee27e Merge remote branch 'zonque/topic/osx' 2010-01-05 22:52:57 +01:00
Daniel Mack
937c587e77 fix a number of warnings
most of them were due to missing #ifdefs or wrong printf format type for
[s]size_t.
2010-01-05 22:46:13 +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
Pierre-Louis Bossart
0e47065fe5 Subject: rtpoll: better support for DEBUG_TIMING logs
On all the platforms I tested, PulseAudio is frequently awaken and
doesn't sleep for the duration specified for the poll timeout.
Sometimes wake-ups occur within milliseconds of the poll call for no
good reason; this seems to be related to ALSA issues (see my posts on
the ALSA mailing list on null poll events).
This patch enables a better log of requested sleep times v. actual
sleep times. Enable DEBUG_TIMING to see actual messages. Please let me
know if you see odd behaviors like the one below
- Pierre

E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 188 ms
E: rtpoll.c: Process time 0 ms; sleep time 48 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 139 ms
E: rtpoll.c: Process time 0 ms; sleep time 49 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 189 ms
E: rtpoll.c: Process time 0 ms; sleep time 0 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 189 ms
E: rtpoll.c: Process time 0 ms; sleep time 49 ms
2010-01-05 21:27:25 +01:00
chocolateboy
a282eadb88 Fix typo in log message: s/may no be/may not be/
Hi, Lennart.

Spotted another typo. Patch attached.

Best wishes,
chocolateboy.
2010-01-05 20:33:35 +01:00
David Kågedal
cb38d4eba1 alsa: add profile set for M-Audio FastTrack Pro USB 2010-01-05 20:14:11 +01:00
Daniel T Chen
d3c71c92ce udev: Use SOUND_CLASS instead of SOUND_FORM_FACTOR when checking for modem
The fact whether an ALSA card is a modem is stored in the SOUND_CLASS,
not the SOUND_FORM_FACTOR property. So read it from there.

Patch from Whoopie.
2010-01-05 20:00:22 +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 T Chen
a63cf050b0 More src/pulsecore/cpu-arm.c FTBFS fixes
Fix missing argument to pa_read(), and be consistent with declaration of
state variable in pa_cpu_init_arm().

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
2009-12-22 20:38:48 +00:00
Daniel T Chen
e5e432fe0a Fix the following warnings (which now cause buildd failures in Ubuntu 10.04):
pulsecore/cpu-arm.c: In function 'get_cpuinfo':
pulsecore/cpu-arm.c:70: warning: implicit declaration of function 'pa_read' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:72: warning: implicit declaration of function 'pa_close' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c: In function 'pa_cpu_init_arm':
pulsecore/cpu-arm.c:110: warning: implicit declaration of function 'pa_split_spaces' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:110: warning: assignment makes pointer from integer without a cast
Function `pa_split_spaces' implicitly converted to pointer at pulsecore/cpu-arm.c:110

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
2009-12-22 20:38:40 +00:00
Daniel Mack
f452c6cdd9 fix a number of warnings
most of them were due to missing #ifdefs or wrong printf format type for
[s]size_t.
2009-12-16 16:11:40 +08:00
Daniel Mack
0ccc7afcd8 osx: add native zeroconf implementation via Bonjour
Avahi and dbus is too heavy for OSX just for the sake of publishing our
services via mDNS/Zeroconf. Apple has its own Zeroconf implementation
called Bonjour, and this patch adds a module that implements service
announcement with that API.

All data gathering is copied from module-zeroconf-publish.c, but
unfortunately the code there is too specifically made for avahi, so I
couldn't factor it out to reuse it.
2009-12-16 16:11:39 +08:00
Daniel Mack
7732421a27 CoreAudio: add audio device module
This patch adds support for CoreAudio driven devices under Mac OS X. It
is typically instanciated by the CoreAudio device detection module and
handles all available streams on a specific device.

Sinks are created according to the reported stream configuration.
Float32 is used as default audio sample format at it is the only format
CoreAudio speaks natively.

Hardware volume control is not implemented yet.
2009-12-16 16:11:39 +08:00
Daniel Mack
a23f5cf33d CoreAudio: add device detection module
This adds a new module for CoreAudio device detection. It registers a
callback to detect hotplugged devices and creates/destroys modules named
'module-coreaudio-device'. Devices are identified via a system-wide
unique AudioDeviceID.
2009-12-16 16:11:38 +08:00
Daniel Mack
28a73ad120 hack around another OS X bug: recv() with MSG_PEEK does not work
At least for pipes, recv() with MSG_PEEK does actually eat up data from
file descriptors. Hence, this can't be used for PULLHUP emulation.

Use another ioctl hack for that.
2009-12-16 16:11:38 +08: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
Kim Lester
962164a3b7 src/Makefile.am: add specific OS_IS_DARWIN files
Signed-off-by: Kim Lester <kim@dfusion.com.au>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-12-09 06:31:07 +08:00
Daniel Mack
a46ddfebb5 core-rtclock.c: tweak OS_IS_DARWIN constraints
Move the code for OS_IS_DARWIN to the top as on Darwin,
HAVE_CLOCK_GETTIME is also defined.
2009-12-09 06:31:07 +08:00
Kim Lester
76acaa964e configure.ac: add DARWIN_OS variable
Signed-off-by: Kim Lester <kim@dfusion.com.au>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-12-09 06:31:03 +08:00
Daniel Mack
f9b03d3a44 Merge branch 'master' of git://0pointer.de/pulseaudio 2009-12-06 15:53:36 +01:00
Arun Raghavan
e8a5746f2f Add a configure option to change 'udevrulesdir'
This patch serves two purposes:

  1) Allows something other than the de-facto standard udev rules dir or
     /lib/udev/rules.d to be used (the udev build system allows you to
     customise this)

  2) Allows a prefixed, non-root install (right now, the /lib/... path
     is hard-coded into the build system
2009-12-06 11:51:24 +00: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
f42022a7d3 stream-restore: At startup, create dbus entries only for valid database entries. 2009-12-03 21:50:20 +00:00
Tanu Kaskinen
00debf4243 stream-restore: Add a missing pa_xnew0() call in handle_add_entry(). 2009-12-03 21:50:19 +00:00
Tanu Kaskinen
a6b7ac6826 stream-restore: Fix a few assertion misuses with the D-Bus code. 2009-12-03 21:50:19 +00:00