Tanu Kaskinen [Wed, 26 Mar 2014 15:39:47 +0000 (17:39 +0200)]
hashmap: Add pa_hashmap_remove_and_free()
Peter Meerwald [Sat, 29 Mar 2014 17:03:05 +0000 (18:03 +0100)]
pactl: Clean up checking for VOL_RELATIVE flag
VOL_RELATIVE if a bit flag (1 << 4), hence we can simply do
if (vol_flags & VOL_RELATIVE) ...
instead of
if ((vol_flags & VOL_RELATIVE) == VOL_RELATIVE) ...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Thu, 13 Feb 2014 20:15:04 +0000 (21:15 +0100)]
pactl: Document ability to specify channel volumes individually
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Thu, 13 Feb 2014 20:07:06 +0000 (21:07 +0100)]
pactl: Check consistency of volumes specified
Must use one way to specify volumes consistently, e.g.
+3dB +3dB, mixing different ways is not allowed, such as
40% 1000
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Parin Porecha [Thu, 19 Dec 2013 11:58:15 +0000 (17:28 +0530)]
pactl: Allow to set volume of each channel independently (Bug #39190)
Example: pactl set-sink-volume "sink_name" 32000 40000
If the number of volumes provided is different than the number of channels
(excluding the case where a single volume is provided), an error message
is displayed explaining why the volumes could not be set.
patch proposed by Parin Porecha
code refactoring and commit message slightly edited by Peter Meerwald
Peter Meerwald [Tue, 15 Apr 2014 08:58:21 +0000 (10:58 +0200)]
pactl: Stop parsing option when the first non-option is encountered
fix bug
https://bugs.freedesktop.org/show_bug.cgi?id=77108
see getopt(3):
""By default, getopt() permutes the contents of argv as it scans, so that
eventually all the nonoptions are at the end. Two other modes are also
implemented. If the first character of optstring is '+' or the envi‐
ronment variable POSIXLY_CORRECT is set, then option processing stops
as soon as a nonoption argument is encountered. If the first character
of optstring is '-', then each nonoption argv-element is handled as if
it were the argument of an option with character code 1. (This is used
by programs that were written to expect options and other argv-elements
in any order and that care about the ordering of the two.) The special
argument "--" forces an end of option-scanning regardless of the scan‐
ning mode.""
prepend optstring with '+' to use POSIXLY_CORRECT mode
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 15 Apr 2014 08:37:26 +0000 (10:37 +0200)]
man: Fix typos in pulse-daemon.conf.5.xml.in
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
David Henningsson [Tue, 15 Apr 2014 09:52:22 +0000 (11:52 +0200)]
pstream: Use pa_xnew0 in initialization
...for simplicity.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Alexander E. Patrakov [Thu, 10 Apr 2014 15:13:43 +0000 (21:13 +0600)]
Name HDMI outputs uniquely
On Haswell hardware, there are multiple HDMI outputs capable of
digital sound output. As they were identically named, KDE's control
center was unable to distinguish them, restored the wrong profile and
thus routed sound to the wrong HDMI monitor.
Also, having identically-named menu items in other mixer applications
looks like a bug.
David Henningsson [Fri, 28 Mar 2014 10:09:14 +0000 (11:09 +0100)]
module-switch-on-port-available: Use new find best port function
Now that we have a generic function in device-port.h, we can use
it instead of the custom one.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 28 Mar 2014 10:55:24 +0000 (11:55 +0100)]
module-switch-on-port-available: Use port->card pointer
We now have a port->card pointer, we can use it instead of iterating
over cards to find the correct one.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 28 Mar 2014 10:59:09 +0000 (11:59 +0100)]
module-switch-on-port-available: Don't switch profiles on uninitialized cards
This could cause the HDMI port to become the default on some systems
where analog output was available.
BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73375
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Wed, 19 Mar 2014 07:50:39 +0000 (09:50 +0200)]
zeroconf-publish: Don't assume any particular defer event ordering
Also, initialize userdata with zeros to avoid invalid pointers in
client_free().
This fixes a crash when client_free() is called before
create_client(). The whole issue could be avoided by using some other
mechanism than defer events for running the two functions, but I'll
do that change later (I have also other cleanups planned for
zeroconf-publish).
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76184
Tanu Kaskinen [Wed, 19 Mar 2014 10:19:08 +0000 (12:19 +0200)]
client-conf: Don't create multiple cookie files
The old code loaded cookies at the time of loading the client
configuration, which could lead to creation of multiple cookie files.
For example, when pa_client_conf_load() was called, the default cookie
file was created, and then if PULSE_COOKIE was set,
pa_client_conf_env() would create another cookie file.
This patch moves the loading of the cookie to a separate function,
which pa_context calls just before needing the cookie, so the cookie
won't be loaded from the default file if PULSE_COOKIE is set. This
patch also splits the single cookie and cookie_file fields in
pa_client_conf into multiple fields, one for each possible cookie
source. That change allows falling back to another cookie source if
the primary source doesn't work.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=75006
Tanu Kaskinen [Wed, 19 Mar 2014 10:19:07 +0000 (12:19 +0200)]
client-conf: Remove redundant function parameters
Tanu Kaskinen [Wed, 19 Mar 2014 10:16:08 +0000 (12:16 +0200)]
util: Check that the home dir is an absolute path
Avoid unpredictable behaviour in case e.g. the HOME environment
variable is incorrectly set up for whatever reason.
I haven't seen non-absolute HOME anywhere, but this feels like a good
sanity check anyway.
Tanu Kaskinen [Wed, 19 Mar 2014 07:18:06 +0000 (09:18 +0200)]
pactl: Fix crash with older servers
Servers older than 0.9.15 don't know anything about cards, and card
operations will return a NULL pa_operation object when connected to
that old server. We must check the pa_operation pointer before passing
it to pa_operation_unref(), otherwise a NULL operation will result in
a crash.
David Henningsson [Fri, 21 Mar 2014 09:19:19 +0000 (10:19 +0100)]
sink/source: Initialize port before fixate hook (fixes volume/mute not saved)
In case a port has not yet been saved, which is e g often the case
if a sink/source has only one port, reading volume/mute will be done
without port, whereas writing volume/mute will be done with port.
Work around this by setting a default port before the fixate hook,
so module-device-restore can read volume/mute for the correct port.
BugLink: https://bugs.launchpad.net/bugs/1289515
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Wed, 26 Mar 2014 09:52:34 +0000 (11:52 +0200)]
introspect: Use pa_direction_valid() to validate port direction
There's no behavioral change, just nicer code.
Tanu Kaskinen [Wed, 26 Mar 2014 09:52:33 +0000 (11:52 +0200)]
direction: Add a couple of direction helper functions
Wim Taymans [Wed, 26 Mar 2014 14:57:16 +0000 (15:57 +0100)]
device-restore: log restored mute state
Log the mute state as it was restored
Peter Ujfalusi [Fri, 21 Mar 2014 07:18:40 +0000 (09:18 +0200)]
alsa-util: Reset hwparams_copy before the second try of buffer setup
hwparams_copy needs to be reset (as it is also reset for the third and
fourth try) before the second try.
If the reset is not done and the first try fails:
D: [lt-pulseaudio] alsa-util.c: Maximum hw buffer size is 743 ms
I: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_period_size_near() failed: Invalid argument
I: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: Set only period size (to 1102 samples).
We have three failures and finally the fourth (only period size) succeed.
With this patch:
D: [lt-pulseaudio] alsa-util.c: Maximum hw buffer size is 743 ms
I: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: Set period size first (to 1102 samples), buffer size second (to 4408 samples).
We only fail with the first try, the second (period followed by buffer) is
fine.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tanu Kaskinen [Sat, 15 Mar 2014 10:43:12 +0000 (12:43 +0200)]
doxygen: Update the configuration file
I reviewed the changes, and I didn't find anything that would actually
have effects on the generated output.
Tanu Kaskinen [Sat, 15 Mar 2014 07:37:06 +0000 (09:37 +0200)]
zeroconf-publish: Don't react to messages while shutting down
This fixes a case where pa__done() is called while
AVAHI_MESSAGE_PUBLISH_ALL is waiting for processing. The
pa_asyncmsgq_wait_for(AVAHI_MESSAGE_SHUTDOWN_COMPLETE) call will
process all pending messages, and processing AVAHI_MESSAGE_PUBLISH_ALL
causes publish_all_services(), and that in turn accesses u->services,
which has been already freed at this point. If we are shutting down,
we shouldn't react to any of the messages that the Avahi thread is
sending to the main thread.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76184
Tanu Kaskinen [Sat, 15 Mar 2014 07:37:05 +0000 (09:37 +0200)]
zeroconf-publish: Add locking around pa_mainloop_api_once()
Commit
e1e154c7377779377fa1a36655a10effd693f7b5 added locking around
pa_mainloop_api_once() everywhere except pa__done(). This fixes that
omission.
Tanu Kaskinen [Mon, 24 Mar 2014 07:22:20 +0000 (09:22 +0200)]
pacat: Fix partially translated message
The word "not" was not translated.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76529
Tanu Kaskinen [Mon, 24 Mar 2014 07:17:53 +0000 (09:17 +0200)]
core-util: Make pa_yes_no() translatable
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76529
Peter Meerwald [Mon, 17 Mar 2014 14:36:22 +0000 (15:36 +0100)]
doc: Fix some typos/wording in man/pulse-daemon.conf.5
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Tanu Kaskinen [Sat, 15 Mar 2014 07:52:07 +0000 (09:52 +0200)]
mainloop-api: Improve pa_mainloop_api_once() documentation
Tanu Kaskinen [Sun, 9 Mar 2014 08:56:07 +0000 (10:56 +0200)]
volume: Increase PA_SW_VOLUME_SNPRINT_DB_MAX
10 bytes isn't enough for "-123.45 dB", including the terminating null
byte.
Pete Beardmore [Thu, 13 Mar 2014 10:14:40 +0000 (10:14 +0000)]
alsa: Use card description in default sink/source prefix when available
When given an explicit device.description in card_properties, prefer
this information over other default prefixes (e.g. 'Built-in Audio')
when constructing sink/source descriptions.
For example, if I manually configure the card description to be
"FooBar", I then expect that the sinks and created by the card also
have "FooBar" in their description instead of generic "Built-in
Audio".
Tanu Kaskinen [Thu, 13 Mar 2014 11:04:55 +0000 (13:04 +0200)]
tunnel: Fix inverted if condition
David Henningsson [Tue, 11 Mar 2014 04:50:10 +0000 (05:50 +0100)]
alsa-mixer: Fix Analog Input showing up on USB Headset
In some cases, "Analog Input" could show up as well as
"Headset Mic" (or "Headphone Mic"), because I forgot to add the
relevant "required-absent" lines when I added the headset mic path.
As a result, both "Analog Input" and "Headset Mic" showed up on the
Logitech USB 530 Headset.
Reported-by: Steve Magoun <steve.magoun@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tanu Kaskinen [Mon, 10 Mar 2014 10:48:23 +0000 (12:48 +0200)]
pactl: Fix a copy-paster error
Peter Meerwald [Fri, 7 Mar 2014 12:08:35 +0000 (13:08 +0100)]
doc: Use \since doxygen command correctly in mainloop-api.h
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Fri, 7 Mar 2014 11:33:06 +0000 (12:33 +0100)]
core: add missing SET_PORT_LATENCY_OFFSET to dispatcher opcode string table
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Fri, 7 Mar 2014 12:34:41 +0000 (13:34 +0100)]
doc: Use correct parameter name wait_for_accept in documentation of pa_threaded_mainloop_signal()
also sneaks in a full stop in documentation elsewhere
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Alexander E. Patrakov [Fri, 7 Mar 2014 15:26:28 +0000 (21:26 +0600)]
Fix a few "it's -> its" typos
Peter Meerwald [Thu, 6 Mar 2014 12:15:12 +0000 (13:15 +0100)]
tunnel-source-new: Fix shadow compiler warning
CC modules/module_tunnel_sink_la-module-tunnel.lo
modules/module-tunnel-source-new.c: In function 'read_new_samples':
modules/module-tunnel-source-new.c:145:16: warning: declaration of 'read' shadows a global declaration [-Wshadow]
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Thu, 6 Mar 2014 09:31:32 +0000 (10:31 +0100)]
doc: Fix pa_stream_set_latency_update_callback() documentation
the latency_update callback is supported on playback AND record
streams
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Thu, 6 Mar 2014 09:25:35 +0000 (10:25 +0100)]
doc: Fix a couple of 'to to' typos
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Tanu Kaskinen [Wed, 29 Jan 2014 18:59:00 +0000 (20:59 +0200)]
alsa: Remove a redundant check
If mixer_handle is not NULL, then hctl_handle won't be NULL either.
The redundant check was confusing, because it looked like we would
leak the mixer_handle if mixer_handle is non-NULL and hctl_handle is
NULL.
James Bunton [Sun, 26 Jan 2014 14:14:39 +0000 (01:14 +1100)]
bluetooth: Fix timing to count based on decoded data
Currently the latency information is being updated based on the encoded
SBC data instead of the decoded PCM data. Fixing this required moving
the timing update to be after the packet has been decoded.
James Bunton [Sun, 26 Jan 2014 14:14:38 +0000 (01:14 +1100)]
bluetooth: Don't abort on SBC decoding error
The Nokia E7 running Symbian Belle Refresh seems to generate invalid SBC
packets every few minutes. This causes pulseaudio to disconnect the
stream and log "SBC decoding error (-3)".
If a single packet is bad, pulseaudio should keep playing the stream.
Tanu Kaskinen [Sun, 26 Jan 2014 15:40:31 +0000 (17:40 +0200)]
Remove all references to the removed KDE files
Rex Dieter [Wed, 22 Jan 2014 15:43:27 +0000 (09:43 -0600)]
daemon: ensure pulseaudio early startup on kde
Rex Dieter [Wed, 22 Jan 2014 15:41:35 +0000 (09:41 -0600)]
daemon: consolidate startup scripts
simplify pulseaudio autostart into one, avoid needless extra
work for kde, and avoid possible startup races.
Tanu Kaskinen [Mon, 3 Mar 2014 14:21:21 +0000 (16:21 +0200)]
suspend-on-idle: Fix monitor source handling
Fixes a crash that happened due to calling pa_source_check_suspend()
when d->source was NULL.
Tanu Kaskinen [Mon, 3 Mar 2014 13:42:21 +0000 (15:42 +0200)]
Update NEWS
Tanu Kaskinen [Sun, 23 Feb 2014 17:47:15 +0000 (19:47 +0200)]
rtp-send: Add "inhibit_auto_suspend" module argument
Some people want module-rtp-send to send silence when the sink that is
monitored goes idle, and some people want module-rtp-send to pause the
RTP stream to avoid unnecessary bandwidth consumption.
David Henningsson [Tue, 25 Feb 2014 15:56:49 +0000 (16:56 +0100)]
suspend-on-idle: Ensure we still time out if a stream remains corked
If a stream is started corked and remains corked, the sink/source
remained idle without being properly suspended. This patch fixes
that issue.
BugLink: https://bugs.launchpad.net/bugs/1284415
Tested-by: Ricardo Salveti <ricardo.salveti@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 28 Feb 2014 11:16:54 +0000 (12:16 +0100)]
sink-input/source-output: Fix LFE remixing suddenly enabled
Steps to reproduce:
1) Leave LFE remixing disabled (the default)
2) Start playback of stereo material on e g 5.1 surround, notice nothing in LFE
3) Now change profile to e g 4.0 surround and then back to 5.1 surround
4) Notice that LFE channel is now remixed
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Koop Mast [Sat, 22 Feb 2014 23:56:59 +0000 (00:56 +0100)]
Make tests compile on FreeBSD
cpu_set_t is named cpuset_t on FreeBSD.
Add headers to allow for warning free compilation.
Tanu Kaskinen [Sun, 23 Feb 2014 17:41:42 +0000 (19:41 +0200)]
rtp-send: Use _cb suffix with callbacks
Peter Meerwald [Thu, 20 Feb 2014 20:41:47 +0000 (21:41 +0100)]
doc: Assorted spelling and grammar fixes for doxygen output
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Fri, 3 Jan 2014 22:52:19 +0000 (23:52 +0100)]
modules: Fix uninitialized variable in rtp-send
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Koop Mast [Thu, 20 Feb 2014 23:21:46 +0000 (00:21 +0100)]
sconv, svolume: Fix compilation on 32-bit FreeBSD
Don't try to compile this code on 32-bit FreeBSD, it will error out complain
about registers only being available in 64-bit mode.
Arun Raghavan [Mon, 17 Feb 2014 11:02:40 +0000 (16:32 +0530)]
Revert "protocol-native: Don't enumerate unlinked sinks and sources"
This reverts commit
bd0bd9143f8159e5475b1295e30ec026ff0b6fef.
Arun Raghavan [Sat, 15 Feb 2014 04:34:39 +0000 (10:04 +0530)]
build-sys: Bump soname
Bumping from 0->3 since we missed bumping correctly for v4.99.{1,2,3}
Arun Raghavan [Sun, 8 Dec 2013 22:18:00 +0000 (14:18 -0800)]
protocol-native: Don't enumerate unlinked sinks and sources
This makes sure that there is no window between pa_sink/source_new()
and _put() where enumerating sinks/sources causes an assert (several
calls in sink/source_get_info need a linked sink or source).
Tanu Kaskinen [Wed, 12 Feb 2014 10:41:34 +0000 (12:41 +0200)]
sink-input, source-output: Don't crash if format negotiation fails
A segfault was reported on this line:
pa_return_val_if_fail(PA_SINK_IS_LINKED(pa_sink_get_state(data->sink)), -PA_ERR_BADSTATE);
After expanding the pa_sink_get_state() macro, the line looks like
this:
pa_return_val_if_fail(PA_SINK_IS_LINKED(data->sink->state), -PA_ERR_BADSTATE);
So data->sink was apparently NULL. That could happen if we try to fall
back to the default sink, but format negotiation fails.
This bug was introduced in commit
71816ecb7f81fe7a124cefa2258cfa64046908a1.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74646
Piotr Drąg [Tue, 11 Feb 2014 14:18:08 +0000 (15:18 +0100)]
i18n: Update Polish translation
Tanu Kaskinen [Wed, 12 Feb 2014 12:31:26 +0000 (14:31 +0200)]
man: pulse-cli-syntax: Document the "journal" log target
Juho Hämäläinen [Mon, 10 Feb 2014 10:46:28 +0000 (12:46 +0200)]
dbus: Use correct idxset when getting sources
This fixes get_sources() which iterates wrong idxset when
getting source object paths in GetSources or GetAll.
Wim Taymans [Thu, 6 Feb 2014 15:08:50 +0000 (16:08 +0100)]
man: improve man page and help for cmdline options
Tanu Kaskinen [Wed, 5 Feb 2014 15:55:44 +0000 (17:55 +0200)]
source: Increase max outputs per source
This change is just for being symmetric with sinks, which got this
change in
26bf2df903b1c7439ad3eef0dc3bb1e777835cc3.
Tanu Kaskinen [Tue, 4 Feb 2014 19:28:44 +0000 (21:28 +0200)]
protocol-native: Fix a crash
Without this check pa_source_output_set_volume() crashes if
so->volume_writable is false. The same check already exists for sink
inputs.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74529
Tanu Kaskinen [Sun, 26 Jan 2014 17:11:07 +0000 (19:11 +0200)]
thread-win32: Implement pa_thread_free_nojoin()
This fixes a build error with mingw32:
pulsecore/.libs/libpulsecommon_4.99_la-lock-autospawn.o: In function `unref':
/home/abuild/rpmbuild/BUILD/pulseaudio-4.99.2/src/pulsecore/lock-autospawn.c:123: undefined reference to `pa_thread_free_nojoin'
collect2: error: ld returned 1 exit status
pa_thread_free_nojoin() was initially only implemented for the pthread
based pa_thread backend, because it was incorrectly assumed that
autospawning (the only user of pa_thread_free_nojoin()) is not used on
Windows.
Reported-By: Michael DePaulo <mikedep333@gmail.com>
Tanu Kaskinen [Wed, 29 Jan 2014 18:54:39 +0000 (20:54 +0200)]
card-restore: Fix a memory leak
entry_read() may set entry->profile, so we need to free that string
before we can replace it with a new string.
Peter Meerwald [Mon, 2 Dec 2013 16:27:01 +0000 (17:27 +0100)]
resampler: Resample first followed by remapping if have more out channels than in channels
Reintroduces a cleaned-up version of commit
30ce3a14e5ae1cd316a18bec95b831c07ac57a1a which
was reverted by
1ce71cbd8206d1be59ac62274ad83cdbe693a96a; for more information see
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17479/focus=17487
The patch intends to reduce computational load when resampling AND remapping. The PA
resampler performs the following steps:
sample format conversion -> remapping -> resampling -> sample format conversion
In case the number of output channels is higher than the number of input channels, the
resampler has to be run more often than necessary. E.g. in case of mono to 4-channel remapping,
the resampler runs on 4 channels separately.
To ímprove this, the PA resampler pipeline is made adaptive:
if out-channels <= in-channels:
sample format conversion -> remapping -> resampling -> sample format conversion
if out-channels > in-channels:
sample format conversion -> resampling -> remapping -> sample format conversion
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Peter Meerwald [Mon, 2 Dec 2013 16:27:00 +0000 (17:27 +0100)]
resampler: Implement leftover handling in convert_to_work_format()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Mon, 2 Dec 2013 16:26:59 +0000 (17:26 +0100)]
resampler: Extend fit_buf() helper to copy leftover data to new buffer
the patch changes the interface of the (internal) fit_buf() function:
fit_buf() manages the memblock of the buf chunk, it reallocates the memblock
if the requested number of bytes ('len') if larger than the memblock's size ('size')
and optionally preserves 'copy' bytes
the code should be in line with the comment now
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Tanu Kaskinen [Mon, 27 Jan 2014 19:00:58 +0000 (21:00 +0200)]
module: Replace rindex() with strrchr()
rindex() appears to be "non-standard" to an extent, and it caused a
build failure on mingw32.
From the man page of rindex(): "POSIX.1-2008 removes the
specifications of index() and rindex(), recommending strchr(3) and
strrchr(3) instead."
Tanu Kaskinen [Sun, 26 Jan 2014 18:13:50 +0000 (20:13 +0200)]
device-manager: Don't try to use unlinked devices
This fixes an assertion crash:
[pulseaudio] source.c: Assertion 'PA_SOURCE_IS_LINKED(s->state)' failed at pulsecore/source.c:734, function pa_source_update_status(). Aborting.
The crash happened when a Bluetooth headset profile was changed from
a2dp to hsp. During the profile change three devices are created:
a sink, a monitor source for the sink, and a regular source. First
pa_sink/source_new() are called for each device, and that puts the
devices to u->core->sinks/sources. Then, pa_sink_put() is called for
the sink, and that in turn calls pa_source_put() for the source. At
that point module-device-manager decides to reroute all source
outputs. The non-monitor source that the Bluetooth card created hasn't
been linked yet at this stage, because it will only be linked after
the sink and the monitor source have been linked. So,
module-device-manager should take into account during the rerouting
that not all sinks and sources are necessarily linked. This patch does
that.
Reported-By: Iskren Hadzhinedev <i.hadzhinedev@gmail.com>
Tanu Kaskinen [Sun, 26 Jan 2014 14:41:29 +0000 (16:41 +0200)]
caps: Don't require --without-caps on FreeBSD
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=72580
Wim Taymans [Thu, 23 Jan 2014 11:21:53 +0000 (12:21 +0100)]
daemon: Remove deprecated Encoding from .desktop files
Encoding is deprecated according to
http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
Dominique Leuenberger [Fri, 24 Jan 2014 20:45:52 +0000 (21:45 +0100)]
build-sys: Move ORC_SOURCE definitions outside of "if HAVE_ORC"
Not having ORC_SOURCE defined results in different tarballs depending on
whether the dev issuing 'make dist' has orc support enabled or disabled.
Specifying ORC_SOURCE unconditionally addresses that, without causing
negative effects on users not having orc in the end.
Tanu Kaskinen [Thu, 23 Jan 2014 18:34:58 +0000 (20:34 +0200)]
build-sys: Add tests/runtime-test-util.h to the tarball
The file is used by three test binaries, but none of them mentioned
it in Makefile.am, which caused the file to be left out of the
tarball.
Tanu Kaskinen [Thu, 23 Jan 2014 10:05:52 +0000 (12:05 +0200)]
build-sys: Bump sonames
The bigger than usual bump in libpulse-simple was warranted by the
change in pa_simple_flush() that allows also record streams to be
flushed. There are no changes to the function signature, but it's in
practice a change in the ABI anyway, because new clients using the new
possibility won't work with older versions of the library.
libpulse-mainloop-glib got a bug fix in commit
68156d3f79b67c77f88050e6c9de180698377c64.
Tanu Kaskinen [Thu, 23 Jan 2014 09:21:58 +0000 (11:21 +0200)]
introspect, thread-mainloop: Fix Doxygen "since" tags
Daniel Albers [Thu, 16 Jan 2014 09:00:42 +0000 (10:00 +0100)]
combine-sink: fix segfault
Alexander Potashev [Sat, 11 Jan 2014 16:27:18 +0000 (20:27 +0400)]
Update Russian translation
Translated in sync with the guidelines at http://l10n.lrn.ru/wiki/Pulseaudio
Yuri Chornoivan [Mon, 13 Jan 2014 16:53:46 +0000 (18:53 +0200)]
Update Ukrainian translation
Tanu Kaskinen [Wed, 15 Jan 2014 16:59:18 +0000 (18:59 +0200)]
sink, source: Remove useless attach/detach stuff
The removed stuff wasn't used anywhere.
Tanu Kaskinen [Wed, 15 Jan 2014 12:24:25 +0000 (14:24 +0200)]
Revert "ladspa-sink: Handle empty chunks in sink_input_pop_cb"
This reverts commit
dbe66b0b5e6b6e24df45bda8bf656836f18e7f4b.
I accidentally pushed this patch that was superseded by
e96785c1c34706e902f28c25844f31d8201db2b2.
Ben Brewer [Wed, 15 Jan 2014 11:19:46 +0000 (11:19 +0000)]
ladspa-sink: Set a silence memchunk for the memblockq
A crash was observed that was caused by pa_memblockq_peek() returning
a NULL memblock in sink_input_pop_cb(). The scenario where this was
happening was
1. Delete 2 rtp-recv's connected to a ladspa-sink
2. Delete ladspa-sink
3. Delete alsa-sink
4. Create alsa-sink
5. Create ladspa-sink
6. Create 2 rtp-recv's connected to the ladspa-sink
The crash was probably caused by a rewind that made the read index go
negative while the write index was at least zero, causing there to be
a gap in the memblockq. The problematic rewind might have been caused
by adding the rtp-recv stream to the ladspa-sink. That has not been
proven, but this looks very similar to the bug that was fixed in
module-virtual-sink in commit
6bd34156b130c07b130de10111a12ef6dab18b52.
Ben Brewer [Wed, 15 Jan 2014 10:30:36 +0000 (10:30 +0000)]
ladspa-sink: Handle empty chunks in sink_input_pop_cb
Héctor Martín [Wed, 15 Jan 2014 10:20:27 +0000 (12:20 +0200)]
zeroconf-discover: Specify the interface when connecting to a link-local IPv6 address
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=40785
Tanu Kaskinen [Wed, 15 Jan 2014 09:37:26 +0000 (11:37 +0200)]
alsa: Mute "Bass Speaker" when using headphones or lineout
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73604
Ben Brewer [Tue, 14 Jan 2014 12:26:47 +0000 (12:26 +0000)]
rtp-send: Remove "don't inhibit auto-suspend" flag
A source is no longer considered idle in pa_source_check_suspend when
module-rtp-send is consuming data from it.
Tanu Kaskinen [Sat, 11 Jan 2014 14:47:56 +0000 (16:47 +0200)]
build-sys: Fix building with --as-needed
pulsecore/core-format.c was recently added to libpulsecommon, and
core-format.c depends on functions in libpulse, which libpulsecommon
doesn't link to. That broke building with --as-needed. This patch adds
pulse/format.c to libpulsecommon, so that core-format.c doesn't need
to depend on libpulse any more. format.c pulls in also the dependency
to json-c.
Reported-By: Jan Steffens <jan.steffens@gmail.com>
Laurentiu Nicola [Tue, 7 Jan 2014 18:26:50 +0000 (20:26 +0200)]
rtp-recv: Only try adding the group membership for multicast addresses
Tanu Kaskinen [Fri, 10 Jan 2014 10:41:00 +0000 (12:41 +0200)]
caps: Use standard macro when checking for Linux
linux and __linux are non-standard, according to
http://sourceforge.net/p/predef/wiki/OperatingSystems/
Reported-By: Damir Jelić <poljarinho@gmail.com>
Peter Meerwald [Fri, 3 Jan 2014 22:21:26 +0000 (23:21 +0100)]
alsa-card: Don't free the modargs in pa__init
The modargs are in both cases (a succesfull as well as a failed module
initialization) freed already in pa__done().
To avoid leaking modargs memory before they are assigned to u->modargs, the
code is reorganized to first allocate userdata, and then allocate the modargs.
Local variable ma is not needed anymore.
discussion here
http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-December/019661.html
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: poljar (Damir Jelić) <poljarinho@gmail.com>
Tanu Kaskinen [Wed, 18 Dec 2013 16:28:55 +0000 (18:28 +0200)]
format: Add some error logging
Tanu Kaskinen [Wed, 4 Dec 2013 04:18:42 +0000 (06:18 +0200)]
stream: Mention pa_stream_new_extended() in the high-level stream creation documentation
Tanu Kaskinen [Tue, 17 Dec 2013 21:42:09 +0000 (23:42 +0200)]
stream: Improve pa_stream_connect_playback() documentation
Tanu Kaskinen [Wed, 4 Dec 2013 04:17:11 +0000 (06:17 +0200)]
def, format: Document how to leave PCM parameters to be decided by the server
Tanu Kaskinen [Wed, 4 Dec 2013 04:09:23 +0000 (06:09 +0200)]
sink-input, source-output: Interpret missing PCM parameters in format info as a request to decide those parameters at the server end
The "fix flags" (PA_SINK_INPUT_FIX_FORMAT etc.) don't work properly
with the pa_stream_new_extended() interface. This patch fixes it so
that the same effect can be achieved by leaving some of the PCM
parameters unspecified in format info objects. Also, when converting
a sample spec to a format info when using the old pa_stream_new()
interface, the "fix flags" are taken into account in that conversion.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=68952
Tanu Kaskinen [Tue, 17 Dec 2013 19:22:50 +0000 (21:22 +0200)]
stream: Remove a volume channel validity check
The check is done for clients that use pa_stream_new() but not for
clients that use pa_stream_new_extended(). This is inconsistent. We
could check that the volume channels match the channels set in the
format info struct that is passed to pa_stream_new_extended(), but
that doesn't work if the format info doesn't contain the channel
information (that can happen if the client wants the server to choose
the channel count for the stream). And it should also be possible to
pass a mono volume for a multi-channel stream. The check could be
extended to handle all these cases, but I don't see much point in
wasting time on that. The server will anyway validate the stream
parameters, it's not particularly important to fail already when the
stream is being created at the client side.