Commit graph

8247 commits

Author SHA1 Message Date
Zavadovsky Yan
5271f28145 build-sys: fix order of libraries installation
Libraries from modlibexec_LTLIBRARIES list require
not only libpulsecommon but also libpulse and
libpulsecore from lib_LTLIBRARIES list.

This patch fix race in 'make -j X install' (with X is 2 and more)
when building/installing inside chroot placed on RAM-disk(tmpfs).

Signed-off-by: Zavadovsky Yan <zavadovsky.yan@gmail.com>
2015-09-10 16:09:55 +03:00
David Henningsson
a527711528 module: Always remove freed module from modules_pending_unload
pa_module_free is called from more than one place, not all of
these places correctly removed the module from the
modules_pending_unload array, potentially causing a dangling pointer
in that array.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-09-07 14:59:57 +02:00
Tanu Kaskinen
83de5a0995 core-util: include xlocale.h when using strtod_l()
Based on some googling, strtod_l() is defined in xlocale.h on BSD.
Glibc seems to define it in stdlib.h, but only if GNU extensions are
enabled (otherwise the function won't be available). So, this patch
should fix the use of strtod_l() on BSDs, but on other systems things
may or may not be still broken.

The original patch author is Jakob Fink <jfink@gmx.at>. He sent this
patch to the freebsd-gnome mailing list:
http://lists.freebsd.org/pipermail/freebsd-gnome/2015-April/032138.html

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90285
2015-09-07 14:54:31 +02:00
Tanu Kaskinen
27d71c00d8 build-sys: check strtod_l instead of strtof_l
We have no strtof_l calls in the code, so it doesn't make sense to
check that function's availability. We have one strtod_l call, so
let's check that instead.

I don't know if this change makes any practical difference. I just
wondered why we had HAVE_STRTOF_L ifdefs in core-util.c for code that
didn't use strtof_l.
2015-09-07 14:54:27 +02:00
Tanu Kaskinen
031ca87821 alsa-mixer: sb-omni-surround-5.1.conf: remove analog-surround-40 mapping
It was reported that the 4.0 mode doesn't work properly:
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23677/focus=23904
2015-08-28 08:27:03 +03:00
Tanu Kaskinen
9083750fc8 alsa-mixer: sb-omni-surround-5.1.conf: rename analog-stereo to analog-stereo-output
The mapping is only useful for output, and this renaming makes the
name symmetric with the input mapping.
2015-08-28 08:26:48 +03:00
Nazar Mokrynskyi
b7744e5004 alsa-mixer: Add support for Creative SoundBlaster Omni Surround 5.1 USB sound card
Mic and Line in inputs were not working at all, since they use the
hw:x,1,0 device, which is not supported in the default configuration.
2015-08-28 08:26:39 +03:00
Tanu Kaskinen
a3a54bf2e6 update NEWS for 7.0 2015-08-27 20:48:46 +03:00
Tanu Kaskinen
8f53a32a8c build-sys: bump sonames
In this release cycle, libpulse had some internal code changes, but no ABI
changes.

libpulse-simple and libpulse-mainloop-glib had no changes whatsoever.
2015-08-27 20:48:41 +03:00
Arun Raghavan
f506203fcd alsa: Clarify potentially confusing device port data field
The meaning of the code is unchanged here, but it is clearer that the
PA_DEVICE_PORT_DATA field is a struct ucm_port pointer.
2015-08-25 21:12:05 +05:30
Arun Raghavan
5071960bf3 alsa-mixer: Drop redundant conditional frees
The dynarrays are allocated unconditionally, so the free need not be
conditional.
2015-08-25 19:27:58 +05:30
Tanu Kaskinen
38e81f4c3d ucm: Add support for "JackHWMute"
JackHWMute is used to list devices that get forcibly muted by
a particular jack. We mark ports unavailable based on that
information.
2015-08-21 14:33:11 +03:00
Tanu Kaskinen
d2bed5332a ucm: Create only one jack object per kcontrol
Previously the UCM code created one jack object per device name (which
is not the same thing as creating one jack object per device, because
the UCM device namespace is scoped on per-verb basis, so devices in
different verbs may have the same name). I think it's conceptually
cleaner to create one jack object per alsa kcontrol. I plan to do
similar refactoring on the traditional mixer code later.
2015-08-21 14:33:11 +03:00
Tanu Kaskinen
c9557e6969 alsa: Move UCM port availability updating to the mixer code
Previously module-alsa-card assigned to pa_alsa_jack.plugged_in
directly, and then did the port availability updating manually. The
idea of pa_alsa_jack_set_plugged_in() is to move the availability
updating to the mixer infrastructure, where it really belongs.

Similarly, pa_alsa_jack.has_control was previously modified directly
from several places. The has_control field affects the port
availability, and pa_alsa_jack_set_has_control() takes care of
updating the availability.

For now, pa_alsa_jack_set_plugged_in() and
pa_alsa_jack_set_has_control() only update the port availability
when using UCM. My plan is to adapt the traditional mixer code later.
2015-08-21 14:33:11 +03:00
Tanu Kaskinen
40714b6bcc alsa: Add associations between jacks, UCM devices and UCM ports
These associations will be used by subsequent UCM jack detection
refactoring work.
2015-08-21 14:33:10 +03:00
Tanu Kaskinen
d7ce78b234 ucm: Don't create separate input and output jacks
The UCM spec doesn't support separate input and output jacks, so it's
redundant to have separate input and output jacks in
pa_alsa_ucm_device.
2015-08-21 14:33:10 +03:00
Tanu Kaskinen
f5fecff0b4 alsa: Add pa_alsa_jack_new() and pa_alsa_jack_free()
This reduces code duplication in alsa-mixer.c and alsa-ucm.c. No
functional changes.
2015-08-21 14:33:10 +03:00
David Henningsson
c50766b52a alsa-mixer: Add "Front Line Out" and "Rear Line Out"
"Front Line Out" was found in the wild on one of the machines we enable.
I figured I could just as well add "Rear Line Out" too, because that's
just as likely to show up.

As a reminder, "Front Line Out" means "a line out jack physically located
on the front side", where as "Line Out Front" means "a line out jack
playing back front left and front right channels in a channel map".

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-08-21 13:28:32 +02:00
Tanu Kaskinen
fc6c9c8810 build-sys: make error message visible
This helps figuring out why bootstrap.sh is failing...

Directing the error message to /dev/null was very strange. I don't
know what the original motivation might have been. My guess is that
it was added unintentionally.
2015-08-21 11:25:29 +03:00
Tanu Kaskinen
74b0fb45e5 alsa-mixer: Add descriptions for analog-stereo-input and analog-stereo-output mappings
These mapping names are used in sb-omni-surround-5.1.conf, which needs
to use separate mappings for input and output, since they are
associated with different alsa devices.
2015-08-21 11:25:26 +03:00
Ahmed S. Darwish
9d6700f66a pulse: Document client libraries logging behavior
Document how to modify the client libraries logging behvaior
using any of the PA-specific environment variables.

Using the PULSE_LOG_* environment variables makes debugging
and tracing PA applications quite easy, thus the need for an
official documentation text.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2015-08-17 15:21:17 +03:00
Deepak Srivastava
a3bf429efd Removed exclamation marks from user-visible messages.
<EP-E358F00C1D9A449EAE69225B9D2530F8>
According to rationale-"http://techbase.kde.org/Projects/Usability/HIG/Exclamation_points" as suggested in reported bug.
Component: misc

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=78563

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
2015-08-14 12:17:02 +03:00
Deepak Srivastava
c37698ddf8 patcl: Error msg from pactl not quite accurate for 'mute' commands
<EP-E358F00C1D9A449EAE69225B9D2530F8>
Updated the error string for mute commands in pactl. If someone forget to specify
the parameter on the commandline the resulting error message isn't quite right.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90117

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
2015-08-12 15:20:46 +02:00
Manish Sogi
1d4715c43f pacmd: Placeholders describing command line options should not have spaces
<EP-F69A421D31544C56BDE97C590307C014>
Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=78565

Signed-off-by: Manish Sogi <manish.sogi@samsung.com>
2015-08-12 12:02:13 +02:00
Shawn Walker
954503d074 modules: Fix struct namespace collision on Solaris 2015-07-29 08:09:41 +05:30
Arun Raghavan
344770389e build-sys: Fix up setting the bash completion dir
This makes setting up the bash completion dir consistent with the other
cases that we need to deal with, and also handles distcheck correctly.
2015-07-29 08:08:41 +05:30
Arun Raghavan
6a12d96233 build-sys: Make echo-cancel use speex cflags/libs conditionally 2015-07-28 09:32:25 +05:30
Arun Raghavan
3e7b6e8cb5 build-sys: Fix distcheck for systemd user unit dir 2015-07-28 09:31:48 +05:30
Tanu Kaskinen
4604af7198 combine-sink: Fix unsafe message handling
This fixes a crash. sink_input_pop_cb() drains the message queue that receives
memchunks from the combine sink thread to avoid requesting more audio too soon.
The same message queue received also SET_REQUESTED_LATENCY messages, which
generate rewind requests. Rewind requests shouldn't be issued in the pop()
callback, doing so results in an assertion error. Therefore, it was not safe to
drain the message queue in the pop() callback, but usually the queue is empty,
so this bug was not immediately detected.

This patch splits the message queue into two queues: audio_inq and control_inq.
audio_inq receives only messages containing memchunks, and control_inq receives
only the SET_REQUESTED_LATENCY messages. The pop() callback only drains the
audio queue, which avoids the rewind requests in the pop() callback.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90489
2015-07-21 20:05:13 +03:00
Deepak Srivastava
8b3b39c7d8 padsp: Avoid possible deadlock. Unlocked i->mainloop before returning from default case.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=91184

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-07-21 16:44:26 +02:00
Manish Sogi
dd084acb28 xen: Resource leak in local function alloc_gref() - alloc_fd and dev_fd
The file descriptors need to be closed in failure cases otherwise resource
leak is there.

Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=91174#c0

Signed-off-by: Manish Sogi <manish.sogi@samsung.com>
2015-07-21 16:40:03 +02:00
David Henningsson
8f12ef901c module: Warn about modules loaded after unload
We have crashes related to modules loaded after unload. This added
warning can provide some information about what that module is,
which in turn can help us solve the crashes, hopefully.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90108
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-06-18 11:01:24 +02:00
Arun Raghavan
aafb56d902 equalizer: Handle underlying sink going away better when autoloaded
Detailed description in fix for module-echo-cancel.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90416
2015-06-12 12:43:18 +05:30
Arun Raghavan
bf7bc1a55f echo-cancel: Handle underlying sink going away better when autoloaded
When we the underlying sink/source goes away, there is an intermediate
state where the asyncmsgqs that we were using for the sink-input and
source-output go away. This is usually okay if the sink-input and
source-output are moved to another device, but can be problematic if we
don't support moving (which is the case when the filter is autoloaded).

This becomes a problem because of the following chain of events:

  * The underlying sink goes away

  * Moving the filter sink-input fails (because it is autloaded)
    * At this point the sink-input has no underlying sink, and thus
      no underlying asyncmsgq
    * This also applies to all sink-inputs connected to the echo-cancel
      module

  * The sink-input is killed, triggering a module unload

  * On unlink, module-rescue-streams tries to move sink-inputs to
    another sink, starting with a START_MOVE message

  * There is no asyncmsgq for the message, so we crash
    * We can't just perform a NULL check for the asyncmsgq, since there
      are state changes we need to effect during the move

To fix this, we pretend to allow the move to the new sink, and then
unlink ourselves *after* the move is complete. This ensures that we
never find ourselves in a position where we need the underlying
sink/asyncmsgq to be present when it is not.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90416
2015-06-12 12:43:18 +05:30
Arun Raghavan
ceae6b1e61 always-sink: Ignore filter sinks
We don't want to count filter sinks towards the list of actual sinks,
since those also need a real underlying sink to exist.
2015-06-12 12:43:18 +05:30
Arun Raghavan
81f7589a3f sink,source: Add a helper function to check whether this is a filter 2015-06-12 12:43:18 +05:30
Arun Raghavan
5adb126259 stream: Support extended API with PULSE_LATENCY_MSEC if possible
This only works in the single-format case (i.e. we know the format
up-front and we're not negotiating).
2015-06-12 12:43:18 +05:30
David Henningsson
a1c4a6916f stream: Check sample spec validity before abiding PULSE_LATENCY_MSEC
In case the sample spec is not known, as can be the case when
pa_stream_new_extended is used, we cannot satisfy the PULSE_LATENCY_MSEC
request.

As a workaround disable being able to use PULSE_LATENCY_MSEC in this case.

Reported-by: Fritsch <fritsch@xbmc.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-06-12 12:43:14 +05:30
David Henningsson
cbc0d5ffcb echo-cancel: Add config.h in adrian-aec.c
This fixes a compiler warning on some platform.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90881
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-06-12 12:42:59 +05:30
Felipe Sateler
cdf847f2f1 man: fix reference to --daemonize option
Even if --daemon is also accepted, --daemonize is the correct name of
the option.
2015-06-11 11:44:19 +05:30
Arun Raghavan
1beec62c2d rescue-streams: Fix a couple of typos 2015-06-10 16:53:07 +05:30
Arun Raghavan
21b912dd2b rescue-streams: Document a cryptic looking condition 2015-06-10 16:53:07 +05:30
David Henningsson
733e4bce5b lfe-filter-test: Use S16NE format
...otherwise this code will fail on big-endian architectures.

Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-06-01 11:05:24 +02:00
Tanu Kaskinen
53b6b9df19 build-sys: add winerrno.h to libpulsecommon_SOURCES 2015-05-30 13:19:52 +03:00
Pierre Ossman
d284d90d5f core: make sure we use the correct win32 socket errno:s
Modern versions of MinGW and Visual Studio provide socket errno
defines that make no sense (no API sets them). Make sure we
continue to use the old WSAE ones that are actually returned by
Windows' socket API.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
2015-05-30 13:14:11 +03:00
Peter Meerwald
1db12f5010 core: Work around -Wlogical-not-parentheses warnings
pulsecore/sink.c: In function 'pa_sink_put':
pulsecore/sink.c:648:53: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0));
                                                     ^

pulsecore/source.c: In function 'pa_source_put':
pulsecore/source.c:599:55: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     pa_assert(!(s->flags & PA_SOURCE_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0));
                                                       ^
rewrite expression to suppress warning:
!(x & MASK) == (y != 0)
<->
!(x & MASK) == !(y == 0)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-27 19:16:38 +02:00
Peter Meerwald
6942e13a36 padsp: Fix wrong condition discovered by -Wlogical-not-parentheses warning
warnings emited by gcc 5.1:

utils/padsp.c: In function 'dsp_trigger':
utils/padsp.c:1902:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
                                       ^
utils/padsp.c: In function 'dsp_cork':
utils/padsp.c:1937:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
                                       ^
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-27 19:16:38 +02:00
Cédric Valmary
f81e97ad05 i18n: add Occitan translation 2015-05-27 13:40:59 +03:00
Ville Skyttä
84dff820ed build-sys: Install bash completion to where bash-completion.pc says
Fall back to the previous /etc/bash_completion.d dir on failures
(either old bash completion or not installed).

changes over Ville Skyttä's patch:
define PKG_CHECK_VAR macro which became available only in pkg-config 0.28

see https://bugs.freedesktop.org/show_bug.cgi?id=88782 and
https://bugs.freedesktop.org/show_bug.cgi?id=89540

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-25 16:20:43 +02:00
Peter Meerwald
a26defed9e biquad: Fix warning, gamma shadows global declaration
pulsecore/filter/biquad.c: In function 'biquad_lowpass':
pulsecore/filter/biquad.c:52:10: warning: declaration of 'gamma' shadows a global declaration [-Wshadow]
pulsecore/filter/biquad.c: In function 'biquad_highpass':
pulsecore/filter/biquad.c:86:10: warning: declaration of 'gamma' shadows a global declaration [-Wshadow]

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-25 16:17:14 +02:00