Age | Commit message (Collapse) | Author | Files | Lines |
|
m->init() was called while m->index was uninitialized, which was bad
style.
|
|
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.
|
|
pa_write() knows two types of operation:
calling send() and calling write()
there is a flag (a pointer to an int) passed to pa_write()
which can remember which write type was successful
if the pointer is NULL or the int is 0, send() is tried first,
with a fallback to write() if send() resulted in ENOTSOCK
pa_fdsem_post() calls pa_write() with a NULL pointer;
unfortunately (at least with HAVE_SYS_EVENTFD_H #define'd) send()
always fails here and write() is called -- causing an extra syscall
quite frequently
strace:
send(17, "\1\0\0\0\0\0\0\0", 8, MSG_NOSIGNAL) = -1 ENOTSOCK (Socket operation on non-socket)
write(17, "\1\0\0\0\0\0\0\0", 8) = 8
the patch adds a write_type field to pa_fdsem to the successful
pa_write() type can be remembered and unnecessary send() calls are
avoided
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
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
|
|
Pressing Ctrl-C in a terminal while pasuspender is running
causes the sinks and sources to stay suspended after
pasuspender has exited, which is very annoying. This patch
fixes that problem, and also a similar problem with fork()
failures.
|
|
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>
|
|
|
|
The name variable is never NULL, so there's no point in using
pa_strna().
|
|
The old code accepted any word that started with "y", "Y",
"n", "N", "t", "T", "f" or "F". Fix this by having
a whitelist of full strings instead of checking just the
first letter.
|
|
the check for NEON so far only checked if -mfpu=neon is understood by the compiler,
however, this is not enough:
(i) #include <arm_neon.h> should be checked
(ii) -mfpu=neon must be passed before CFLAGS because eventually the per-library CFLAGS
for NEON code in src/Makefile.am are passed to the compiler before the global CFLAGS
in case the build environment passes CFLAGS to configure and we try to set conflicting
CFLAGS option, the former take precedence; CFLAGS cannot be overridden
this does not fix
http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-December/015570.html
but at least makes the build fail in configure (and not while compiling stuff)
and gives better diagnostics
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
|
|
Port creation is now slightly different. It is now similar to how
other objects are created (e.g. sinks/sources/cards).
This should become more useful in the future when we move more stuff to
the ports.
Functionally nothing has changed.
|
|
|
|
|
|
This commit makes the code cleaner, avoiding unnecessary line breaks. It
also changes the debug message elements order, to make it look more
natural ("path, interface, member" instead of "interface, path,
member").
|
|
|
|
|