Commit graph

8092 commits

Author SHA1 Message Date
David Henningsson
dc2299e961 conf-parser: Add debug print of parsed files
This is useful for debugging.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-08-23 15:54:19 +02:00
David Henningsson
2575b102b9 alsa: Remove four channel input profile
With the new multichannel profile, we can remove this one and
handle the four channel input as a generic multichannel fallback.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-08-23 15:54:13 +02:00
Peter Meerwald
3a04554f9e format: Don't use deprecated json-c is_error() macro
json_tokener_parse() simply returns NULL on error these days

latest json-c (post 0.12) doesn't automatically include json-c/bits.h anymore
causing compilation errors

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-22 15:36:01 +02:00
Peter Meerwald
329bb6d7df build-sys: Drop support for json 0.9
drop support for json 0.9 and require json-c 0.11 (this will also avoids confusion
which json package is needed due to the upstream rename)

json 0.9 lacks json_object_object_get_ex()

json-c 0.11 was released 20130402

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-22 15:35:53 +02:00
Peter Meerwald
a940877224 format: Use json_object_object_get_ex() instead of deprecated json_object_object_get()
pulse/format.c: In function 'pa_format_info_get_prop_type':
pulse/format.c:252:5: warning: implicit declaration of function 'is_error' [-Wimplicit-function-declaration]
pulse/format.c:287:13: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:293:13: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c: In function 'pa_format_info_get_prop_int_range':
pulse/format.c:364:5: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:369:5: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c: In function 'pa_format_info_prop_compatible':
pulse/format.c:676:9: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:680:9: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]

json-c 0.10 (released 20120530) added json_object_object_get_ex()
json-c 0.12 (released 20140410) deprecated json_object_object_get()

PulseAudio depends on json 0.9 or json-c 0.11, drop support for json 0.9
in a subsequent patch and require json-c 0.11 (this will also avoids confusion
which json package is needed due to the upstream rename)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-22 15:35:33 +02:00
Peter Meerwald
514766a79f format: Don't _put() objects obtained with json_object_object_get() or json_object_array_get_idx()
json-c documentation states that "No reference counts will be changed.
There is no need to manually adjust reference counts through the
json_object_put/json_object_get methods unless..."

hence fix pa_format_info_get_prop_type() and pa_format_info_get_prop_int_range();
note that pa_format_info_prop_compatible() is OK

the json_object_array_get_idx() bug reported by Arun, thanks!

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Arun Raghavan <arun@accosted.net>
2014-08-22 15:35:24 +02:00
João Paulo Rechi Vita
6d88a139fc bluetooth: Create oFono backend 2014-08-22 12:26:18 +03:00
João Paulo Rechi Vita
dca5d07937 bluetooth: Create NULL backend 2014-08-22 12:24:39 +03:00
João Paulo Rechi Vita
2198048e5d bluetooth: Add BlueZ 5 headset profile names in policy module 2014-08-22 12:24:39 +03:00
Luiz Augusto von Dentz
bdef2dbd0a bluetooth: Assert transport has a matching profile
It is a bug if a transport has no matching profile.
2014-08-22 12:24:39 +03:00
João Paulo Rechi Vita
1f0de01bfc bluetooth: Add basic support for HEADSET profiles
This commit adds basic support for devices implementing HSP Headset
Unit, HSP Audio Gateway, HFP Handsfree Unit, HFP Audio Gateway to the
BlueZ 5 bluetooth audio devices driver module (module-bluez5-device).
2014-08-22 12:10:12 +03:00
Arun Raghavan
a27e6d6d9e srbchannel: Trivial whitespace and style fixes
Mostly to improve readability and make things a bit more consistent.
2014-08-21 15:40:42 +05:30
Peter Meerwald
096c8903a9 context: Handle client-side failure of pa_srbchannel_new_from_template()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
2014-08-18 23:21:59 +02:00
Peter Meerwald
fc0447ce88 context: Stop and return if srbchannel memblock looks fishy
handle_srbchannel_memblock() should return when memblock sanity checks fail

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
2014-08-18 23:21:59 +02:00
Peter Meerwald
fd19327327 srbchannel: pa_srbchannel_new() may fail
return from setup_srbchannel() when pa_srbchannel_new() fails

pa_srbchannel_new() depends on HAVE_SYS_EVENTFD_H, e.g. Debian/kFreeBSD doesn't
have it

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: David Henningsson <david.henningsson@canonical.com>
2014-08-18 23:21:59 +02:00
Peter Meerwald
7974a17d1d srbchannel: Cleanup when pa_fdsem_open_shm() fails
pa_fdsem_open_shm() returns NULL when HAVE_SYS_EVENTFD_H is #undefined

pa_srbchannel_new() and pa_srbchannel_new_from_template() depend on
pa_fdsem_open_shm() and shall properly cleanup stuff, and return NULL as well;
otherwise, function pa_fdsem_get() will assert:

Assertion 'f' failed at pulsecore/fdsem.c:284, function pa_fdsem_get(). Aborting.

Debian/kFreeBSD doesn't HAVE_SYS_EVENTFD_H

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
2014-08-18 23:21:59 +02:00
Peter Meerwald
dc7ed820ab memtrap: Debian/kFreeBSD seems to signal SIGSEGV, not SIGBUS
handle both signals on Debian/kFreeBSD, otherwise sigbus-test fails:

Running suite(s): Sig Bus
Let's see if this worked: This is a test that should work fine.
And memtrap says it is good: yes
tests/sigbus-test.c:59:E:sigbus:sigbus_test:0: (after this point) Received signal 11 (Segmentation fault)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:31:48 +02:00
Peter Meerwald
c32e12e7b9 tests: Check expected result of sigbus-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:31:41 +02:00
Peter Meerwald
4540401167 core-util: Avoid warnings when missing certain system calls
on systems lacking #defines HAVE_ACCEPT4, HAVE_PIPE2, SOCK_CLOEXEC

pulsecore/core-util.c: In function 'pa_open_cloexec':
pulsecore/core-util.c:3348:1: warning: label 'finish' defined but not used [-Wunused-label]
pulsecore/core-util.c: In function 'pa_socket_cloexec':
pulsecore/core-util.c:3370:1: warning: label 'finish' defined but not used [-Wunused-label]
pulsecore/core-util.c: In function 'pa_pipe_cloexec':
pulsecore/core-util.c:3393:1: warning: label 'finish' defined but not used [-Wunused-label]
pulsecore/core-util.c: In function 'pa_accept_cloexec':
pulsecore/core-util.c:3415:1: warning: label 'finish' defined but not used [-Wunused-label]

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:31:31 +02:00
Peter Meerwald
1849cfdad9 misc: Fix format specifiers
to print a pa_usec_t, the format specifier to use is "%" PRIu64

modules/module-combine-sink.c: In function 'update_latency_range':
modules/module-combine-sink.c:750:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'pa_usec_t' [-Wformat]
modules/module-combine-sink.c:750:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'pa_usec_t' [-Wformat]

to print a size_t, use %zu

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:31:19 +02:00
Peter Meerwald
8d2d7da5e6 echo-cancel: Fix spelling of canceller
use canceller consistently

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:30:38 +02:00
Peter Meerwald
eaab16d8ba tests: Add *.log and *.trs to src/.gitignore
these files are created by running 'make check'

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 15:30:29 +02:00
Tanu Kaskinen
c49c6b75f0 device-restore: Sync the database on unload
If there are unsaved changes, those need to be written to disk before
the module is unloaded, otherwise the changes are lost.
2014-08-18 13:52:11 +03:00
Tanu Kaskinen
facfd3a664 alsa-mixer: Fix path subset detection
The old logic assumed that if path A was a subset of path B, the
element list in B would have all elements of A in the beginning of
B's list, in the same order as A. This assumption was invalid, causing
some subset cases to not get detected. We need to search through the
full element list of B every time before we can conclude that B
doesn't have the element that we're inspecting.
2014-08-18 13:44:44 +03:00
Peter Meerwald
97d9f4c5dd remap: Add 4-channel to mono channel rearrangement
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-18 10:10:52 +02:00
Arun Raghavan
6fdddf45f7 echo-cancel: Fix drift timer restart logic across suspend
The IS_ACTIVE() macro does a pa_sink/source_get_state() on our sink and
source, which does not work in the state change callback, since the
state is not actually committed at that point.
2014-08-18 08:28:06 +05:30
Alexander E. Patrakov
1b600a2d54 resampler: Changed style of includes
There was no code that included files from other directories using
the #include "..." style before.

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-08-17 13:11:55 +03:00
Alexander E. Patrakov
ee658fa074 resampler: Moved speex_is_fixed_point() to speex.c
IMHO code that calls into speex belongs in speex.c, not in resampler.c.

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-08-17 13:06:20 +03:00
poljar (Damir Jelić)
72103e1e33 resampler: Split the resampler implementations into separate files
Rebased by Peter Meerwald.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: poljar (Damir Jelić) <poljarinho@gmail.com>
2014-08-17 11:18:17 +03:00
Tanu Kaskinen
64d17a6b0a shell-completion: zsh: Add "=" to the end of some command options
Without the equals sign, only the "--server foo" form is recognized,
so the "--server=foo" form doesn't get completion support.
2014-08-17 09:30:16 +03:00
Tanu Kaskinen
db6d5011cd shell-completion: zsh: Use -S and -A with _arguments
-S makes the option parser to not try parsing arguments as options
after "--" has appeared in the command line.

-A "-*" makes the option parser to not try parsing arguments as
options after the first non-option argument. The "-*" pattern means
that if there are unrecognized parameters that look like options
(i.e. start with a dash), those should not terminate the option
parsing.
2014-08-17 09:30:16 +03:00
Tanu Kaskinen
cd3cae9285 shell-completion: zsh: Don't use multiple option sets for one command
The options were divided to multiple sets to prevent (or at least try
to prevent) completing e.g. --server after -s was already given. This,
however, caused problems, because after the user had written
"pactl --server foo", further completions stopped to work. The
"server" option set didn't contain any other options, so once Zsh
detected that the "server" option set was in use, it thought that no
other options were valid.

The special casing for "-s", "-n", "--server" and "--client-*" at the
end of _pactl_completion() was probably an attempt to deal with this
problem. Those special cases are unnecessary now that the option
specification given to _arguments is more correct.
2014-08-17 09:26:55 +03:00
Tanu Kaskinen
74c724db05 shell-completion: zsh: Don't say "this help" when it's a different help
The option descriptions that Zsh prints are not the same thing as the
help text that pactl, pacmd etc. print when given --help.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
1f9d4cbe93 shell-completion: zsh: Support also --server in remote detection
_set_remote() is supposed to find out if a remote server has been
specified on the command line, but previously it only checked for -s
and ignored --server, causing the completion code to connect to the
local server instead when it should have connected to the remote
server to get the data for the completions.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
09e9d13e2d shell-completion: zsh: Move duplicated code into a function
This is just refactoring, no functional changes.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
be8171be79 shell-completion: Install the Zsh completions
This makes the Zsh completions work out-of-the-box. I also moved
pulseaudio-zsh-completion.zsh to zsh/_pulseaudio to be in line with
the common naming convention of Zsh completion files.
2014-08-17 08:24:47 +03:00
Tanu Kaskinen
f480fb38a7 sink-input, source-output: Assign to reference_ratio from a single place
This makes it easy to log a message every time the reference ratio
changes. I also need to add a hook for reference ratio changes, but
that need will go away if the stream relative volume controls will be
created by the core in the future.
2014-08-17 08:17:59 +03:00
Peter Meerwald
8a4a4f408c util: Fix pa_get_binary_name() on Debian/kFreeBSD
Debian GNU/kFreeBSD uses a FreeBSD kernel and GLIBC,
it #defines __FreeBSD_kernel__, but not __FreeBSD__ nor __linux__
Debian GNU/kFreeBSD does have a /proc/self/exe

FreeBSD #defines __FreeBSD__ and __FreeBSD_kernel__

problem reporte here:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html

http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe and
http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c have some
background info

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-12 22:13:23 +02:00
Peter Meerwald
eca6217129 tests: Fix mix-test on big-endian systems
the mix test code never worked on big-endian systems

patch saves a lot of duplicate test and uses more logical naming

see
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-August/021035.html

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Felipe Sateler <fsateler@debian.org>
2014-08-12 21:28:52 +02:00
Peter Meerwald
a39a3b3f7d endianmacros: Fix PA_MAYBE_INT16_SWAP() macro
PA_MAYBE_INT16_SWAP() should call PA_INT16_SWAP(), not PA_INT32_SWAP

PA_MAYBE_INT16_SWAP() is not used (yet), so no big deal :)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-10 12:22:52 +03:00
Peter Meerwald
e14863334b tests: Cleanup mix-test
indentation and use of fabsf() for floats

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-10 12:20:52 +03:00
Peter Meerwald
6d9891e8b9 sconv: Use optimized conversion function for both directions
for example, the conversion function for
convert_from_float32ne(PA_SAMPLE_S16LE) can also be used for
convert_to_s16ne(PA_SAMPLE_FLOAT32LE)

v2: ARM can potentially be big- or little endian; only apply
optimization on LE based on WORDS_BIGENDIAN #define (thanks, Tanu)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-10 11:59:28 +03:00
Peter Meerwald
1499271f46 mix: Fix mixing of S24 samples stored as S32RE
pa_mix_s24_32re_c() should advance m->ptr by sizeof(int32_t)

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-08-10 10:33:28 +03:00
Rafael Ferreira
c57f8422f3 i18n: Updated Brazilian Portuguese translation
Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
2014-08-04 12:25:32 +03:00
Sajeesh Sidharthan
7dfffdf8e5 core: Closing proper file descriptor when pipe creation fails 2014-08-04 14:11:42 +05:30
David Henningsson
48edd0a00f alsa: Add a multichannel fallback mapping
In case all other profiles fail, try this fallback mapping as well.
It allows the device to specify the channel count, so it can be used
for devices that only supports being opened in multichannel mode.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-08-01 18:05:49 +02:00
David Henningsson
c15107eaf6 alsa: Allow "fallback" configuration for mappings and profiles
A fallback mapping or profile will only be considered for probing
if all non-fallback profiles fail.

If auto-profiles are used, a profile made up of one non-fallback
mapping and one fallback mapping will be considered a fallback profile.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-08-01 18:05:49 +02:00
David Henningsson
be8311417c alsa: Add "exact-channels" mapping configurability
Allow a mapping to relax the exact channel restriction:

exact-channels = yes | no # If no, and the exact number of channels is not supported,
                          # allow device to be opened with another channel count

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-08-01 18:05:49 +02:00
Alexander E. Patrakov
afbe9605c6 alsa: Add extra HDMI mappings
Remove extra-hdmi.conf, as the performance reasons behind it are invalid
Add 7.1 profiles
Add extra HDMI devices, for a total of 8
Add DTS-encoded profiles (they need dcaenc from git)

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-08-01 11:01:02 +02:00
Joe Marcus Clarke
69fae3e33a daemon: Don't try to lock and synchronise threads on (k)FreeBSD
Credits: Steven Chamberlain <steven@pyro.eu.org> is also a co-author
BugLink: http://bugs.debian.org/705435
Origin: http://svnweb.freebsd.org/ports/head/audio/pulseaudio/files/patch-src_daemon_main.c?revision=231972&view=markup&pathrev=231972
2014-08-01 10:47:18 +03:00