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>
Georg Chini [Wed, 25 Feb 2015 18:43:24 +0000 (19:43 +0100)]
loopback: Validate the rate parameter
Arun Raghavan [Wed, 18 Nov 2015 02:56:47 +0000 (08:26 +0530)]
echo-cancel: Don't skip canceller when sink is inactive
This forces the canceller engine to be invoked even if playback is not
currently active. We need to do this for cases where the engine provides
additional processing that is independent of playback, such as noise
suppression and AGC.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83557
Felipe Sateler [Fri, 11 Dec 2015 14:00:30 +0000 (11:00 -0300)]
build-sys: Make pulsecore a private library
It is not meant to be used by third parties, so do not install in a public dir
Tanu Kaskinen [Mon, 7 Dec 2015 21:22:42 +0000 (23:22 +0200)]
client-conf, daemon-conf: enable .d directories
I want to enable client.conf.d, because in OpenEmbedded-core we have
a graphical environment called Sato that runs as root. Sato needs to
set allow-autospawn-for-root=true in client.conf, but the default
configuration in OpenEmbedded-core should not set that option. With
this patch, I can create a Sato-specific package that simply installs
50-sato.conf in /etc/pulse/client.conf.d without conflicting with the
main client.conf coming from a different package.
daemon.conf.d is enabled just because it would be strange to not
support it while client.conf.d is supported.
Tanu Kaskinen [Mon, 7 Dec 2015 21:22:41 +0000 (23:22 +0200)]
conf-parser: add support for .d directories
This allows a configuration scheme where after loading configuration
from "somefile", the parser loads configuration from files in
directory "somefile.d". This feature needs to be enabled on a per-file
basis, though, and this patch doesn't yet enable the feature for any
files.
David Henningsson [Thu, 26 Nov 2015 17:29:58 +0000 (18:29 +0100)]
typedefs.h: Move some typedefs to a separate file
The relationship between sinks, sources, cards, profiles, and ports
is becoming ever more intertwined, to the point that if you try to
include one file from the other, you're likely to end up with some
weird error somewhere else.
Work around this by creating a new typedefs.h, which does not depend
on anything else, and just creates a few typedefs.
(Can be expanded with more typedefs in the future if the need arises.)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Juho Hämäläinen [Thu, 10 Dec 2015 13:09:34 +0000 (15:09 +0200)]
alsa-mixer: Have valid proplist for synthesized path as well.
When synthesized alsa path is freed there is an assert from NULL
proplist. Create empty proplist for the path to fix.
Signed-off-by: Juho Hämäläinen <juho.hamalainen@nomovok.com>
Kamil Rytarowski [Tue, 8 Dec 2015 03:22:42 +0000 (04:22 +0100)]
netbsd: Revamp NetBSD platform checks
Kamil Rytarowski [Fri, 20 Nov 2015 03:20:36 +0000 (04:20 +0100)]
core, pulse, modules: Fix undefined behavior with array subscript of invalid type
From the NetBSD manual:
The first argument of these functions is of type int, but only a very
restricted subset of values are actually valid. The argument must either
be the value of the macro EOF (which has a negative value), or must be a
non-negative value within the range representable as unsigned char.
Passing invalid values leads to undefined behavior.
-- ctype(3)
Kamil Rytarowski [Tue, 8 Dec 2015 01:52:08 +0000 (02:52 +0100)]
core-rtclock: Add missing declaration of struct timespec
Tanu Kaskinen [Tue, 29 Sep 2015 08:41:51 +0000 (11:41 +0300)]
build-sys: fix PULSE_LOCALEDIR definition
On some systems (at least Arch) DATADIRNAME is not defined. This
caused PULSE_LOCALEDIR to point to a wrong directory. This seemed like
an issue introduced in 7.0, but probably something else was updated in
Arch at the same time, causing DATADIRNAME to become undefined,
because there were no changes between 6.0 and 7.0 that could have
caused this.
After noticing that localedir is a standard variable, my first idea
was to use pulselocaledir='${localedir}' in configure.ac, but Jan
Steffens pointed out that it causes the final PULSE_LOCALEDIR to
become "${prefix}/share/locale", that is, the variables weren't fully
expanded. I then found a FAQ item in Autoconf's manual[1], which
recommends not to define any absolute installation directories in
configure.ac, because the installation directories should be possible
to change when running make. The recommended solution is to define the
constant in AM_CPPFLAGS instead, so that's what this patch does.
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Directories.html
Tanu Kaskinen [Wed, 12 Aug 2015 09:37:00 +0000 (11:37 +0200)]
core-util: improve comments in pa_machine_id()
Kiran Krishnappa [Thu, 25 Jun 2015 16:29:36 +0000 (21:59 +0530)]
module: Remove redundant core argument from pa_module_unload()
pa_module_unload() takes two pointers: pa_module and pa_core.
The pa_core pointer is also available via the pa_module object,
so the pa_core argument is redundant
[David Henningsson: Rebased to git HEAD]
Kamil Rytarowski [Sat, 28 Nov 2015 13:59:26 +0000 (14:59 +0100)]
netbsd: Fix unportable test(1) construct
Kamil Rytarowski [Sat, 28 Nov 2015 09:01:05 +0000 (10:01 +0100)]
netbsd: Improve handling of <locale> and <xlocale.h> headers
NetBSD ships with strtod_l(3) in <stdlib.h>.
Having strtol_l(3) doesn't imply to have <xlocale.h>.
Generalize inclusion of <locale.h> and <xlocale.h>.
Alexander E. Patrakov [Fri, 27 Nov 2015 12:30:38 +0000 (17:30 +0500)]
alsa-sink: Don't pretend to support passthrough on HDMI surround sinks
It doesn't work currently (fails and falls back to PCM), due to channel
count mismatch between the sink sample spec and the sample spec required
by IEC61937.
To be reverted when someone implements changing channel count without
switching profiles. This would also be required for HBR passthrough over
HDMI.
Reported-by: Xamindar <junkxamindar@gmail.com>
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Tanu Kaskinen [Fri, 4 Dec 2015 05:38:20 +0000 (07:38 +0200)]
man: remove a reference to pacmd from default.pa.5
I don't want to have unnecessary advertising for pacmd, because I
think pacmd should be deprecated.
Tanu Kaskinen [Fri, 4 Dec 2015 05:38:19 +0000 (07:38 +0200)]
man: document when system.pa is used instead of default.pa
David Henningsson [Thu, 26 Nov 2015 13:29:23 +0000 (14:29 +0100)]
card: Only update port's preferred profile if profile is saved
In case pa_card_set_profile is called with save=false, then probably
it makes more sense not to update the port's preferred profile as well.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Mingye Wang (Arthur2e5) [Sat, 21 Nov 2015 22:47:16 +0000 (17:47 -0500)]
i18n: Updated zh_CN translation
This patch updates zh_CN translation to 518 complete, 0 fuzzy and 3
untranslated.
Kamil Rytarowski [Sat, 21 Nov 2015 22:08:23 +0000 (23:08 +0100)]
netbsd: NetBSD ships with paccept(2) a superset of Linux-specific accept4()
[diwic: Moved paccept to #bsd line in configure.ac]
Nazar Mokrynskyi [Sun, 11 Oct 2015 01:35:56 +0000 (03:35 +0200)]
alsa-mixer: sb-omni-surround-5.1.conf: remove analog-surround-21, add Linux 4.3+ support
In 2.1 mode LFE is not actually working at all, so it is removed.
With Linux 4.3-rc1+ Mic/Line are hw:%f,0,0 as it should be: https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/usb?id=
5ee20bc792467d7d612157e0a9962765aa943b08
So now we support both Linux 4.2.x- and 4.3-rc1+ setups.
Also in Linux 4.3-rc1 S/PDIF input was detected incorrectly (there is no such hardware input), so it is not present in config.
David Henningsson [Tue, 17 Nov 2015 14:10:36 +0000 (15:10 +0100)]
module-card-restore: Remove "version" from internal entry struct
If we always write entries of the latest version, we can simplify
code a little by only handling old versions in the "entry_read"
function and assume we have the latest version everywhere else.
Suggested-by: Tanu Kaskinen <tanuk@iki.fi>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:35 +0000 (15:10 +0100)]
module-switch-on-port-available: Route to preferred profile
This makes the routing slightly more aggressive:
* It will try to route to another profile, if such a profile
is preferred by the port.
* It will allow changing profiles on transitions both to
PA_AVAILABLE_YES and PA_AVAILABLE_NO
To accommodate there is also some refactoring.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:34 +0000 (15:10 +0100)]
module-switch-on-port-available: Use input and output names
In case input or output names are filled in, we can use this to
get a better match in the profile_good_for_input/output functions
instead of guessing based on number of sources and channels.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:33 +0000 (15:10 +0100)]
card-restore: Save and restore "preferred profile" of port
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:32 +0000 (15:10 +0100)]
card: Update preferred_profile for ports when profile changes
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:31 +0000 (15:10 +0100)]
device-port: Add preferred_profile field to pa_device_port
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:30 +0000 (15:10 +0100)]
alsa-mixer: Fill in input and output names
Fill in input_name and output_name to make routing easier for
routing modules.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 17 Nov 2015 14:10:29 +0000 (15:10 +0100)]
card: Add variables for splitting up a profile
It can be useful for routing modules to know a profile's input
and output parts, in order to e g change output profile
while keeping the input profile unchanged.
For now filling in these fields is optional and a routing module
must be able to handle NULL in these fields.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Arun Raghavan [Wed, 21 Oct 2015 06:15:32 +0000 (11:45 +0530)]
tests: Make echo-cancel-test not crash
Adding AGC broke this test, so we hard-disable the volume code in test
mode. This is probably okay for now, since at least with analog AGC, the
source volume changes and the data we get is going to be with AGC
applied, but digital gain won't be encapsulated here.
Long term, we might need to figure out how to deal with this properly.
Arun Raghavan [Mon, 16 Nov 2015 14:07:20 +0000 (19:37 +0530)]
alsa: Use helper function for byte conversion across sample specs
Arun Raghavan [Tue, 3 Nov 2015 17:12:08 +0000 (22:42 +0530)]
source: Deal with filter having more channels than the master
Without this, we hit an assert because the channel count in
new_reference (which was inherited from the master) is lower than the
channel count of the filter.
Thomas Petazzoni [Tue, 17 Nov 2015 11:06:36 +0000 (12:06 +0100)]
pulsecore/packet: avoid redefinition of pa_packet structure
packet.h defines:
typedef struct pa_packet pa_packet;
and packet.c defines:
typedef struct pa_packet {
...
} pa_packet;
With old versions of gcc (such as gcc 4.5) this causes a redefinition
error at compile time:
pulsecore/packet.c:43:3: error: redefinition of typedef 'pa_packet'
pulsecore/packet.h:26:26: note: previous declaration of 'pa_packet' was here
In order to fix this, this commit changes the definition in packet.c
to just:
struct pa_packet {
...
};
This way, the contents of the structure remain opaque to users of
pa_packet outside packet.c, and the 'pa_packet' type remains usable.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91334
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>