Commit graph

7157 commits

Author SHA1 Message Date
João Paulo Rechi Vita
ed4d0d989c bluetooth: Fix coding style 2013-07-15 13:08:20 +03:00
João Paulo Rechi Vita
4359647841 bluetooth: Remove unused DBusError 2013-07-15 13:08:16 +03:00
João Paulo Rechi Vita
701d86dca3 module: Fix style 2013-07-15 13:07:09 +03:00
Tanu Kaskinen
705d3c28f2 tunnel: Fix reading state from wrong variable
u->sink->state is not yet updated, so the state must be read from
u->sink->thread_info.state. This makes pausing and resuming of the
smoother happen at the right time.

Thanks to Pierre Ossman for the patch.
2013-07-14 13:39:32 +03:00
Tanu Kaskinen
999b47c099 caps: Fix compilation on Windows
Thanks to Pierre Ossman for the patch.
2013-07-14 13:26:24 +03:00
Pierre Ossman
e55f4edaad alsa: Support ALSA without a use case manager
The ALSA use case manager is a fairly recent addition,
so make sure the ALSA modules can be used on systems that
have an older version of ALSA.
2013-07-11 14:30:06 +03:00
Tanu Kaskinen
d90d99bd38 log: Fix thread name printing
Not all threads have a name.

Thanks to Pierre Ossman for the patch.
2013-07-11 14:15:33 +03:00
Tanu Kaskinen
ada83601f0 module: Fix crash in pa_module_unload_all()
Previously, if there were no modules loaded when the daemon exited,
pa_module_unload_all() would crash due to giving zero count to
pa_xnew().

Thanks to Pierre Ossman for the patch.
2013-07-11 13:35:24 +03:00
Tanu Kaskinen
1ce71cbd82 Revert "resampler: Resample first followed by remapping if have more out channels than in channels"
This reverts commit 30ce3a14e5.

The commit broke the leftover buffer handling, see [1] for more
information.

[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17479/focus=17487
2013-07-10 21:24:04 +03:00
Tanu Kaskinen
8e0e2617fb sink-input: Keep reference ratio up-to-date
The reference ratio should always be kept up-to-date. If the reference
ratio is not updated when the input volume changes, the stale
reference ratio ends up being used as the new input volume when the
input is moved.
2013-07-09 17:40:38 +03:00
Tanu Kaskinen
ee5e245afa Use pa_(c)volume_snprint_verbose() everywhere
All pa_cvolume_snprint(), pa_volume_snprint(),
pa_sw_cvolume_snprint_dB() and pa_sw_volume_snprint_dB() calls have
been replaced with pa_cvolume_snprint_verbose() and
pa_volume_snprint_verbose() calls, making the log output more
informative and the code sometimes simpler.
2013-07-09 17:37:04 +03:00
Tanu Kaskinen
596b2988a5 pulse: Add verbose volume printing functions
For more informative logging.
2013-07-09 17:20:28 +03:00
Mikel Astiz
8c81f4d0bd loopback: Fix cork state not updated after move
The source output and sink inputs should be corked if the corresponding
sink/source is suspended, as handled during module initialization. This
also needs to be handled during stream move, because the suspend state
of the destination sink/source might be different to the previous one.

This fixes the issue with an infinite number of "Requesting rewind due
to end of underrun" traces after a stream move.
2013-07-08 17:53:28 +03:00
Peter Meerwald
736e041980 sconv: avoid multiply in ARM NEON s16->float conversion
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-07-05 09:52:19 +03:00
Peter Meerwald
40c3c117e7 sconv: avoid multiply in ARM NEON float->s16 conversion
optimization idea taken from libavresample

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-07-05 09:38:52 +03:00
Tanu Kaskinen
0e8d26a6a1 channelmap, volume: Don't refer to bool in the public API documentation 2013-07-04 12:35:55 +03:00
Tanu Kaskinen
efcc3ba576 mainloop-test: Use FALSE instead of false for gboolean 2013-07-04 12:33:47 +03:00
poljar (Damir Jelić)
b224716f33 macro: Remove unneeded typedef for pa_bool_t. 2013-07-04 12:26:02 +03:00
poljar (Damir Jelić)
24a0639a21 Revert windows BOOL variables to use TRUE/FALSE instead of true/false 2013-07-04 12:25:56 +03:00
poljar (Damir Jelić)
b358aea89b Revert dbus_bool_t variables to use TRUE/FALSE instead of true/false 2013-07-04 12:25:47 +03:00
poljar (Damir Jelić)
408f0ba783 Fix alignment issues introduced by the pa_bool -> bool conversion 2013-07-04 12:25:40 +03:00
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
Tanu Kaskinen
e9822bfcb0 build-sys: Add native-instruments-traktor-audio2.conf to Makefile.am
Thanks to Jan Steffens for reporting the issue.
2013-07-03 15:22:05 +03:00
Tanu Kaskinen
944ffb0323 device-manager: Refuse to load empty descriptions 2013-07-02 17:49:17 +03:00
David Henningsson
242b8e5fd3 Revert "alsa-mixer: Add a couple of assertions"
This reverts commit 2613e4c747.

Please don't replace correct NULL pointer checks with assertions.
2013-06-28 16:16:22 +02:00
Tanu Kaskinen
67132eea1a device-manager: Add a sanity check for reading entries
There is code elsewhere that assumes that if user_set_description is
true, then the description is non-NULL.
2013-06-28 09:58:07 +03:00
Tanu Kaskinen
491c6a3a0b waveout: Simplify setting the device description 2013-06-28 09:57:05 +03:00
Tanu Kaskinen
2613e4c747 alsa-mixer: Add a couple of assertions
I checked the code to ensure that the assertions hold currently.
2013-06-27 19:18:36 +03:00
Tanu Kaskinen
0f2840f4c6 dynarray: Reimplement with nicer semantics
A dynamic array is a nice simple container, but the old interface
wasn't quite what I wanted it to be. I like GLib's way of providing
the free callback at the container creation time, because that way
the free callback doesn't have to be given every time something is
removed from the array.

The allocation pattern was changed too: instead of increasing the
array size always by 25 when the array gets full, the size gets
doubled now (the lowest non-zero size is still 25).

The array can't store NULL pointers anymore, and pa_dynarray_get() was
changed so that it's forbidden to try to access elements outside the
valid range.

The set of supported operations may seem a bit arbitrary. The
operation set is by no means complete at this point. I have included
only those operations that are required by the current code and some
unpublished code of mine.
2013-06-27 11:45:41 +03:00
Tanu Kaskinen
d00d5b6611 source: Fix an indentation mistake 2013-06-26 21:21:41 +03:00
Tanu Kaskinen
c005ec79f7 object: Initialize allocated memory to zero
This is safer and more convenient for subclasses.
2013-06-25 19:15:48 +03:00
Tanu Kaskinen
a9c3503ee9 device-port: Assert that ports have a description
It's easier to work with the port description if it can be assumed
that it's always non-NULL. I have checked that the current code base
always ensures a non-NULL description.
2013-06-25 19:15:11 +03:00
David Henningsson
8127f8f9c5 protocol-esound/http/simple: Make sure callers can handle iochannel_write changes
With the new behaviour, you will not always get a callback after a
successful write. Make sure the callers can properly handle this.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-06-24 22:11:40 +03:00
poljar (Damir Jelić)
97da92d894 Whitespace cleanup: Remove all multiple newlines
This patch removes all occurrences of double and triple
newlines.

Command used for this:
find .  -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -a -not -name 'adrian-aec.*' -a -not \
        -name reserve.c -a -not -name 'rtkit.*' \
        -exec sed -i -e '/^$/{N;s/^\n$//}' {} \;

Two passes were needed to remove triple newlines.
The excluded files are mirrored files from external sources.
2013-06-24 16:56:24 +03:00
poljar (Damir Jelić)
e95d054e40 Style fix: Remove new lines from opening brackets
This patch replaces every occurrence of ')\n{' with ') {'.

Command used for this:
    find .  -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -a -not -name core-util.c -a -not \
        -name adrian-aec.c -a -not -name g711.c \
        -exec sed -i -e '/)$/{N;s/)\n{$/) {/}' {} \;

The excluded files are mirrored files from external sources.
2013-06-24 16:56:24 +03:00
poljar (Damir Jelić)
cbd274676d Style fix: Add a space between the closing/opening bracket
This patch replaces every occurrence of '){' with ') {'.
The ffmpeg source tree was excluded since it will disappear anyways.

Command used for this:
    find . -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -exec sed -i -e 's/){/) {/' {} \;
2013-06-24 16:56:24 +03:00
poljar (Damir Jelić)
faf991ce22 Style fix: Add a space betwen the if statement and the opening bracket
This patch replaces every occurrence of 'if(' with 'if ('.
The ffmpeg source tree was excluded since it will disappear anyways.

Command used for this:
    find . -type d \( -name ffmpeg \) -prune -o \
            -regex '\(.*\.[hc]\|.*\.cc\)' \
            -exec sed -i -e 's/ if(/ if (/' {} \;
2013-06-24 16:56:24 +03:00
poljar (Damir Jelić)
5e11ea06ef Whitespace cleanup: Fix broken indentation by hand
This patch fixes wrong indentation introduced by the last patch.

This was mostly done with vim-s retab feature.
2013-06-24 16:56:24 +03:00
poljar (Damir Jelić)
aab63a3499 Whitespace cleanup: Remove tabs
This patch removes all tabs hidden inside the source tree and replaces
them with 4 spaces.

Command used for this:
    find . -type d \( -name bluetooth \) -prune -o
    -regex '\(.*\.[hc]\|.*\.cc\)' -a -not -name 'reserve*.[ch]'
    -a -not -name 'gnt*.h' -a -not -name 'adrian*'
    -exec sed -i -e 's/\t/    /g' {} \;

The excluded files are mirrored files from external sources containing
tabs.
2013-06-24 16:56:24 +03:00
Tanu Kaskinen
b41d4bfef1 .gitignore: Add build-aux 2013-06-23 10:31:13 +03:00
Tanu Kaskinen
0587b5aa31 core-util: Fix log message levels
This code is from heftig, but the mistake that I'm fixing here is my
own. Before applying heftig's patch, I downgraded the level of one of
the log messages. I managed to downgrade a different message than what
I intended, so now I'm undoing that mistake.
2013-06-23 10:27:28 +03:00
Tanu Kaskinen
cffcaaec68 log: Fix error message
file_path contains the last tried file name, including the suffix, so
the error message was wrong:

    Tried to open target file '/tmp/test.log.99', '/tmp/test.log.99.1',
    '/tmp/test.log.99.2' ... '/tmp/test.log.99.99', but all failed.
2013-06-20 17:22:28 +03:00
Shuai Fan
b0bf132f8f cli, log: Improve the set-log-target functionality
Add a new log target 'newfile:PATH', and refactoring 'pa_log_target_type'.

Signed-off-by: Shuai Fan <shuai900217@126.com>
2013-06-20 16:34:57 +03:00
Tanu Kaskinen
e05c12f28b bluetooth: Fix too late assertion
u was dereferenced before the assertion that checks that u isn't NULL.
2013-06-19 18:25:56 +03:00
Tanu Kaskinen
0e9baa429e combine: Fix crash in output freeing
The outputs are removed from the idxset before output_free() is
called. Trying to remove them again in output_free(), and asserting
that it should succeed caused crashing whenever outputs were freed.

This bug was introduced in commit
061878b5a4.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=65901
2013-06-19 18:21:36 +03:00
Arun Raghavan
e1e154c737 zeroconf: Fix pa_mainloop_api_once usage
We need the mainloop lock to be taken around pa_mainloop_api_once() to
prevent an assert due to the defer event creation and setting of the
destroy callback not being performed atomically.
2013-06-18 08:20:05 +05:30
Arun Raghavan
9a0dd11342 mainloop: Document need for mainloop lock around pa_mainloop_api_once
This needs us to expose a bit of implementation detail, but this seems
to be the cleanest way without an API change.

The specific problem is that pa_mainloop_api_once() needs to first
create a defer event and then set its destroy callback. If the defer
event is completed before the callback is set, an assert will be
trigerred.
2013-06-18 08:20:05 +05:30
David Henningsson
b2792d7837 pstream: Fixup hangs caused by recent iochannel patch
Now that we don't *always* get a callback after having written
something, make sure we can continue writing as long as it fully
succeeds.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-06-17 08:52:07 +02:00
Arun Raghavan
2c1dceeb58 sink-input: Log format negotiation better
This provides more details on format negotiation success and failure to
make debugging problems easier.
2013-06-15 09:42:57 +05:30
Arun Raghavan
4e05333a93 iochannel: Document modified pa_iochannel_write return value 2013-06-14 17:12:44 +05:30