Commit graph

1023 commits

Author SHA1 Message Date
Vincent Becker
84c8b23c7f Fix return value of pa_sndfile_format_from_string
This prevented to use pacat --file-format option correctly
2010-12-18 11:25:09 +00:00
Yang Xichuan
d963b868de core: Fix variable "has_whined" value bug
In the file src/pulsecore/random.c

I found that the log information "Failed to get proper entropy. Falling
back to seeding with current time." would never be printed.

This change corrects the issue.
2010-12-18 11:21:02 +00:00
Colin Guthrie
675cc0ae0b build-sys: Replace dummy Makefiles with proper Makefile.am's
This is needed to better support out of tree builds (including
distcheck) and to ensure the necessary folders are created in the
build tree on configure and also works around an intl-tools bug
(https://bugs.launchpad.net/intltool/+bug/605826)

The Makefile.am's used are minimal (and in some cases completely
blank). At present they do not include anything interesting
with the majority of the real work still done by the monolitic
src/Makefile.am

It may make sense to start splitting out src/Makefile.am into
smaller chunks but this commit makes the minimum changes to address
the issues that result from using make distcheck and other out of
tree builds.

Note: This 'breaks' the ability to type make in e.g. the src/modules
folder and have all of PA rebuilt accordingly (this is because the
static Makefiles previously present just did a "make -C ..") which
was purportedly for use in emacs. But I'm sure there will be a better
and more robust way to configure emacs to do your builds properly if
this behaviour is still desirable.
2010-12-04 13:59:48 +00:00
Arun Raghavan
f6574c8c22 volume: Add explicit checks for ARMv6 instructions
This ensures that the build does not fail if the ssat and pkhbt
instructions are not available (armv5te and below).

Fixes: http://www.pulseaudio.org/ticket/790
2010-11-28 16:58:38 +00:00
Colin Guthrie
352ae22015 sink-input: Fix comment 2010-11-17 21:59:17 +00:00
Colin Guthrie
848dd378bb intended-roles: Mark devices with a form factor of 'headset' as being appropriate for 'phone' streams
This was a result a report by Patrick Ben Koetter relating to his
Logitech Wireless Headset.
2010-10-31 20:33:39 +00:00
David Henningsson
a8d76e99ff SSE/MMX/ARM: Fix high frequency noise with unusual number of channels
In the assembly optimized versions of SSE, a noise could occur when the
number of channels were 3,5,6 or 7. For MMX and ARM, this could occur
when the number of channels were 3.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2010-10-13 14:52:13 +01:00
Colin Guthrie
9109a188cd suspend: Do not assert when checking for device suspended status and a stream is not linked.
When looping through the streams on a given device checking to see if the
stream is 'active' there should be no assert if the stream is not linked, it
should simply be ignored.

This assert can be hit if a sink and a sink input are both created and setup
but the final put calls are left to the end as is done in module-ladspa-sink.

While the order of the calls in module-ladspa-sink could be altered, we should
deal gracefully with the way it is now and not complain about ending up
in this state.

A trigger case was trivial:
 1. Load a ladspa-sink.
 2. Play a stream and move it to it.
 3. Unload the module, then reload it.
 4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks
    will ultimately hit this assert.

Thanks to Kim Therkelsen for highlighting this issue.
2010-10-05 10:13:53 +01:00
Colin Guthrie
165cb87c38 x11: Use the default screen for X11 properties.
This commit restores the functionality originally included in 65e807
by Leszek Koltunski.
2010-09-18 11:38:44 +01:00
Colin Guthrie
5c0bc09180 xcb: xcb_get_setup() can return 0, so make sure we check it before using 2010-09-18 10:37:11 +01:00
Wim Taymans
3d9b710bea smoother: avoid losing precision
Avoid losing precision by subtracting uint64 values before converting them to
doubles.
2010-09-14 08:35:52 +01:00
Colin Guthrie
2b88634671 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
2010-08-15 21:41:52 +01:00
Lennart Poettering
bc7314f14e thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-03 13:28:39 +02:00
Jez Austin
e8b83fa7c6 socket-client: properly handle asyncns failures
We fail to detect when people disable IPv6 in there kernels. This patch
makes sure we don't ignore this error condition.

http://pulseaudio.org/ticket/752
https://bugzilla.mozilla.org/show_bug.cgi?id=533470
http://bugs.freedesktop.org/show_bug.cgi?id=25742
2010-03-22 16:12:27 +01:00
Kees Cook
d3efa43d85 core-util: ensure that we chmod only the dir we ourselves created 2010-03-04 04:17:23 +01:00
Lennart Poettering
0d1154d078 core: rework how stream volumes affect sink volumes 2010-02-23 18:44:35 +01:00
Lennart Poettering
30f28ebf36 esd,simple: use pa_memblockq_pop_missing()
We need to use pa_memblockq_pop_missing() for all request handling,
including the initial request, because otherwise the counters will be
stay off during the entire runtime.

This should fix:

https://bugzilla.redhat.com/show_bug.cgi?id=559467
2010-02-23 00:48:35 +01:00
Lennart Poettering
195069c181 core-util: introduce generic function pa_strip() 2010-02-22 05:06:39 +01:00
Lennart Poettering
4a32103d84 native: improve logging for buffer_attrs 2010-02-22 03:40:29 +01:00
Lennart Poettering
f9b9579cf4 scache: when playing a sample from the cache make sure not queue them up when the sink is suspended
libcanberra already sets the appropriate flags for uncached sample
streams, we now need to make sure to set them for cached samples too.
2010-02-21 17:36:52 +01:00
Lennart Poettering
180589511d sample-cache: use the sample name as unmodified fallback in the properties when playing a sample from the cache 2010-02-21 17:36:51 +01:00
Lennart Poettering
dfe27f6237 shm: don't complain about missing SHM segments
If two clients try to cleanup the SHM directory at the same time, they
might want to open and then delete the same segment at the same time, in
which case one client might win, the other one lose. In this case, don't
warn about ENOENT.
2010-02-19 03:29:36 +01:00
Lennart Poettering
5e2af2d3f3 fdsem: be more verbose when reading from eventfd fails.
Apperently reading from an eventfd can fail, which results in an assert
to be hit. I am not sure about the reason for the failure, but in
attempt to track down the issue the next time is hit this prints a more
useful log message.

https://bugzilla.redhat.com/attachment.cgi?id=386380
2010-02-16 03:36:44 +01:00
Lennart Poettering
96592c2115 dbus: first restart timer, then dispatch it
This makes sure that we don't access the timer after it might have been
destroyed already from the dbus timeout callback.

https://bugzilla.redhat.com/attachment.cgi?id=389952
2010-02-16 02:49:44 +01:00
Colin Guthrie
a631beeafb core: Fix macro typo - PA_SINK_IS_LINKED -> PA_SINK_INPUT_IS_LINKED 2010-02-09 22:01:08 +00:00
Lennart Poettering
84782f24c5 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-01-18 01:33:04 +01:00
Daniel T Chen
fd5c802ecb 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>
2010-01-15 01:35:54 +01:00
Daniel T Chen
09c416e11f 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>
2010-01-15 01:35:35 +01:00
Lennart Poettering
170812755e cpu: check for CMOV flag before using this intsruction in assembly
http://pulseaudio.org/ticket/776
2010-01-13 20:31:17 +01:00
Lennart Poettering
21b484e056 log: add an easy way to disable log rate limiting
Should help with debuggin bugs like:

https://bugzilla.redhat.com/show_bug.cgi?id=554405
2010-01-13 17:35:04 +01:00
Lennart Poettering
73ae1fce00 once: make once related variables volatile 2010-01-12 23:03:04 +01:00
Lennart Poettering
3eed219a50 core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
2010-01-08 21:51:30 +01:00
Lennart Poettering
8d356659e6 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-01-08 20:07:34 +01:00
Lennart Poettering
2c12df9001 core: make cpuid code compile cleanly with 32bit PIC 2009-11-11 05:27:19 +01:00
Lennart Poettering
ed5af775b1 core: adjust volume only when there is actually a memory block
Fixes an assert that is hit in somne niche cases:

https://bugzilla.redhat.com/show_bug.cgi?id=533482
2009-11-11 05:27:10 +01:00
Wim Taymans
9ad567167e protocol: use the right sample rate for sources
Use the correct sample rate for reporting about the timing.
2009-11-11 05:27:04 +01:00
Lennart Poettering
1460374c06 core-util: add call to detect if we are called from within a VM 2009-11-11 05:26:16 +01:00
Wim Taymans
973a4ebdba sink: simplify silence checks 2009-11-11 05:14:56 +01:00
Lennart Poettering
732b468d66 protocol-native: if a client set volume/mute/device store it since it is user input 2009-11-11 05:14:04 +01:00
Lennart Poettering
0c31723a8b protocol-native: declare that user configured volumes are always absolute 2009-11-11 05:13:28 +01:00
Diego Elio 'Flameeyes' Pettenò
8d612d5142 Fix build when using -fweb, accept both register and memory constraints.
This was reported as Gentoo bug #287391 by Torsten Kaiser, and the fix was
suggested by Mike Frysinger.
2009-11-11 05:12:28 +01:00
Wim Taymans
cc1e90f94b svolume: fix MMX error
We need to sign extend the lower part of the multiplication before adding it to
the higher part. Makes -1 * 0xffff work again.
2009-10-30 09:07:00 +00:00
Wim Taymans
5eecd8ea7d svolume: tweak constraints for 32 bits
Tweak the constraints a little so that register starved 32bit systems
can select a stack variable for the channel paramter instead of reusing one of
the registers we're using in the code.
2009-09-23 17:18:20 +02:00
Lennart Poettering
e7686a607d core: dump proplist when creating stream similar to how we already to it for sinks/sources 2009-09-20 03:18:03 +02:00
Lennart Poettering
996051ebc1 memtrap: properly add items to linked list 2009-09-19 00:21:34 +02:00
Lennart Poettering
8ad8e393f1 namereg: choose default sink/source as soon as one becomes available 2009-09-18 22:42:37 +02:00
Lennart Poettering
9697c5dc18 memblock: don't try to reuse PA_MEMBLOCK_APPENDED memblocks since they usually are much bigger than we want them 2009-09-18 22:16:26 +02:00
Lennart Poettering
cd5d6e7b42 socket-client: modernizations 2009-09-18 22:16:25 +02:00
Lennart Poettering
c010172c66 memblock: modernizations 2009-09-18 22:16:25 +02:00
Lennart Poettering
c024aeaae9 timeval: make timeval conversion routines handle PA_USEC_INVALID special 2009-09-18 04:14:39 +02:00