Commit graph

8084 commits

Author SHA1 Message Date
Ross Burton
c25b06577c git-version-gen: Avoid further processing when tarball-version is present
In case a tarball-version file is present, use that and quit.

Otherwise git will continue looking for directories, potentially
finding .git directories which are dirty and mark the version as such.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90936
2015-10-20 16:55:23 +02:00
David Henningsson
f277f2c509 pstream: Fix use-after-free in srb_callback
We need to guard the pstream with an extra ref to ensure
it is not destroyed at the time we check whether or not the
srbchannel is destroyed.

Reported-by: Takashi Iwai <tiwai@suse.de>
BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=950487
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-10-20 16:53:32 +02:00
David Henningsson
91313e60a8 module-alsa-card: Report available ports before unavailable ones
In case the same jack causes one port to become available and another
one unavailable, the available should be reported first.

This is to avoid unnecessary changes: e g, consider a 'Headphone Jack'
making 'Headphone' available and 'Speaker' unavailable. In case the
unavailable change triggers first, and there is also a currently available
third port (e g 'Digital out'), the routing system might choose to route
to this port because neither of the 'Speaker' and 'Headphone' ports are
available.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-10-20 13:13:03 +03:00
John Horan
f8cd444de0 make availability of ports visible over dbus 2015-10-19 11:02:44 +02:00
Juho Hämäläinen
2261567758 dbus: Add card profile availability info to API
[diwic: Profile availability to boolean bug fixed]
2015-10-19 10:57:35 +02:00
Julien Isorce
c021bfc6e0 core-util: avoid calling fchmod if already right mode
fchmod is denied in chromium sandbox.
2015-10-19 08:53:40 +05:30
David Henningsson
336a2cc6f0 card: Use pa_xmalloc0 when creating card profiles
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-10-16 22:05:55 +03:00
David Henningsson
12a93495b9 shm: Warn on not being able to open shm files
With the exception of when trying to clean up shm files,
it's useful to warn if opening them fails, regardless of reason.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-09-28 15:41:15 +02:00
David Henningsson
586ea6fcba card: Use pa_xnew0 when creating a card
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-09-28 14:37:49 +02:00
David Henningsson
0284363aa1 client: Use pa_xnew0 when creating a client
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-09-28 14:36:23 +02:00
Tanu Kaskinen
772d655de6 build-sys: fix the default bash completion directory
If bashcompletiondir was empty, the check didn't catch that. As
a result, the symlinks that were supposed to be generated in the
completion directory were created in the root directory.
2015-09-27 17:02:17 +03:00
Ahmed S. Darwish
08959f83d0 build-sys: bootstrap.sh: Do a make only if configure has succeeded
Otherwise the important configure script error messages get buried
by the "make clean" output.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2015-09-25 15:05:43 +03:00
Tanu Kaskinen
e061f9afd2 alsa-mixer: Add "Dock Line Out" jack handling to analog-output-speaker-always
The jack is already in analog-output-speaker, so let's have the same
handling in analog-output-speaker-always too.
2015-09-25 15:05:43 +03:00
Takashi Iwai
4a9916ba15 alsa-mixer: Recognize "Dock Line Out" jack
Some machines provide "Dock Line Out Jack" control that should be
handled like a normal line out.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-25 15:05:43 +03:00
Manish Sogi
ff24ea7695 bluetooth: bluez4: Remove the unused "auto_connect" parameter as it is not used in bluez4
<EP-F69A421D31544C56BDE97C590307C014>
Signed-off-by: Manish Sogi <manish.sogi@samsung.com>
2015-09-25 15:05:43 +03:00
David Henningsson
4a8bf9ab30 alsa-mixer: Add "Mic Boost" and "Line Boost" to analog-input.conf
I'm not sure how much they are needed nowadays with the latest
changes to the subset elimination (I found this while
researching a bug on an older PA version), but I guess they could
be added for consistency at least.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-09-25 15:05:43 +03:00
Ahmed S. Darwish
5d4905ec31 log: Fix compilation error on non-systemd systems
Commit 262bdae0330e used symbols which are only available if systemd
support was compiled in. Fix by using the appropriate #ifdef guards.

Also document the resulting PULSE_LOG_JOURNAL environment variable
behavior if systemd journal support was not compiled in.

[Diwic: changed wording slightly.]

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2015-09-25 15:05:43 +03:00
Ahmed S. Darwish
ac5b7b8d5c log: Introduce PULSE_LOG_JOURNAL environment variable
By introducing such an environment variable, applications using the
PA client libraries can configure these libraries to send their logs
directly to the journal.

While client libraries journal logging can be indirectly achieved
using PULSE_LOG_SYSLOG, this pollutes the journal. Meta data gets
replicated twice: once in the journal meta fields and once in the
syslog(3) plain-text message itself.

For attaching any backtraces, also introduce the PA-specific journal
meta field PULSE_BACKTRACE. This is the recommend journal practice
instead of appending any furuther data to the logging message itself.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2015-09-25 17:29:03 +05:30
Felipe Sateler
c93903d99a pulseaudio.1: document that systemd notification only works without daemonization 2015-09-25 17:29:03 +05:30
Felipe Sateler
ad047c2c79 daemon: Use Type=notify for systemd service
This ensures systemd knows when pulseaudio finishes loading, thus never
marking pulseaudio as active if startup fails.
2015-09-25 17:29:02 +05:30
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