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>
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>
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>
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>
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>
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).
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>
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>
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>
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>
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>
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>
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.
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.
There was no code that included files from other directories using
the #include "..." style before.
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
-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.
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.
_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.
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.
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.
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>
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>
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>
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>
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>
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>