Commit graph

7486 commits

Author SHA1 Message Date
Tanu Kaskinen
9271c11e68 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.
2014-03-03 18:06:21 +02:00
James Bunton
3f21c21628 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.
2014-03-03 18:06:21 +02:00
James Bunton
4a5f48e7a4 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.
2014-03-03 18:06:21 +02:00
Tanu Kaskinen
f46799579f Remove all references to the removed KDE files 2014-03-03 18:06:20 +02:00
Rex Dieter
0ddde7c5b1 daemon: ensure pulseaudio early startup on kde 2014-03-03 18:06:20 +02:00
Rex Dieter
2b85ae0489 daemon: consolidate startup scripts
simplify pulseaudio autostart into one, avoid needless extra
work for kde, and avoid possible startup races.
2014-03-03 18:06:20 +02:00
Tanu Kaskinen
0a5adc95c4 suspend-on-idle: Fix monitor source handling
Fixes a crash that happened due to calling pa_source_check_suspend()
when d->source was NULL.
2014-03-03 16:21:21 +02:00
Tanu Kaskinen
2780f4c24f Update NEWS 2014-03-03 15:42:21 +02:00
Tanu Kaskinen
4ebe88c2b2 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.
2014-02-28 15:54:06 +02:00
David Henningsson
b55de5179a 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>
2014-02-28 13:58:40 +01:00
David Henningsson
732348c9d9 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>
2014-02-28 13:42:45 +01:00
Koop Mast
b115e9c592 Make tests compile on FreeBSD
cpu_set_t is named cpuset_t on FreeBSD.
Add headers to allow for warning free compilation.
2014-02-25 14:28:36 +02:00
Tanu Kaskinen
d94cd5f730 rtp-send: Use _cb suffix with callbacks 2014-02-23 19:45:02 +02:00
Peter Meerwald
ad61ef4477 doc: Assorted spelling and grammar fixes for doxygen output
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-02-23 17:03:50 +01:00
Peter Meerwald
0c4c2b3110 modules: Fix uninitialized variable in rtp-send
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-02-23 17:03:50 +01:00
Koop Mast
b0a04d8031 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.
2014-02-22 13:06:29 +02:00
Arun Raghavan
3152226502 Revert "protocol-native: Don't enumerate unlinked sinks and sources"
This reverts commit bd0bd9143f.
2014-02-17 16:32:40 +05:30
Arun Raghavan
80f138f20f build-sys: Bump soname
Bumping from 0->3 since we missed bumping correctly for v4.99.{1,2,3}
2014-02-15 10:04:39 +05:30
Arun Raghavan
bd0bd9143f 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).
2014-02-14 21:36:21 +05:30
Tanu Kaskinen
ee1a964994 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
71816ecb7f.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74646
2014-02-14 16:04:32 +02:00
Piotr Drąg
a9dfc07319 i18n: Update Polish translation 2014-02-14 15:42:12 +02:00
Tanu Kaskinen
9eb0bd004f man: pulse-cli-syntax: Document the "journal" log target 2014-02-12 14:31:26 +02:00
Juho Hämäläinen
6021ce3196 dbus: Use correct idxset when getting sources
This fixes get_sources() which iterates wrong idxset when
getting source object paths in GetSources or GetAll.
2014-02-11 12:02:28 +02:00
Wim Taymans
3cc4765d16 man: improve man page and help for cmdline options 2014-02-07 16:20:49 +02:00
Tanu Kaskinen
e9768d9aac source: Increase max outputs per source
This change is just for being symmetric with sinks, which got this
change in 26bf2df903.
2014-02-05 17:56:45 +02:00
Tanu Kaskinen
7297feb50b 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
2014-02-04 21:32:16 +02:00
Tanu Kaskinen
a64eead876 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>
2014-01-30 10:47:46 +02:00
Tanu Kaskinen
c95b4c22ca 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.
2014-01-29 20:56:42 +02:00
Peter Meerwald
537f430c99 resampler: Resample first followed by remapping if have more out channels than in channels
Reintroduces a cleaned-up version of commit 30ce3a14e5 which
was reverted by 1ce71cbd82; 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>
2014-01-28 23:08:54 +02:00
Peter Meerwald
b51d28bbbf resampler: Implement leftover handling in convert_to_work_format()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-01-28 22:49:15 +02:00
Peter Meerwald
5ad310f4f6 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>
2014-01-28 22:41:16 +02:00
Tanu Kaskinen
eab0544f23 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."
2014-01-27 21:00:58 +02:00
Tanu Kaskinen
588af08d25 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>
2014-01-26 21:20:31 +02:00
Tanu Kaskinen
97c27202ca caps: Don't require --without-caps on FreeBSD
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=72580
2014-01-26 16:41:29 +02:00
Wim Taymans
6ac599c1f4 daemon: Remove deprecated Encoding from .desktop files
Encoding is deprecated according to
http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
2014-01-26 16:20:14 +02:00
Dominique Leuenberger
a360b29a0a 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.
2014-01-24 22:56:27 +02:00
Tanu Kaskinen
0779caf3e8 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.
2014-01-23 20:34:58 +02:00
Tanu Kaskinen
041f22ae13 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
68156d3f79.
2014-01-23 12:12:59 +02:00
Tanu Kaskinen
9839ad492f introspect, thread-mainloop: Fix Doxygen "since" tags 2014-01-23 11:21:58 +02:00
Daniel Albers
6b82c6122b combine-sink: fix segfault 2014-01-17 12:21:39 +02:00
Alexander Potashev
7e53f902cc Update Russian translation
Translated in sync with the guidelines at http://l10n.lrn.ru/wiki/Pulseaudio
2014-01-17 12:10:53 +02:00
Yuri Chornoivan
fbb779cf63 Update Ukrainian translation 2014-01-17 12:05:46 +02:00
Tanu Kaskinen
c1c19e4d78 sink, source: Remove useless attach/detach stuff
The removed stuff wasn't used anywhere.
2014-01-15 18:59:18 +02:00
Tanu Kaskinen
7fd14b6f58 Revert "ladspa-sink: Handle empty chunks in sink_input_pop_cb"
This reverts commit dbe66b0b5e.

I accidentally pushed this patch that was superseded by
e96785c1c3.
2014-01-15 14:24:25 +02:00
Ben Brewer
e96785c1c3 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 6bd34156b1.
2014-01-15 13:50:11 +02:00
Ben Brewer
dbe66b0b5e ladspa-sink: Handle empty chunks in sink_input_pop_cb 2014-01-15 12:34:13 +02:00
Héctor Martín
4e5051db72 zeroconf-discover: Specify the interface when connecting to a link-local IPv6 address
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=40785
2014-01-15 12:20:27 +02:00
Tanu Kaskinen
a0f73b74eb alsa: Mute "Bass Speaker" when using headphones or lineout
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73604
2014-01-15 11:37:26 +02:00
Ben Brewer
298ffffd1a 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.
2014-01-14 14:57:10 +02:00
Tanu Kaskinen
56a1d3613d 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>
2014-01-11 16:47:56 +02:00