Age | Commit message (Collapse) | Author | Files | Lines |
|
When a "Headphone Mic" jack becomes available, we do not know if
a headphone or a mic has been plugged in. Therefore, setting both
paths to "unknown" is, in theory, the correct thing to do.
However, in practice, people are more likely to plug in a headphone
rather than a mic. Therefore, allow autoswitch to the headphone port
when the jack is plugged in.
A more advanced implementation would consider what was plugged in last
time depending on what port was selected on the input side at that
time, and set availability accordingly. However, such an implementation
will have to wait (probably at least until we have our fancy routing
system implementation).
Buglink: https://bugs.launchpad.net/bugs/1169143
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
I recently came across a device without any ALSA-level mixer controls,
everything was physical knobs on the hardware.
This patch enables that device to get a port too ("Analog Input").
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
The hdmi_eld_changed callback is called by alsa-lib at shutdown.
In that case, just exit instead of trying to access something with
already closed handles.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
We need to pick the right port as early as possible, before the
first volume is picked up. Hence this module needs to be loaded
before the sound card modules are loaded.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
If a card is hot-plugged (which all cards will be when we load
this module before module-*-detect), make sure we don't start up
a sink with an unavailable port selected.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
This way port availability has been filled in when we create the
sink, which will later enable us to pick the right port directly.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
Since this is no longer only defined in debug builds, let's make sure
that there is no impact if this is indavertently called repeatedly at
startup.
|
|
It appears that, libltdl will find the .la file in the builddir and
figure out where the real .so is.
This also requires .ifexists to be fixed up to correspondingly search in
<dlsearchpath>/.libs.
|
|
We know we always serve up LPCM, and exposing this via D-Bus lets Rygel
set the appropriate metadata while presenting the raw (i.e.
non-transcoded) stream to clients.
|
|
first attempt to document the "server string"
See https://bugs.freedesktop.org/show_bug.cgi?id=62444
quite a bit is missing: [hostname], defaults
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
The log message when updating the source sample rate wrongly mentions
"Sink" instead of "Source". This was probably a copy and paste error.
|
|
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
same for e.g. versus e.g.\ and e.g. versus E.g.
this is ueber-nitpicking: will anybody ever notice?
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
A recent patch changed the path files from PA_BUILDDIR to PA_SRCDIR.
Do the same to the profile-set files for consistency (and to fix
out of tree builds).
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
Changing uses of the symbol 'signal' as it redefines the signal-handling
libc function of the same name.
|
|
libpulse-simple changed this time as well (addition of hole-handling).
|
|
The mixer paths are not available in ${builddir} - we need to look in
${srcdir}. This should fix running an in-tree build without make install
as well as alsa-mixer-path-test in make distcheck.
Since the most straightforward way to define PA_SRCDIR was in
Makefile.am, I'm moving PA_BUILDDIR there as well for consistency.
|
|
There's no good reason to assume an in-tree build will be debug-only.
This breaks alsa-mixer-path-test on make distcheck, for example.
|
|
On some machines which has a headset jack, the headset mic does not have its own
jack detection. Then we can look at the headphone jack to get some indication:
We know that if the headphone is unplugged, so is the headset mic. The opposite
is not guaranteed since the user might have plugged in a headphone, not a headset.
Also, there exist multi-function jacks which support both Headphone, Mic in headphone jack
and Headset Mic. In this case the jack name will be "Headphone Mic", not "Headphone", so
we need to include this name too.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
The hooks aren't currently used, but for example, the D-Bus protocol
could use them if it implemented flag change signals.
|
|
set_fixed_latency_within_thread(), always.
The old assumption seemed to be that if a sink or source has the
DYNAMIC_LATENCY flag set, it can never change, so the fixed latency
will always be zero. This assumption doesn't hold with filter sinks
and sources that are moved around.
This fixes a crash with two module-virtual-sink instances on top of
each other, when the bottom one is moved from a sink without dynamic
latency to a sink with dynamic latency. What happened was that first
the bottom virtual sink "updated" (due to this bug nothing was
actually updated) its fixed latency to match the master sink (zero
fixed latency), and then the top virtual sink updated its fixed
latency to match the master sink. The master sink was the bottom
virtual sink, whose fixed latency should have been set to zero, but it
was not, so the pa_sink_set_fixed_latency_within_thread() failed in
the assertion "latency == 0".
|
|
An example: let's say that there's an alsa sink and two filter sinks
on top of each other:
alsa-sink <- filter1 <- filter2
With the old code, if filter1 gets moved to another sink, and the
new sink doesn't have the LATENCY and DYNAMIC_LATENCY flags set
(unlike alsa-sink), filter1's flags are updated fine in the moving()
callback, but filter2 is not notified at all about the flag changes.
With this patch, the flag changes are propagated to filter2 too.
|
|
Forcing the shm file to be read-only makes shm_unlink() fail on OS X.
Thanks to Albert Zeyer for reporting the bug and investigating the
root cause.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=62988
|
|
During a stream, most packets sent are either memblocks (with SHM info),
or requests for more data. These are only slightly bigger than the
header.
This patch makes it possible to write these packages in one write
instead of two: a memcpy of just a few bytes is worth saving extra
syscalls for write and poll.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Passing channels instead of nstreams to pa_mix_ch2_s16ne() caused that
only the first two streams got mixed.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=63093
|
|
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=63014
|
|
I don't know if it matters a lot, but most certainly it must be
the new channel that's supposed to be made low-delay, not the existing
listening socket, right?
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Rename it to "do_pstream_read_write" that better describes what the
function does.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Found on Logitech B530 USB Headset / kernel 3.8. Because we don't
have different path for headset and headphone today, just add
Headset to the existing headphone path.
BugLink: https://bugs.launchpad.net/bugs/1159687
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
the README suggests to set the following dl-search-path: -p $(pwd)/src/.libs/
N: [lt-pulseaudio] daemon-conf.c: Detected that we are run from the build tree, fixing search path.
E: [lt-pulseaudio] ltdl-bind-now.c: Failed to open module /redacted/pulseaudio/src/.libs/.libs/module-device-restore.so: /home/pmeerw/src/pulseaudio/src/.libs/.libs/module-device-restore.so: cannot open shared object file: No such file or directory
the last part seems superfluous, so -p $(pwd)/src/
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
Due to a misconfiguration on my side my hdmi card didn't load with
snd-hda-codec-hdmi but through the fallback mechanism. Pulseaudio
would crash during early because hctl_handle was null, so skip
init_eld_ctls when hctl_handle is null to prevent a crash.
Thanks to David Henningsson for helping me find the underlying issue.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
|
|
It is possible to build systemd without logind, in which case sd_booted() wo
succeed. Check for /run/systemd/seats to test for logind instead, as
recommended by systemd upstream.
For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
Drop the now unnecessary linking against libsystemd-daemon, and stop linking
the consolekit module to any systemd library.
https://bugs.freedesktop.org/show_bug.cgi?id=62593
|
|
the specialized code path just duplicate samples, so are only
applicable if the volume in map_table is == 1.0 (or == 0x10000);
don't use them for volumes >= 1.0
compare the integer version of the volume stored in map_table;
comparing floats is ugly (als leads to compiler warnings)
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
|
|
This consumes less power, has low (no?) perceivable difference, and
allows the default configuration to work out of the box on low-end
systems (such as netbooks).
|
|
It's valid for a path to have zero elements, e g if it contains
a single jack only. Earlier, this would cause an assertion failure
in pa_path_condense.
Also convert pa_bool_t to bool.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
This reverts commit a9c3f2fb0fc1a1ee0072aac6425ad7311a2a5888.
It has been recently agreed that ports should somehow have some physical
meaning, leading to the port merge in module-bluetooth-device.
With this assumption in mind, it is very unlikely that a card would
add or remove ports dynamically. Therefore, the core can be simplified
by removing the support for this.
The revert affects the code added to module-card-restore in commit
a1a0ad1af209e58c136ac1c884aa5d14672a7144, which can now be partially
removed.
Conflicts:
src/pulsecore/card.c
src/pulsecore/core.h
|
|
As the automake documentation says:
AM_CPPFLAGS: The contents of this variable are passed to every compilation
that invokes the C preprocessor; it is a list of arguments to the preprocessor.
For instance, -I and -D options should be listed here
AM_CFLAGS: This is the variable the Makefile.am author can use to pass in
additional C compiler flags.
http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
|
|
Let's officially support that people use maxlength to put an upper
bound on playback latency.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
If minreq is not explicitly specified, it was always initialized to
20 ms (DEFAULT_PROCESS_MSEC). However when the total latency is not
much higher than 20 ms, this is way too high. Instead use
tlength/4 as a measure: this will give a decent sink_usec in all
modes (both traditional, adjust latency and early request modes).
This greatly improves PulseAudio's ability to ask for data in time
in low-latency scenarios.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Tlength should never be set higher than maxlength. While this is
corrected by memblockq later, we still need a correct tlength for
the subsequent calculations.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
s->buffer_attr_req is what we want to be printing from since that holds
the actualy requested buffer attributes.
|
|
It's helpful to know what kind of scheduling latency we're expecting in
that debug log.
|
|
This is only useful while hacking on PulseAudio.
|
|
Replaces some debugging-only pa_log() calls with pa_log_debug() so we
only get spammed while debugging if we want to be.
|