Commit graph

8164 commits

Author SHA1 Message Date
Marcin Lewandowski
81d3eb8467 vala: Added cnames to callback delegates in Vala VAPI 2016-01-22 13:25:29 +05:30
Tanu Kaskinen
6a754ad4a9 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.)
2016-01-22 13:25:29 +05:30
Tanu Kaskinen
b2e7cf6521 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.
2016-01-22 13:25:29 +05:30
Arun Raghavan
a958297fc8 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).
2016-01-22 13:25:29 +05:30
Arun Raghavan
12a202c510 format: Make pa_format_info_valid() stricter for PCM
We should do stricter validation when we can.
2016-01-22 13:25:29 +05:30
Arun Raghavan
7f6c4e6ed0 Update NEWS for 8.0 2016-01-22 13:01:36 +05:30
Jason Gerecke
00ba340618 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>
2016-01-15 16:20:53 +05:30
Arun Raghavan
f8c69de418 build-sys: Use #ifdef with HAVE_FAST_64BIT_OPERATIONS
The define is made conditionally.

Reported by: Kamil Rytarowski <n54@gmx.com>
2016-01-15 16:10:46 +05:30
Arun Raghavan
c3c4937b4f stream: Clarify pa_stream_writable_size() documentation 2016-01-12 15:31:06 +05:30
Arun Raghavan
2ae2dab307 sink-input, source-output: Add some debug output on start_move() 2016-01-12 08:40:51 +05:30
Kamil Rytarowski
7c1a5d6159 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
2016-01-08 14:23:37 +01:00
jungsup lee
13664cd977 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>
2016-01-07 18:01:20 +05:30
KimJeongYeon
19c71ce851 module-tunnel: Fix double free
Local pointer 'dn' freed again when pa_thread_new() failed.

Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
2016-01-07 17:59:15 +05:30
Mihai Moldovan
403ba1e676 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>
2016-01-04 12:39:21 +05:30
Mihai Moldovan
cf91aaa2b6 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>
2016-01-04 12:39:21 +05:30
Mihai Moldovan
48c91d52f9 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>
2016-01-04 12:39:21 +05:30
Mihai Moldovan
51caceb770 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>
2016-01-04 12:39:20 +05:30
Arun Raghavan
810aa36189 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.
2015-12-29 06:00:14 +05:30
Felipe Sateler
5e8161448e build-sys: Fix install order of libpulsecore
It needs to be installed after libpulse, because of libtool relinking.
2015-12-29 05:36:50 +05:30
Felipe Sateler
cd74d8f013 travis: Run make install in travis.
This helps detect ordering problems in the install target
2015-12-29 05:36:50 +05:30
Tanu Kaskinen
ca7b0722f1 build-sys: add typedefs.h to libpulsecore SOURCES
Without this the file doesn't get included in tarballs.
2015-12-27 14:53:55 +02:00
Tanu Kaskinen
175fc3ef13 build-sys: bump sonames
Bump 18 -> 19 due to the addition of the LFE balance API.
2015-12-27 14:42:35 +02:00
Arun Raghavan
b1fe42bb3f daemon: Sanitise message about unsupported high res timers 2015-12-21 11:21:17 +05:30
Arun Raghavan
2dbd6c0fe3 build: Move to using Travis trusty images 2015-12-21 11:21:17 +05:30
Tanu Kaskinen
e8d5a6af1e always-sink: simplify hook management with pa_module_hook_connect() 2015-12-21 05:37:28 +02:00
Yuri Chornoivan
22e5683bac i18n: Update Ukrainian translation 2015-12-20 14:27:13 +02:00
David Henningsson
613784d8ff gitignore: Add .orig and .rej to gitignore
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-12-18 13:34:46 +01:00
Pierre Ossman
04eb815753 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>
2015-12-18 13:33:19 +01:00
Georg Chini
fc803b4883 loopback: Validate the rate parameter 2015-12-18 07:35:15 +02:00
Arun Raghavan
12b5e7c873 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
2015-12-15 17:09:31 +05:30
Felipe Sateler
2c2c2676ee 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
2015-12-14 13:53:44 +01:00
Tanu Kaskinen
7b9fcc01f6 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.
2015-12-14 13:47:04 +01:00
Tanu Kaskinen
1d7ce90139 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.
2015-12-14 13:45:39 +01:00
David Henningsson
d97460045c 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>
2015-12-14 05:01:53 +02:00
Juho Hämäläinen
f61a16b8b1 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>
2015-12-11 10:05:41 +01:00
Kamil Rytarowski
7f4acbd1c0 netbsd: Revamp NetBSD platform checks 2015-12-08 08:56:47 +05:30
Kamil Rytarowski
93cccdee8d 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)
2015-12-08 08:56:07 +05:30
Kamil Rytarowski
9dd77827ad core-rtclock: Add missing declaration of struct timespec 2015-12-08 08:50:10 +05:30
Tanu Kaskinen
74c9c41031 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
2015-12-07 10:41:37 +01:00
Tanu Kaskinen
96f4b4ffe3 core-util: improve comments in pa_machine_id() 2015-12-07 10:18:48 +01:00
Kiran Krishnappa
96b368b960 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]
2015-12-07 09:31:58 +01:00
Kamil Rytarowski
cda1a5e897 netbsd: Fix unportable test(1) construct 2015-12-07 09:09:32 +01:00
Kamil Rytarowski
2d555ba15c 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>.
2015-12-07 09:01:21 +01:00
Alexander E. Patrakov
04737989ec 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>
2015-12-04 17:40:24 +05:30
Tanu Kaskinen
d6b892efdc 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.
2015-12-04 08:00:24 +02:00
Tanu Kaskinen
8203423bdc man: document when system.pa is used instead of default.pa 2015-12-04 08:00:21 +02:00
David Henningsson
cd46a4ef06 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>
2015-11-27 14:27:26 +01:00
Mingye Wang (Arthur2e5)
55f065301a i18n: Updated zh_CN translation
This patch updates zh_CN translation to 518 complete, 0 fuzzy and 3
untranslated.
2015-11-27 13:16:08 +02:00
Kamil Rytarowski
3753f50755 netbsd: NetBSD ships with paccept(2) a superset of Linux-specific accept4()
[diwic: Moved paccept to #bsd line in configure.ac]
2015-11-27 09:52:10 +01:00
Nazar Mokrynskyi
30a9523b75 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.
2015-11-26 18:31:48 +01:00