Tanu Kaskinen [Sat, 18 Oct 2014 18:10:40 +0000 (21:10 +0300)]
shell-completion: zsh: Mark a variable as local
Variables are global by default, and we certainly don't want
_pactl_commands to be a global variable.
David Henningsson [Fri, 29 Aug 2014 12:54:19 +0000 (14:54 +0200)]
pstream-util: Fix build on freebsd
The previous fix was not entirely complete.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 15 Oct 2014 07:10:02 +0000 (09:10 +0200)]
configure: Remove "WIBBLE" test
Apparently "WIBBLE" is just a test, and maybe the test was "How
long does it take until somebody notices a strange row in configure.ac
and tries to remove it", if so, the test result is "a little over
three years". :-)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Thu, 16 Oct 2014 09:41:19 +0000 (11:41 +0200)]
protocol-native: Fail if trying to push unaligned memblock into queue
We will just ignore the memblock if this happens. We already have
a check for this in the client library, so this one is just for
security reasons.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Thu, 16 Oct 2014 09:41:18 +0000 (11:41 +0200)]
stream: Fail on client submitting non-frame-aligned memblocks
If somebody tries to push a non-frame-aligned memblock onto the
memblockq, then we should fail the write. Otherwise the daemon will
crash, see https://bugs.freedesktop.org/show_bug.cgi?id=77595
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Thu, 16 Oct 2014 09:41:17 +0000 (11:41 +0200)]
memblockq: Do not allow non-frame indices in the memblock queue
Since we don't allow lengths that are not frame aligned,
it does not make sense to allow indices that are not frame aligned
either.
Also, allowing such a thing to be added causes the daemon to crash
later instead (see https://bugs.freedesktop.org/show_bug.cgi?id=77595 ).
Also drop _se from assert (there is no side effect).
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Tue, 7 Oct 2014 13:56:55 +0000 (16:56 +0300)]
tunnel-sink-new: Fix requested latency check
This fixes a bug in latency configuration. The wrong type in the cast
caused UINT64_MAX being not treated as special, so the configured
latency was set to UINT64_MAX usecs, which of course is absurdly huge
latency.
Tanu Kaskinen [Tue, 7 Oct 2014 11:50:21 +0000 (14:50 +0300)]
bluetooth: Move stuff to pa_bluetooth_transport_put/unlink()
This should not have any effect on behaviour. The goal is to align
with the pattern that I think we should follow:
Object initialization:
- put() is the place to create references from other objects to the
newly created object. In this case, adding the transport to
discovery->transports was moved from new() to put, and adding the
transport to device->transports was moved from set_state() to
put().
Object destruction:
- unlink() undoes put() and removes all references from other objects
to the object being unlinked. In this case setting the
device->transports pointer to NULL was moved from set_state() to
unlink(), and setting the discovery->transports pointer to NULL was
moved from free() to unlink().
- free() undoes new(), but also calls unlink() so that object owners
don't need to remember to call unlink() before free().
Ricardo Salveti de Araujo [Wed, 1 Oct 2014 23:08:33 +0000 (20:08 -0300)]
vala: adding missing fields for sink_input/source_output info struct
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Arun Raghavan [Thu, 16 Oct 2014 15:09:22 +0000 (17:09 +0200)]
pulse: Initalise pa_threaded_mainloop with zeroes
Felipe Sateler [Sat, 11 Oct 2014 04:34:23 +0000 (01:34 -0300)]
util: Try finding out application name using dladdr if available
This fixes getting the binary name in the Hurd, or any other port using
the GNU C library, but only in the case where the library is directly
linked to. Opening with dlopen will not work.
Change in v3: reorder header includes and definitions
Change in v2: use a weak reference to main, so that we
don't crash when main cannot be found.
David Henningsson [Thu, 16 Oct 2014 10:24:19 +0000 (12:24 +0200)]
connect-stress-test: Fix number of streams per sink to "20"
This test broke when PA_MAX_INPUTS_PER_SINK was increased from 32 to 256.
Because we currently don't have time to figure out why, let's just set
NSTREAMS to 20 in the meantime.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Tue, 7 Oct 2014 13:55:47 +0000 (16:55 +0300)]
tunnel-sink-new: Limit the maximum latency to 200 ms
The default maximum latency is 10 seconds, which is not good,
especially since the tunnel sink doesn't support rewinding. Due to the
lack of rewinding, e.g. volume changes take a long time with large
latencies.
Ricardo Salveti de Araujo [Wed, 1 Oct 2014 23:07:04 +0000 (20:07 -0300)]
module-stream-restore: use entry_write when filling up the database
It seems at some point the code migrated to use the entry_write calls,
but fill_db is still using the old syntax, causing the entry to be
invalid.
The crash happens when clean_up_db gets called, which then calls
entry_read, causing the crash.
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Tanu Kaskinen [Mon, 6 Oct 2014 10:30:35 +0000 (13:30 +0300)]
switch-on-connect: Initialize userdata contents to zero
This fixes userdata.only_from_unavailable being uninitialized in case
the user doesn't give the value in modargs.
Dušan Kazik [Mon, 6 Oct 2014 10:19:19 +0000 (13:19 +0300)]
i18n: Update the Slovak translation
David Henningsson [Fri, 12 Sep 2014 08:01:24 +0000 (10:01 +0200)]
module-mmkbd-evdev: Don't crash on failure to close fd
If the keyboard is unplugged, it looks like the kernel is reporting
back -ENODEV when trying to close the fd. This is probably a kernel
error, but still, it's better to complain than to crash.
Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=80867
Reported-by: Stelios Bounanos
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Thu, 2 Oct 2014 09:14:09 +0000 (12:14 +0300)]
core-util: Add pa_unset_env()
Since we already have pa_set_env(), it's nice to also have a
corresponding function for unsetting environment variables.
Hui Wang [Fri, 26 Sep 2014 03:34:28 +0000 (11:34 +0800)]
module-switch-on-port-available: make the output more accurate
It is possible that the chosen active_port doesn't equal
new_data->active_port, using p->name is more accurate.
Please refer to sink_new_hook_callback()
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Pali Rohár [Thu, 25 Sep 2014 13:27:58 +0000 (15:27 +0200)]
bluetooth: bluez4: Add profile name to sinks and sources
Now a2dp and hsp sinks and sources will have different names which means that
applications and other modules can use sink/source to distinguish selected
profile.
Module module-device-restore uses sink/source name and port name as identifier,
so if different profiles have different names module-device-restore can store
volume settings for each profile.
So with this patch it is possible to configure different volume settings for
a2dp and hsp profiles.
This patch does not change port names so gnome applications will be happy.
Note that similar patch is needed also for bluez5, but I'm not using bluez5
so I cannot write or test it.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Hui Wang [Mon, 22 Sep 2014 03:50:49 +0000 (11:50 +0800)]
module-switch-on-connect: add an argument for conditionally connecting
On a machine without fixed connecting audio devices like internal
microphone or internal speaker, and when there is no external audio
devices plugging in, the default source/sink is alsa_input/alsa_output
and there is no input devices/output devices listed in the gnome
sound-setting.
Under this situation, if we connect a bluetooth headset, the gnome
sound-setting will list bluez input/output devices, but they are not
active devices by default. This looks very weird that sound-setting
lists only one input device and one output device, but they are not
active. To change this situation, we add an argument, the policy is
if a new source/sink is connected and current default source/sink's
active_port is AVAILABLE_NO, we let the new added one switch to
default one.
BugLink: http://bugs.launchpad.net/bugs/1369476
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Tanu Kaskinen [Fri, 19 Sep 2014 11:39:50 +0000 (14:39 +0300)]
Add a Valgrind suppression file
David Henningsson [Wed, 17 Sep 2014 06:56:51 +0000 (08:56 +0200)]
srbchannel: Defer reading when setting up read callback
Calling the callback while setting it up can make things
complicated for clients, as the callback can do arbitrarily
things.
In this case, a protocol error caused the srbchannel to be
owned by both the pstream and the native connection.
Now the read callback is deferred, making sure the callback
is called from a cleaner context where errors are handled
appropriately.
Reported-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 10 Sep 2014 12:52:01 +0000 (14:52 +0200)]
alsa-time-test: Make constants for channels and rate
Hard-coding constants on several places is bad coding practice.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 10 Sep 2014 12:45:01 +0000 (14:45 +0200)]
alsa-time-test: Do not use Lennart's card by default
Lennart probably had a card with a specific name. It is not a
common name anymore.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 10 Sep 2014 12:43:19 +0000 (14:43 +0200)]
alsa-time-test: Add fillrate parameter
As a third parameter, add the number of samples to read/write in
every iteration. This will help slow CPUs.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Luiz Augusto von Dentz [Wed, 17 Sep 2014 10:05:00 +0000 (13:05 +0300)]
bluetooth: Allow policy module to pick 'off' profile
This allow 'off' profile to be choosen when no other profile is available
which is considered better since it requires less resources than other
profiles.
João Paulo Rechi Vita [Wed, 17 Sep 2014 10:04:59 +0000 (13:04 +0300)]
bluetooth: Switch transport state to idle in case of HUP
In case the socket HUP the transport state should be set to idle which
will indicate the profile is no longer available.
João Paulo Rechi Vita [Mon, 15 Sep 2014 10:02:02 +0000 (13:02 +0300)]
bluetooth: Implement org.ofono.HandsfreeAudioAgent.NewConnection()
Dusan Kazik [Tue, 16 Sep 2014 11:30:31 +0000 (14:30 +0300)]
i18n: Add Slovak translation
David Henningsson [Mon, 1 Sep 2014 13:58:22 +0000 (15:58 +0200)]
alsa: Remove unnecessary hctl handles being passed around
Now that we have switched to using the mixer handle only,
there is no use for sending hctl handles around.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Mon, 1 Sep 2014 13:41:39 +0000 (15:41 +0200)]
alsa-mixer/card: Move to use the new mixer interface
Use the new mixer API to get callbacks, instead of using the hctl
API. Using the hctl API caused a memory leak, because alsa-lib itself
used the hctl callbacks, which we were previously overriding.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Mon, 1 Sep 2014 13:38:25 +0000 (15:38 +0200)]
alsa-util: Add functions for accessing mixer elements through mixer class
Instead of using the hctl interface, we can find controls belonging
to other iface types than "mixer". We do this by introducing a new
mixer class "SND_MIXER_ELEM_PULSEAUDIO" and create snd_mixer_elem's
for all PCM and CARD iface types (as Jacks are of the CARD type and
ELD controls are of the PCM type).
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:34 +0000 (11:48 +0200)]
bluetooth: Implement org.ofono.HandsfreeAudioAgent.Release()
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:33 +0000 (11:48 +0200)]
bluetooth: Handle CardRemoved signal
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:32 +0000 (11:48 +0200)]
bluetooth: Handle CardAdded signal
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:31 +0000 (11:48 +0200)]
bluetooth: Track oFono service
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:30 +0000 (11:48 +0200)]
bluetooth: Implement transport release for hf_audio_agent transports
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:29 +0000 (11:48 +0200)]
bluetooth: Implement transport acquire for hf_audio_agent transports
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:28 +0000 (11:48 +0200)]
bluetooth: Parse HandsfreeAudioCard properties
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:27 +0000 (11:48 +0200)]
bluetooth: List HandsfreeAudioCard objects from oFono
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:26 +0000 (11:48 +0200)]
bluetooth: Register/Unregister Handsfree Audio Agent with oFono
Register as a HandsfreeAudioAgent with oFono during backend
initialization and unregiter during backend finalization. This commit
also adds a check when receiving method calls or signals to make sure
the sender matches with the D-Bus service we're registered with.
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:25 +0000 (11:48 +0200)]
bluetooth: Create hf_dbus_send_and_add_to_pending() for oFono backend
João Paulo Rechi Vita [Wed, 10 Sep 2014 09:48:24 +0000 (11:48 +0200)]
bluetooth: Monitor D-Bus signals
Peter Meerwald [Wed, 23 Apr 2014 15:47:26 +0000 (17:47 +0200)]
tests: Remove mix-special-test
code has been moved to cpu-mix-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 21:48:17 +0000 (23:48 +0200)]
tests: Use float constants in cpu-sconv-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 22 Apr 2014 17:12:28 +0000 (19:12 +0200)]
tests: Add ARM NEON test code to cpu-remap-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 14:52:39 +0000 (16:52 +0200)]
tests: Add rearrange remapping test cases to cpu-remap-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 20:18:34 +0000 (22:18 +0200)]
tests: Add to remapping special case code tests to cpu-remap-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 20:18:05 +0000 (22:18 +0200)]
tests: Reorganize cpu-remap-test program
Make run_remap_test() support up to 8 input and output channels.
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 21:22:58 +0000 (23:22 +0200)]
tests: Use remap function passed in remap struct
Cleanup and add function to setup remap struct
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 20:49:14 +0000 (22:49 +0200)]
tests: Add ARM NEON test code to cpu-mix-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 23 Apr 2014 20:48:53 +0000 (22:48 +0200)]
tests: Add tests for mix special-case code
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 22 Apr 2014 16:25:48 +0000 (18:25 +0200)]
tests: Use single-line #ifdef for ARM NEON code
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 22 Apr 2014 16:19:05 +0000 (18:19 +0200)]
tests: Split cpu tests in separate files
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Fri, 18 Apr 2014 07:59:32 +0000 (09:59 +0200)]
cpu: Add force_generic_code flag to cpu_info struct
The remapper and channel mixing code have (faster) specialized and (slower)
generic code certain code path. The flag force_generic_code can be set to
force the generic code path which is useful for testing. Code duplication
(such as in mix-special-test) can be avoided, cleanup patches follow.
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 10 Sep 2014 13:53:37 +0000 (15:53 +0200)]
cpu: Don't check for both x86 and ARM code
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 10 Sep 2014 13:23:11 +0000 (15:23 +0200)]
core: Add pa_cpu_init() / cpu.c
move code dealing with CPU specific code path initialization
from daemon/main.c to pulsecore/cpu.c
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Luiz Augusto von Dentz [Wed, 10 Sep 2014 09:48:23 +0000 (11:48 +0200)]
bluetooth: Add discovery to pa_bluetooth_backend_new
Luiz Augusto von Dentz [Mon, 8 Sep 2014 10:35:33 +0000 (13:35 +0300)]
bluetooth: Only create backend instance once objects are listed
This makes sure the devices are discovered before the backend start
creating new transports.
David Henningsson [Wed, 10 Sep 2014 09:28:45 +0000 (11:28 +0200)]
configure: Fix spelling of "backend"
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Wim Taymans [Mon, 8 Sep 2014 09:15:55 +0000 (11:15 +0200)]
configure: fix headset check
Lukasz Marek [Tue, 15 Apr 2014 00:08:23 +0000 (02:08 +0200)]
Client API: Add pa_stream_write_ext_free() function.
New function allows to pass data pointer that is a member
of the outer structure that need to be freed too when data
is not needed anymore.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Sjoerd Simons [Sun, 31 Aug 2014 18:11:21 +0000 (20:11 +0200)]
alsa-mixer: recognize Dock headphone jack
Recognize the Dock headphone jack in the same way the normal & front
headphone jacks are detected.
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 12 Nov 2013 06:52:48 +0000 (07:52 +0100)]
core-util: Fail if XDG_RUNTIME_DIR belongs to someone else
Usually, PA will use the PULSE_SERVER X11 property instead of using XDG_RUNTIME_DIR,
so this environment variable does not matter.
If this property is not available, or if one is using the pacmd cli protocol,
the client will go ahead and call pa_make_secure_dir on XDG_RUNTIME_DIR/pulse.
This will either fail (if you're another regular user), or succeed (if you're root).
Both scenarios are bad - failing will cause the connection to fail, and succeeding
is even worse, as it can cause *other* connections to fail (as the directory
ownership has changed).
Instead fail and complain loudly.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=83007
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 2 Sep 2014 14:11:53 +0000 (16:11 +0200)]
alsa-mixer: Improve workaround for Valgrind's false warnings
Valgrind is not correctly handling ALSA TLV syscalls, which leads
to false warnings, looking like this:
"Conditional jump or move depends on uninitialised value(s)"
Unfortunately, alsa-lib itself also uses these values which valgrind
falsely believe are uninitialized, so not all warnings are removed,
but this is what we can do from PA until the valgrind bug is fixed.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Luiz Augusto von Dentz [Mon, 8 Sep 2014 09:14:43 +0000 (12:14 +0300)]
bluetooth: Add pa_bluetooth_transport_unlink
Luiz Augusto von Dentz [Mon, 8 Sep 2014 09:14:42 +0000 (12:14 +0300)]
bluetooth: Add pa_bluetooth_transport_set_state
Tanu Kaskinen [Sun, 7 Sep 2014 12:20:18 +0000 (15:20 +0300)]
alsa-mixer: Mark "Line HP Swap" as required-any
In the (theoretical) case that no other elements exists but
"Line HP Swap", the presence of that element signals that there are
headphone and line-out outputs, otherwise there would be nothing to
swap.
Peter Meerwald [Tue, 2 Sep 2014 21:53:09 +0000 (23:53 +0200)]
endianmacros: Replace borked PA_FLOAT32_SWAP() with PA_READ_FLOAT32RE() / PA_WRITE_FLOAT32RE()
building PA with -O0 leads to test failure in mix-test on i386
issue reported by Felipe, see
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-August/021406.html
the problem is the value 0xbeffbd7f: when byte-swapped it becomes 0x7fbdffbe and according
to IEEE-754 represents a signalling NaN (starting with s111 1111 10, see http://en.wikipedia.org/wiki/NaN)
when this value is assigned to a floating point register, it becomes 0x7ffdffbe, representing
a quiet NaN (starting with s111 1111 11) -- a signalling NaN is turned into a quiet NaN!
so PA_FLOAT32_SWAP(PA_FLOAT32_SWAP(x)) != x for certain values, uhuh!
the following test code can be used; due to volatile, it will always demonstrate the issue;
without volatile, it depends on the optimization level (i386, 32-bit, gcc 4.9):
// snip
static inline float PA_FLOAT32_SWAP(float x) {
union {
float f;
uint32_t u;
} t;
t.f = x;
t.u = bswap_32(t.u);
return t.f;
}
int main() {
unsigned x = 0xbeffbd7f;
volatile float f = PA_FLOAT32_SWAP(*(float *)&x);
printf("%08x %08x %08x %f\n", 0xbeffbd7f, *(unsigned *)&f, bswap_32(*(unsigned *)&f), f);
}
// snip
the problem goes away with optimization when no temporary floating point registers are used
the proposed solution is to avoid passing swapped floating point data in a
float; this is done with new functions PA_READ_FLOAT32RE() and PA_WRITE_FLOAT32RE()
which use uint32_t to dereference a pointer and byte-swap the data, hence no temporary
float variable is used
also delete PA_FLOAT32_TO_LE()/_BE(), not used
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Felipe Sateler <fsateler@debian.org>
Peter Meerwald [Wed, 3 Sep 2014 00:03:44 +0000 (02:03 +0200)]
svolume: Make volume pointer parameter const for pa_volume_float32re_c()
const obviously missing
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Mon, 1 Sep 2014 20:53:29 +0000 (22:53 +0200)]
daemon: Debian/kFreeBSD 9.2 fails to compile due to caps
Debian/kFreeBSD 9.2 comes with sys/capability.h but it is not usable; work around it
the patch does several things:
* it makes the comment point to the correct bugtracker issue: https://bugs.freedesktop.org/show_bug.cgi?id=72580
* it handles Debian/kFreeBSD the same way as FreeBSD
* it logs a warning that capabilities are actually NOT dropped
daemon/caps.c: In function ‘pa_drop_caps’:
daemon/caps.c:93:2: error: #error "Don't know how to do capabilities on your system. Please send a patch."
#error "Don't know how to do capabilities on your system. Please send a patch."
^
Makefile:9575: recipe for target 'daemon/pulseaudio-caps.o' failed
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
David Henningsson [Tue, 2 Sep 2014 09:50:39 +0000 (11:50 +0200)]
Replace "authorization" with "authentication"
Since we don't have "limited" clients, a client that authenticates
correctly is automatically authorized. However, it's the authentication
that can go wrong, rather than the authorization.
Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=78566
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 2 Sep 2014 10:09:44 +0000 (12:09 +0200)]
Make all debug/info level messages untranslatable
Debug and info messages are primarily meant for developers,
rather than end users. Let's save translators' time,
and leave them untranslated.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Lukas Peleska [Thu, 28 Aug 2014 09:04:53 +0000 (11:04 +0200)]
jack: made it possible to use multiple jack sources and sinks
Arun Raghavan [Sun, 31 Aug 2014 09:39:44 +0000 (15:09 +0530)]
srbchannel: Fix documentation error
I seem to have misread the code previously.
David Henningsson [Fri, 29 Aug 2014 13:00:24 +0000 (15:00 +0200)]
resampler: Remove duplicate forward declaration of pa_resampler
This duplicated line also caused a compiler warning on some compilers.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Tue, 26 Aug 2014 11:44:02 +0000 (13:44 +0200)]
sink/source: Fix restore of volume on devices without hw volume
Module-device-restore sets reference_volume, but soft_volume remains at
zero dB, so if a device only has soft_volume (i e no hw volume controls),
its volume was not restored correctly.
Reported-by: Richardo Salveti de Araujo <ricardo.salveti@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Tue, 12 Aug 2014 09:48:22 +0000 (12:48 +0300)]
device-manager: Don't allow setting an empty description in the client API
The module implementation treats an empty description as a protocol
error, so we should validate the description already at client side.
Tanu Kaskinen [Mon, 11 Aug 2014 09:47:46 +0000 (12:47 +0300)]
bluetooth: Always initialize profile->available
If the transport for the profile doesn't exist, the old behaviour was
to leave cp->available at the default value, which is
PA_AVAILABLE_UNKNOWN, but if there's no transport, the profile should
be marked as unavailable.
Tanu Kaskinen [Tue, 19 Aug 2014 11:08:34 +0000 (14:08 +0300)]
raop: Don't use incompatible default sample spec parameters
Since the RAOP sink supports only some formats and channel counts, we
shouldn't blindly use pa_core.default_sample_spec. This patch changes
things so that we default to PA_SAMPLE_S16NE and 2 channels, and only
take the sample rate from pa_core.default_sample_spec.
David Henningsson [Tue, 19 Aug 2014 12:37:59 +0000 (14:37 +0200)]
conf-parser: Add debug print of parsed files
This is useful for debugging.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 1 Aug 2014 16:09:42 +0000 (18:09 +0200)]
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>
Peter Meerwald [Mon, 18 Aug 2014 12:38:30 +0000 (14:38 +0200)]
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>
Peter Meerwald [Mon, 18 Aug 2014 12:10:44 +0000 (14:10 +0200)]
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>
Peter Meerwald [Mon, 18 Aug 2014 12:04:59 +0000 (14:04 +0200)]
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>
Peter Meerwald [Mon, 18 Aug 2014 11:33:22 +0000 (13:33 +0200)]
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>
João Paulo Rechi Vita [Fri, 22 Aug 2014 08:07:15 +0000 (11:07 +0300)]
bluetooth: Create oFono backend
João Paulo Rechi Vita [Fri, 22 Aug 2014 08:07:14 +0000 (11:07 +0300)]
bluetooth: Create NULL backend
João Paulo Rechi Vita [Fri, 22 Aug 2014 08:07:13 +0000 (11:07 +0300)]
bluetooth: Add BlueZ 5 headset profile names in policy module
Luiz Augusto von Dentz [Fri, 22 Aug 2014 08:07:12 +0000 (11:07 +0300)]
bluetooth: Assert transport has a matching profile
It is a bug if a transport has no matching profile.
João Paulo Rechi Vita [Fri, 22 Aug 2014 08:07:11 +0000 (11:07 +0300)]
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).
Arun Raghavan [Wed, 6 Aug 2014 02:04:24 +0000 (07:34 +0530)]
srbchannel: Trivial whitespace and style fixes
Mostly to improve readability and make things a bit more consistent.
Peter Meerwald [Mon, 18 Aug 2014 14:55:01 +0000 (16:55 +0200)]
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>
Peter Meerwald [Mon, 18 Aug 2014 15:02:40 +0000 (17:02 +0200)]
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>
Peter Meerwald [Tue, 12 Aug 2014 21:33:12 +0000 (23:33 +0200)]
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>
Peter Meerwald [Tue, 12 Aug 2014 21:14:13 +0000 (23:14 +0200)]
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>
Peter Meerwald [Tue, 12 Aug 2014 23:19:37 +0000 (01:19 +0200)]
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>
Peter Meerwald [Tue, 12 Aug 2014 23:19:13 +0000 (01:19 +0200)]
tests: Check expected result of sigbus-test
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 12 Aug 2014 22:30:01 +0000 (00:30 +0200)]
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>