Commit graph

8064 commits

Author SHA1 Message Date
Deepak Srivastava
2d5eec2d2c Rename functions with "tostring" in the name to one with "to_string" to conform with the convention.
component: core

<EP-E358F00C1D9A449EAE69225B9D2530F8>
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=88833

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
2015-09-25 17:29:02 +05:30
Peter Meerwald
bb88d90950 core: Fallbacks for machine-id in filesystem
see https://bugs.freedesktop.org/show_bug.cgi?id=88834

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-09-25 17:29:02 +05:30
Shawn Walker
b727dd540b build-sys: don't use the nodelete linker flag on executables
The nodelete flag indicates that we don't want our libraries to be
unloaded. It's only relevant on libraries, so let's not use it for
executables. Trying to use it on executables breaks things on some
platforms.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90878
2015-09-25 17:29:02 +05:30
Arun Raghavan
69a5d4913c Update NEWS for 7.0 release 2015-09-24 08:57:04 +05:30
Dušan Kazik
6003f3a471 i18n: Update Slovak translation 2015-09-23 13:21:41 +05:30
Michael Cree
392060d0fc tests: Fix test-suite failure on Alpha
Pulseaudio fails to build on the Alpha architecture due to a failure
in the volume-test of the test suite.  I had reported this to the
Debian bug tracker [1] but the maintainer has asked that I forward the
patch to this mail list.  The failure in volume-test occurs because it
is compiled with -ffast-math which implies -ffinite-math-only of which
the gcc manual states that it optimizes for floating-point arithmetic
with the assumption that arguments and results are not NaNs or
+/-infinity, and futher notes that it may result in incorrect output.
On the Alpha platform that is somewhat an understatement as the use of
non-finite floating-point arithmetic with -ffinite-math-only results in
a floating-point exception and the termination of the program.

The volume-test converts volumes into decibels (so a zero volume
becomes a negative infinity) and proceeds to add two volumes (in
decibels), thus does arithmetic with non-finite floating point numbers
despite being compiled with -ffast-math!

I attach a patch that protects against the arithmetic with non-finite
numbers for your consideration.  With that patch the test-suite passes
on Alpha.

Cheers
Michael.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798248
2015-09-17 08:12:49 +02:00
Arun Raghavan
76e2cec9a2 lfe-filter: Deal with empty input chunks
It is possible that we get a zero-length memchunk to work with.
Specifically, this happens the resampler (which is called before the
lfe-filter) consumes all the input data, but does not (yet) produce any
output data.

Reproduced using:

  pulseaudio --resample-method=soxr-mq
  pactl load-module module-null-sink sink_name=lfe_test channels=3 channel_map=front-left,front-right,lfe
  paplay --raw /dev/zero --rate=48000 -d lfe_test

Thanks to the original reporter for the backtrace:

Bug: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1496577
2015-09-17 08:10:44 +02:00
Peter Meerwald
3193f6a2c4 modules: Fix entry leak in module-card-restore
CID 1323585

entry_read() allocates an entry which must be freed
2015-09-16 08:10:35 +02:00
Peter Meerwald
d36baaf81e core: Add missing return on protocol error
CID 1323582

when a protocol error occors, better bail out :)
2015-09-16 08:05:52 +02:00
Peter Meerwald
cadbb2b315 daemon: No need to check optarg, -p requires argument
CID 1323589

getopt() makes sure that we have an argument for -p
remove the broken check for optarg being set
2015-09-16 08:03:48 +02:00
Alexander E. Patrakov
c7310f8e37 loopback: Fix the obviously-wrong "buffer+=buffer" logic
Originally pointed out by Georg Chini.

Calculating buffer = buffer + (send_counter - recv_counter)
in one branch and buffer = 2 * buffer - (recv_counter - send_counter)
looks very obviously wrong. In other words, before the patch, the
contribution from the previous lines was double-counted.
2015-09-13 19:24:10 +03:00
Tanu Kaskinen
11d22f97cf build-sys: add sb-omni-surround-5.1.conf to Makefile.am
This is needed to get the file included in the release tarballs.
2015-09-12 16:42:43 +03:00
Tanu Kaskinen
4c964d8074 build-sys: bump sonames
There were a couple of bug fixes to libpulse since 6.99.1.
2015-09-12 16:23:03 +03:00
Felipe Sateler
2a1d876b1c sink, source: Do not dereference freed memory when freeing the next events
Coverity IDs: 1138197, 1138196
2015-09-12 16:09:24 +03:00
Felipe Sateler
b42575e183 util: pa_get_fqdn: always free addrinfo
Also fix the return error code check of getaddrinfo call

Coverity ID: 1323587
2015-09-12 16:04:20 +03:00
Piotr Drąg
195960859c i18n: Update Polish translation 2015-09-12 15:52:59 +03:00
Felipe Sateler
c49c9bd3aa Fix return code check of pa_append_to_home_dir
It returns negative on error, zero on success.

Found by coverity
2015-09-11 14:22:15 +03:00
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