Ahmed S. Darwish [Sun, 13 Mar 2016 22:00:03 +0000 (00:00 +0200)]
build-sys: Set C language standard to gnu11
Per glibc feature_test_macros(7), setting compiler flags to
-std=c11 (or any c* variant like c99) enforces strict ANSI
mode.
Enforcing strict ANSI makes all declarations under _GNU_SOURCE
unavailable. This leads to build warnings in the form of:
warning: implicit declaration of function ‘syscall’
Thus replace -std=c11 with -std=gnu11
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Sangchul Lee [Tue, 29 Mar 2016 17:21:40 +0000 (02:21 +0900)]
stream-interaction: Fix crash in case of invalid argument for volume
In case of invalid argument for volume, the crash occurs in pa_stream_interaction_done().
pa_xnew() is replaced with pa_xnew0() to fix it.
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Sangchul Lee [Wed, 13 Apr 2016 01:48:44 +0000 (10:48 +0900)]
role-ducking: Add support for ducking group
Now, trigger_roles, ducking_roles and volume can be divided into several groups by slash.
That means each group can be affected by its own volume policy.
If we need to apply ducking volume level differently that is triggered from
each trigger role(s), this feature would be useful for this purpose.
For example, let's assume that tts should take music and video's volume down to 40%
whereas voice_recognition should take those and tts's volume down to 20%.
In this case, the configuration can be written as below.
trigger_roles=tts/voice_recognition ducking_roles=music,video/music,video,tts volume=40%/20%
If one of ducking role is affected by more than two trigger roles simultaneously,
volume of the ducking role will be applied by method of multiplication.
And it works in the same way as before without any slash.
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Nazar Mokrynskyi [Thu, 24 Mar 2016 13:59:23 +0000 (15:59 +0200)]
alsa-mixer: Support for Creative SoundBlaster Omni Surround 5.1 USB sound card with latest firmware
`Mic` is now detected as `Mic-In/Mic Array` (there are 2 microphones physically, nice to se this being understood).
`Line` is now detected as `Line In`.
Removed all output modes except officially supported stereo, 5.1 and stereo S/PDIF.
Also microphone/line in now might be used simultaneously with either output mode, yay!
Muhammet Kara [Sat, 16 Apr 2016 22:08:36 +0000 (01:08 +0300)]
i18n: Updated Turkish translation
Tanu Kaskinen [Tue, 12 Apr 2016 15:56:01 +0000 (18:56 +0300)]
build-sys: build gtk-test only when glib is enabled
gtk-test pulls in libpulse-mainloop-glib as a dependency, and compiling
glib-mainloop.c fails if glib support is disabled.
Milo Casagrande [Mon, 4 Apr 2016 09:27:20 +0000 (11:27 +0200)]
i18n: Update Italian translation
Signed-off-by: Milo Casagrande <milo@milo.name>
Arun Raghavan [Mon, 29 Feb 2016 08:58:58 +0000 (14:28 +0530)]
rtp: Do all receive side rate calculations in sink-input domain
The code was mixing sink and sink input domain rate updates, and that
only works if the rate of the RTP stream is the same as the rate of the
sink. This changes all the calcuations to be on the sink-input rate,
since that's the rate we are trying to guess (and resample for).
YunQiang Su [Sat, 2 Apr 2016 15:01:26 +0000 (18:01 +0300)]
i18n: update Simplified Chinese translation
David Henningsson [Sat, 2 Apr 2016 04:24:18 +0000 (06:24 +0200)]
memblock/pstream: Fix two compiler warnings
Fix two compiler warnings recently introduced by the memfd patch set.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 23:12:18 +0000 (01:12 +0200)]
pstream: Support memfd blocks transport
Now that we have the necessary infrastructure to memexport and
mempimport a memfd memblock, extend that support higher up in the
chain with pstreams.
A PA endpoint can now _transparently_ send a memfd memblock to the
other end by simply calling pa_pstream_send_memblock() – provided
the block's memfd pool was earlier registered with the pstream.
If the pipe does not support memfd transfers, we fall back to
sending the block's full data instead of just its reference.
** Further details:
A single pstream connection usually transfers blocks from multiple
pools including the server's srbchannel mempool, the client's
audio data mempool, and the server's global core mempool.
If these mempools are memfd-backed, we now require registering
them with the pstream before sending any blocks they cover. This
is done to minimize fd passing overhead and avoid fd leaks.
Moreover, to support all these pools without hard-coding their
number or nature in the Pulse communication protocol itself, a new
REGISTER_MEMFD_SHMID command is introduced. That command can be
sent _anytime_ during the pstream's lifetime and is used for
creating on demand SHM ID to memfd mappings.
Suggested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 23:09:39 +0000 (01:09 +0200)]
pulsecore: Specially mark global mempools
Color global mempools with a special mark. This special marking
is needed for handling memfd-backed pools.
To avoid fd leaks, memfd pools are registered with the connection
pstream to create an ID<->memfd mapping on both PA endpoints.
Such memory regions are then always referenced by their IDs and
never by their fds, and so their fds can be safely closed later.
Unfortunately this scheme cannot work with global pools since the
registration ID<->memfd mechanism needs to happen for each newly
connected client, and thus the need for a more special handling.
That is, for the pool's fd to be always open :-(
Almost all mempools are now created on a per-client basis. The
only exception is the pa_core's mempool which is still shared
between all clients of the system.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 23:07:27 +0000 (01:07 +0200)]
memimport: Support memfd blocks
To transfer memfd-backed blocks without passing their fd every time,
thus minimizing overhead and avoiding fd leaks, a command is sent
with the memfd fd as ancil data very early on.
This command has an ID that uniquely identifies the memfd region.
Further memfd block references are then exclusively done using this
ID.
This commit implements the details of such 'permanent' mappings on
the receiving end, using memimport segments.
Suggested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 23:04:18 +0000 (01:04 +0200)]
pulsecore: Introduce memfd support
Memfd is a simple memory sharing mechanism, added by the systemd/kdbus
developers, to share pages between processes in an anonymous, no global
registry needed, no mount-point required, relatively secure, manner.
This patch introduces the necessary building blocks for using memfd
shared memory transfers in PulseAudio.
Memfd support shall also help us in laying out the necessary (but not
yet sufficient) groundwork for application sandboxing, protecting PA
from its clients, and protecting clients data from each other.
We plan to exclusively use memfds, instead of POSIX SHM, on the way
forward.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 23:01:38 +0000 (01:01 +0200)]
SHM: Refactor private allocations
pa_shm_create_rw() is responsible for creating two types of memory:
POSIX shared memory and regular malloc()-ed ones.
A third memory type, memfds, will be added later. Thus to add this
extra shared memory type in a sane manner, refactor private memory
allocations into their own static methods.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 22:57:06 +0000 (00:57 +0200)]
pulsecore: Transform pa_mempool_new() into a factory method
Soon we're going to have three types of memory pools: POSIX shm_open()
pools, memfd memfd_create() ones, and privately malloc()-ed pools.
Thus introduce annotations for the memory types supported and change
pa_mempool_new() into a factory method based on required memory.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 22:53:34 +0000 (00:53 +0200)]
srbchannel: Introduce per-client SHM files
The PA daemon currently uses a single SHM file for all clients
sending and receiving commands over the low-latency srbchannel
mechanism.
To avoid leaks between clients in that case, and to provide the
necessary ground work later for sandboxing and memfds, create the
srbchannel SHM files on a per-client basis.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 22:51:12 +0000 (00:51 +0200)]
pulsecore: Reference count mempools
In future commits, server-wide SHMs will be replaced with per-client
ones that will be dynamically created and freed according to clients
connections open and close.
Meanwhile, current PA design does not guarantee that the per-client
mempool blocks are referenced only by client-specific objects.
Thus reference count the pools and let each memblock inside the pool
itself, or just attached to it, increment the pool's refcount upon
allocation. This way, per-client mempools will only be freed when no
further component in the system holds any references to its blocks.
DiscussionLink: https://goo.gl/qesVMV
Suggested-by: Tanu Kaskinen <tanuk@iki.fi>
Suggested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sat, 12 Mar 2016 22:48:15 +0000 (00:48 +0200)]
pulsecore: Cache daemon shm size inside pa_core
The daemon `shm-size-bytes' configuration value was read, and then
directly used, for creating the initial server-wide SHM files.
This is fine for now, but soon, such server-wide SHMs will be replaced
with per-client SHM files that will be dynamically created and deleted
according to clients open and close. Thus, appropriately cache this
configuration value.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Ahmed S. Darwish [Sun, 13 Mar 2016 21:56:54 +0000 (23:56 +0200)]
log: journal: Prevent duplicate values for CODE_* fields
sd_journal_send() implicitly add fields for the source file,
function name and code line from where it's invoked. As code
location fields CODE_FILE, CODE_LINE and CODE_FUNC are handled
by PA's log module, we do not want the automatic values
supplied by the sd_journal API.
Without suppressing these, both the actual log event source
and the call to sd_journal_send() will be logged:
$ journalctl -b -f -o json-pretty
[...]
CODE_FILE : [ pulsecore/log.c, pulsecore/module.c ],
CODE_LINE : [ 505, 181 ],
MESSAGE : Failed to load module module-gconf
CODE_FUNC : [ pa_log_levelv_meta, pa_module_load ],
[...]
(Commit log adapted from abrt libreport commit
d1eaae97f0287f)
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Georg Chini [Thu, 17 Mar 2016 21:35:08 +0000 (22:35 +0100)]
stream-interaction: interact if a stream starts corked
This patch deals with the case that applications start new streams corked.
In case of module-role-cork it will only mute the stream because corking is
removed later by the application.
Georg Chini [Thu, 17 Mar 2016 21:35:07 +0000 (22:35 +0100)]
role-ducking: use the common code in stream-interaction.c
Georg Chini [Thu, 17 Mar 2016 21:35:06 +0000 (22:35 +0100)]
stream-interaction: add ducking functionality
Georg Chini [Thu, 17 Mar 2016 21:35:05 +0000 (22:35 +0100)]
stream-interaction: Bugfix for improper uncorking behavior with global=1
This patch is based on a recent patch for module-role-ducking from Sangchul Lee
which fixes incorrect behavior when global is set to 1. Original commit can be found
here:
https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=
d049c2941e6aef5ff33bcd0b4adece12289302b7
Tanu Kaskinen [Thu, 10 Mar 2016 17:35:34 +0000 (19:35 +0200)]
filter-apply: fix typo "what" -> "want"
Georg Chini [Thu, 26 Mar 2015 20:54:23 +0000 (21:54 +0100)]
role-cork: more cosmetic changes, changed debug output
Change names of shall_interact() and is_trigger_stream() because the names look
like the functions return a boolean. Simpler debugging output.
Georg Chini [Thu, 26 Mar 2015 20:54:22 +0000 (21:54 +0100)]
role-cork: prepare merge with role-ducking: replace "cork" with "interact" where appropriate
Again, interact includes cork and duck.
Georg Chini [Thu, 26 Mar 2015 20:54:21 +0000 (21:54 +0100)]
role-cork: prepare merge with role-ducking: move most code to stream-interaction.c
Filename suggested by Tanu, as it includes both, cork and duck.
Georg Chini [Thu, 26 Mar 2015 20:54:20 +0000 (21:54 +0100)]
role-cork: remove corking on module exit
While module-role-ducking removes the attenuation when the module exits,
module-role-cork does not remove the corking. Added a function for that.
Georg Chini [Thu, 26 Mar 2015 20:54:19 +0000 (21:54 +0100)]
role-cork: allow cork of all non-trigger streams using cork_roles=any_role
There might be situations where you want to cork all streams that are not
trigger streams. Use cork_roles=any_role to implement this.
Georg Chini [Thu, 26 Mar 2015 20:54:18 +0000 (21:54 +0100)]
role-cork: React to mute/cork of trigger streams and to proplist changes
When a trigger stream changes mute or cork state, the cork streams should
react to this. The same applies if a stream changes its role to or from the
trigger role.
Georg Chini [Thu, 26 Mar 2015 20:54:17 +0000 (21:54 +0100)]
role-cork: Don't ignore streams without media.role
When corking do not ignore streams without media.role. Instead treat
them as if media.role="no_role", so that you can specify "no_role" as
trigger or cork role.
Tanu Kaskinen [Thu, 10 Mar 2016 14:49:30 +0000 (16:49 +0200)]
resampler-test: remove translations
Translators shouldn't be burdened with translating strings in tests.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=94435
Gabor Kelemen [Mon, 7 Mar 2016 21:29:35 +0000 (22:29 +0100)]
Updated Hungarian translation
Tanu Kaskinen [Fri, 4 Mar 2016 13:16:54 +0000 (15:16 +0200)]
card-restore: save the database when shutting down
If u->save_time_event is non-NULL when the module is being unloaded,
it means that there are some changes to the database that haven't
yet been flushed to the disk.
Acked-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 1 Mar 2016 10:41:55 +0000 (11:41 +0100)]
alsa-mixer: refactor element_probe and fix >2 channel bug
By refactoring volume probing into its own function, we can reduce
indentation a lot. Also, if an error occurs during the volume probe,
that volume element is now always skipped (instead of taking down
the entire path with it).
Also, a bug for elements with more than two channels is fixed, as
previously, the volume parsing code was continuing, potentially
referencing somewhere outside the array (which has max two channels).
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 29 Jan 2016 19:33:22 +0000 (20:33 +0100)]
switch-on-port-available: Switch from HDMI to analog; but not the other way around
If you have headphones plugged in and plug in HDMI; you want sound
to stay on headphones.
If you have HDMI plugged in and you plug in headphones; you want sound
to switch to headphones.
Hence we need to take priority into account as well when determining
whether to switch to a new profile or not.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=93903
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Arun Raghavan [Thu, 25 Feb 2016 12:28:38 +0000 (17:58 +0530)]
echo-cancel: Convert AGC API to deal with pa_volume_t
It is expected that the underlying AGC mechanism will likely provide a
single volume for the source rather than a per-channel volume. Dealing
with per-channel volumes just adds complexity with regards to the
actual volume setting (depending on whether volume sharing is enabled or
not, we would set the volume on the source output of the virtual source,
and their sample specs may be different).
Using a single volume allows us to sidestep this problem entirely.
Arun Raghavan [Wed, 17 Feb 2016 14:17:15 +0000 (19:47 +0530)]
echo-cancel: Add beamforming support in the webrtc canceller
Arun Raghavan [Wed, 17 Feb 2016 14:17:14 +0000 (19:47 +0530)]
echo-cancel: Remove pa_ prefix on private functions
Arun Raghavan [Wed, 17 Feb 2016 14:17:13 +0000 (19:47 +0530)]
echo-cancel: Update a copyright notice
Arun Raghavan [Wed, 17 Feb 2016 14:17:12 +0000 (19:47 +0530)]
echo-cancel: Use webrtc's deinterleaved API
This is required to have unequal channel counts on capture in and out
streams, which is needed for beamforming to work. The deinterleaved API
only works with floating point samples.
Arun Raghavan [Wed, 17 Feb 2016 14:17:10 +0000 (19:47 +0530)]
echo-cancel: webrtc canceller supports different in/out channel counts
Needed for upcoming beamforming code.
Arun Raghavan [Wed, 17 Feb 2016 14:17:09 +0000 (19:47 +0530)]
echo-cancel: Improve webrtc canceller error handling a bit
Arun Raghavan [Wed, 17 Feb 2016 14:17:08 +0000 (19:47 +0530)]
echo-cancel: Fix webrtc canceller when rec channels != play channels
The calculations around how many samples were sent to the canceller
engine was not updated when we started supporting different channel
counts for playback and capture.
Arun Raghavan [Wed, 17 Feb 2016 14:17:07 +0000 (19:47 +0530)]
echo-cancel: Make webrtc AGC start volume a modarg
Allows for tuning based on the target hardware.
Arun Raghavan [Wed, 17 Feb 2016 14:17:06 +0000 (19:47 +0530)]
echo-cancel: Use anonymous unions for echo canceller params
Makes this part of the code just a little less verbose.
Arun Raghavan [Wed, 17 Feb 2016 14:17:05 +0000 (19:47 +0530)]
build-sys: Move to compiling with C11 support
This is needed for building with anonymous unions. A bunch of calls to
fail() that used to mysteriously work need fixing -- fail() is a macro
that takes a printf-style message as an argument. Not passing this
somehow worked with the previous compiler flags, but breaks with
-std=c11.
Arun Raghavan [Wed, 17 Feb 2016 14:17:04 +0000 (19:47 +0530)]
echo-cancel: Add a modarg toggle for VAD in the webrtc canceller
Arun Raghavan [Wed, 17 Feb 2016 14:17:03 +0000 (19:47 +0530)]
echo-cancel: Allow enabling of the webrtc experimental AGC mechanism
Arun Raghavan [Wed, 17 Feb 2016 14:17:02 +0000 (19:47 +0530)]
echo-cancel: Start capture at a sane volume if we're doing webrtc AGC
This is required to make sure the capture output has sufficient energy
for the AGC to do its job.
Arun Raghavan [Wed, 17 Feb 2016 14:17:01 +0000 (19:47 +0530)]
echo-cancel: Deal with volume limit breakage in webrtc AGC
The AGC code no longer seems to honour the analog volume limits we set,
and internally uses 0-255 as the volume range. So we switch to use that
(keeping the old API usage as is in case this gets fixed upstream).
Arun Raghavan [Wed, 17 Feb 2016 14:17:00 +0000 (19:47 +0530)]
echo-cancel: Allow enabling tracing output from the webrtc canceller
Arun Raghavan [Wed, 17 Feb 2016 14:16:59 +0000 (19:46 +0530)]
echo-cancel: Mark private function as static
Arun Raghavan [Wed, 17 Feb 2016 14:16:58 +0000 (19:46 +0530)]
echo-cancel: Add a modarg to use sink/source master format and spec
This allows us to inherit the sample spec parameters from the sink and
source master (rather than forcing 32 kHz / mono). It is still possible
to override some of the parameters for the source side with modargs.
My original testing showed that these parameters provided a decent
perf/quality trade-off on lower end hardware (which I no longer have
access to). I figure it makes sense to continue with that for now, and
in the future this can be relaxed (use_master_format=yes could be the
default, and resource-constrained systems can disable it).
Arun Raghavan [Wed, 17 Feb 2016 14:16:57 +0000 (19:46 +0530)]
echo-cancel: Express restrictions correctly on webrtc AEC stream config
In the refactoring, I'm expressing the constraints in what I see to be a
more natural way -- rec_ss expresses what we're feeding the canceller,
so it makes sense to apply the constraints on what the canceller accepts
there. This then propagates to the output spec.
This also exposes the range of sample rates that the library actually
supports (8, 16, 32 and 48 kHz).
Arun Raghavan [Wed, 17 Feb 2016 14:16:56 +0000 (19:46 +0530)]
echo-cancel: Canceller may use different spec for playback and capture
The original intention was to configure low enough parameters to keep
CPU consumption down. Prior to this change, we assumed that the EC
backend would override the sink parameters based on the source
parameters to achieve this goal, and with this change we remove that
assumption by forcing the default parameters for the sink to be low
enough.
Tanu Kaskinen [Sat, 20 Feb 2016 12:32:59 +0000 (14:32 +0200)]
echo-cancel: Add some bits for webrtc intelligibility enhancer
It's not possible to enable the intelligibility enhancer at the
moment, because the feature would require modifying the audio that we
play to speakers, which we don't do currently. All audio processing is
done at the source side, and it's not easy to change that.
This patch is based on Arun Raghavan's code, I just reordered things
a bit and reworded the FIXME comment.
Arun Raghavan [Wed, 17 Feb 2016 14:16:54 +0000 (19:46 +0530)]
echo-cancel: Allow enabling the extended filter in webrtc AEC
This creates a longer filter that is more complex and less sensitive to
incorrect delay reporting from the hardware. There is also a
delay-agnostic mode that can eventually be enabled if required.
In some very quick testing, not enabling this seems to provide better
results during double-talk.
Arun Raghavan [Wed, 17 Feb 2016 14:16:53 +0000 (19:46 +0530)]
echo-cancel: Update webrtc-audio-processing usage to new API
The code now needs C++11 support to compile with the updated
webrtc-audio-processing library.
Peter Meerwald [Mon, 15 Feb 2016 22:05:03 +0000 (23:05 +0100)]
core: Fix GCC 6 compiler warning regarding left shift of negative value
In file included from pulse/timeval.c:32:0:
pulse/timeval.c: In function 'pa_timeval_add':
./pulsecore/macro.h:303:28: warning: left shift of negative value [-Wshift-negative-value]
? ~(~(type) 0 << (8*sizeof(type)-1))
reported by Ubuntu gcc-6
gcc-6 adds -Wshift-negative-value (enabled by -Wextra) which warns
about left shifting a negative value. Such shifts are undefined
because they depend on the representation of negative values.
also works with -Wshift-overflow=2
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 13 Jan 2016 22:52:11 +0000 (23:52 +0100)]
modules: Fix compiler warning comparing 0 with bool
modules/module-stream-restore.c: In function 'clean_up_db':
modules/module-stream-restore.c:2344:74: warning: comparison of constant '0' with boolean expression is always true [-Wbool-compare]
pa_assert_se(entry_write(u, item->entry_name, item->entry, true) >= 0);
reported by Ubuntu gcc-6
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Sangchul Lee [Thu, 11 Feb 2016 14:11:21 +0000 (23:11 +0900)]
role-ducking: Fix improper unducking behavior in case of operating globally
Fix improper unducking behavior when using this module with "global=1" argument.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=93994
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Arun Raghavan [Mon, 4 Jan 2016 07:03:11 +0000 (12:33 +0530)]
coreaudio: Catch devices with more channels than we support
Arun Raghavan [Mon, 4 Jan 2016 06:46:01 +0000 (12:16 +0530)]
coreaudio: Dynamically allocate C string when converting from CFString
Arun Raghavan [Mon, 4 Jan 2016 05:47:29 +0000 (11:17 +0530)]
build-sys: Only use sysroot in OS X CFLAGS if specified
The default value doesn't make sense any more, so we'll only use this if
explicitly specified.
Tanu Kaskinen [Sat, 6 Feb 2016 13:35:31 +0000 (15:35 +0200)]
default.pa: remove X11 module examples
Loading X stuff from default.pa is a bad idea, since it doesn't work
if there are multiple X sessions, or PulseAudio is started outside the
X session. Since it's a bad idea, don't encourage it by including
examples that do so.
I also removed the sample loading examples. I don't think the examples
are particularly useful, since nothing uses the loaded samples once
module-x11-bell is removed from the configuration.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=93109
Arun Raghavan [Tue, 9 Feb 2016 10:49:00 +0000 (16:19 +0530)]
glib: Trivial whitespace fix
Jungsup Lee [Tue, 2 Feb 2016 04:47:57 +0000 (13:47 +0900)]
rescue-streams : Fix a typo
Fix a typo in log message.
Signed-off-by: Jungsup Lee <jungsup4.lee@samsung.com>
Tanu Kaskinen [Tue, 26 Jan 2016 12:57:32 +0000 (14:57 +0200)]
device-manager: improve logging about non-existing data
Previously a missing key would cause this kind of log output:
D: [pulseaudio] module-device-manager.c: Database contains invalid data for key: sink:auto_null (probably pre-v1.0 data)
D: [pulseaudio] module-device-manager.c: Attempting to load legacy (pre-v1.0) data for key: sink:auto_null
D: [pulseaudio] module-device-manager.c: Size does not match.
D: [pulseaudio] module-device-manager.c: Unable to load legacy (pre-v1.0) data for key: sink:auto_null. Ignoring.
That is now replaced with
D: [pulseaudio] module-device-manager.c: Database contains no data for key: sink:auto_null
Kamil Rytarowski [Mon, 21 Dec 2015 03:10:35 +0000 (04:10 +0100)]
solaris: Illumos does not ship with SOUND_PCM* functionality
Code reference:
https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h
Add autoconf checks for:
- SOUND_PCM_READ_RATE
- SOUND_PCM_READ_CHANNELS
- SOUND_PCM_READ_BITS
Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality
Thanks to Jonathan Perkin (Joyent) for Illumos code reference.
Jonathan Perkin [Mon, 21 Dec 2015 03:10:34 +0000 (04:10 +0100)]
solaris: Catch up with newer API
Patch upstreamed from pkgsrc by Kamil Rytarowski <n54@gmx.com>.
See commit
e4a7625ba884c5cce20468d75937857343751c35 for why this was
originally done.
Marcin Lewandowski [Sat, 16 Jan 2016 14:42:34 +0000 (15:42 +0100)]
vala: Added cnames to callback delegates in Vala VAPI
Tanu Kaskinen [Thu, 7 Jan 2016 13:25:41 +0000 (15:25 +0200)]
source-output: remap volume_factor_source when starting move
This gets rid of an error message from the debug log. If
volume_factor_source would actually be used somewhere, this bug would
have caused more severe problems.
volume_factor_source should have the source's channel map. When moving
the stream, the volume needs to be remapped from the old source's
channel map to the new source's map. However, when the stream is being
moved, there is a period where the old source has already been
forgotten and the new source isn't yet known, so the remapping can't
be done directly between the two channel maps. Instead, the volume is
remapped from the old source's map to the stream's own map when the
move starts, and again remapped from the stream's map to the new
source's map when the move finishes.
The first remapping was missing, causing the second remapping fail and
print an error to the log.
(I checked the sink input code as well. It didn't have this bug.)
Tanu Kaskinen [Thu, 7 Jan 2016 13:25:40 +0000 (15:25 +0200)]
source-output: do volume_factor_source application before resampling
Applying the volume after resampling means mismatch between the volume
channel map and the data channel map.
volume_factor_source is not currently used anywhere, so this bug
hasn't been causing any problems. I noticed it while reading the code.
Arun Raghavan [Thu, 31 Dec 2015 03:58:28 +0000 (09:28 +0530)]
pulse: Bump PA_RATE_MAX to 384 kHz
This will likely be needed in the future when we start supporting high
bitrate passthrough, and there actually seem to be people 352/384 kHz
out there (potentially as an intermediate production step).
Arun Raghavan [Thu, 31 Dec 2015 03:57:56 +0000 (09:27 +0530)]
format: Make pa_format_info_valid() stricter for PCM
We should do stricter validation when we can.
Arun Raghavan [Fri, 22 Jan 2016 07:31:36 +0000 (13:01 +0530)]
Update NEWS for 8.0
Jason Gerecke [Thu, 14 Jan 2016 04:27:39 +0000 (20:27 -0800)]
bluetooth: Prevent aborts caused by invalid module arguments
If 'pa_modargs_new' returns a NULL, we need to be careful to not call
'pa_modargs_free' in the failure path since it requires that we pass it
a non-null argument. Also updates 'module-bluetooth-policy.c:pa__init'
to follow the standard "goto fail" pattern used everywhere else.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Arun Raghavan [Fri, 15 Jan 2016 10:39:49 +0000 (16:09 +0530)]
build-sys: Use #ifdef with HAVE_FAST_64BIT_OPERATIONS
The define is made conditionally.
Reported by: Kamil Rytarowski <n54@gmx.com>
Arun Raghavan [Tue, 12 Jan 2016 10:01:06 +0000 (15:31 +0530)]
stream: Clarify pa_stream_writable_size() documentation
Arun Raghavan [Mon, 11 Jan 2016 07:22:10 +0000 (12:52 +0530)]
sink-input, source-output: Add some debug output on start_move()
Kamil Rytarowski [Sun, 20 Dec 2015 00:25:41 +0000 (01:25 +0100)]
NetBSD: Stop depending upon nonstandard __WORDSIZE
There is no way to check CPU type in a portable way across ABIs.
Assume if pointers are 64-bit that CPU is capable to perform fast
64-bit operations. Add an extra check to handle x32-ABI.
PulseAudio by default builds with -Wundef. If we add -Werror=undef this
missing define is fatal. By default build log is full of entries like:
In file included from ./pulsecore/core.h:47:0,
from ./pulsecore/module.h:31,
from ./pulsecore/sink-input.h:31,
from pulsecore/sound-file-stream.c:36:
./pulsecore/sample-util.h: In function 'pa_mult_s16_volume':
./pulsecore/sample-util.h:58:5: warning: "__WORDSIZE" is not defined [-Wundef]
#if __WORDSIZE == 64 || ((ULONG_MAX) > (UINT_MAX))
^
(NetBSD-7.99.21 with default GCC 4.8.5)
This change fixes build issues on NetBSD.
This also address a bug reported by Shawn Walker from Oracle (possibly Solaris):
Bug 90880 - builds can fail due to non-portable glibc-specific internal macro usage
jungsup lee [Wed, 6 Jan 2016 05:18:50 +0000 (14:18 +0900)]
rtpoll: Fix build error when building with DEBUG_TIMING
This typo causes a build error when DEBUG_TIMING is defined.
Signed-off-by: jungsup lee <jungsup4.lee@samsung.com>
KimJeongYeon [Wed, 6 Jan 2016 08:28:11 +0000 (17:28 +0900)]
module-tunnel: Fix double free
Local pointer 'dn' freed again when pa_thread_new() failed.
Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
Mihai Moldovan [Mon, 20 Apr 2015 18:46:02 +0000 (20:46 +0200)]
module-coreaudio-device: get channel name as CFString and convert to plain C string.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
The old code fetched the channel name via AudioObjectGetPropertyData()
and accessed the "returned" data as a plain char buffer.
This may or may not have worked at some point according to the Apple
CFString documentation, which warns that the actual data layout is an
implementation detail and subject to change at any time.
On recent OS X versions, this behavior led to "random data" channel
names like >H��{, H��{<.
We need to actually let AudioObjectGetPropertyData() populate a CFString
struct and convert this into a plain char buffer.
The conversion function will not free the CFString, so do that in the
caller.
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Mihai Moldovan [Tue, 21 Apr 2015 06:01:27 +0000 (08:01 +0200)]
system.pa.in: load module-coreaudio-detect if HAVE_COREAUDIO.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Mihai Moldovan [Tue, 21 Apr 2015 06:01:16 +0000 (08:01 +0200)]
default.pa.in: load module-coreaudio-detect if HAVE_COREAUDIO.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Mihai Moldovan [Tue, 21 Apr 2015 06:01:05 +0000 (08:01 +0200)]
configure.ac: add HAVE_COREAUDIO to automake and code.
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
Arun Raghavan [Tue, 29 Dec 2015 00:30:14 +0000 (06:00 +0530)]
alsa: Don't disable timer-based scheduling on USB devices
This isn't a great fix, but we need ALSA API to do this right. In the
mean time, USB devices work fine with timer-based scheduling, so there's
no reason to force a large minimum latency by disabling tsched on them.
Felipe Sateler [Mon, 28 Dec 2015 23:34:08 +0000 (20:34 -0300)]
build-sys: Fix install order of libpulsecore
It needs to be installed after libpulse, because of libtool relinking.
Felipe Sateler [Mon, 28 Dec 2015 23:34:09 +0000 (20:34 -0300)]
travis: Run make install in travis.
This helps detect ordering problems in the install target
Tanu Kaskinen [Sun, 27 Dec 2015 12:52:37 +0000 (14:52 +0200)]
build-sys: add typedefs.h to libpulsecore SOURCES
Without this the file doesn't get included in tarballs.
Tanu Kaskinen [Sun, 27 Dec 2015 12:41:04 +0000 (14:41 +0200)]
build-sys: bump sonames
Bump 18 -> 19 due to the addition of the LFE balance API.
Arun Raghavan [Mon, 21 Dec 2015 05:24:58 +0000 (10:54 +0530)]
daemon: Sanitise message about unsupported high res timers
Arun Raghavan [Mon, 21 Dec 2015 05:38:25 +0000 (11:08 +0530)]
build: Move to using Travis trusty images
Tanu Kaskinen [Sun, 20 Dec 2015 10:18:28 +0000 (12:18 +0200)]
always-sink: simplify hook management with pa_module_hook_connect()
Yuri Chornoivan [Sun, 20 Dec 2015 11:35:13 +0000 (13:35 +0200)]
i18n: Update Ukrainian translation
David Henningsson [Fri, 18 Dec 2015 12:34:46 +0000 (13:34 +0100)]
gitignore: Add .orig and .rej to gitignore
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Pierre Ossman [Thu, 10 Dec 2015 15:22:54 +0000 (16:22 +0100)]
context: continue without srbchannel if it fails
We might be compiled without eventfd support, or something else
might go wrong. And it's fully possible to continue using the old
channel rather than just disconnecting.
Signed-off-by: Pierre Ossman <ossman@cendio.se>