summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-24alsa-mixer: Switch to Headphone when Headphone mic jack is plugged inHEADmasterDavid Henningsson1-1/+0
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>
2013-04-24alsa-mixer: Allow input fallback port for devices with no gain controlDavid Henningsson1-1/+0
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>
2013-04-24alsa: Fix ELD access warning on shutdownDavid Henningsson1-0/+3
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>
2013-04-24default.pa: Load switch-on-port-available before udev-detectDavid Henningsson1-2/+3
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>
2013-04-24module-switch-on-port-available: Handle hotplugged cardsDavid Henningsson1-5/+62
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>
2013-04-24alsa: Initialize ports before sinks/sourcesDavid Henningsson1-1/+1
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>
2013-04-23i18n: Update Polish translationPiotr Drąg1-321/+378
2013-04-20pulsecore: Make run-from-build not readlink() on every callArun Raghavan1-5/+7
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.
2013-04-20daemon: Fix dlsearchpath while running from build treeArun Raghavan2-2/+12
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.
2013-04-20rygel: Set DLNA profile on our MediaItemsArun Raghavan1-0/+10
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.
2013-04-17doc: Explain PULSE_SERVER string in pulseaudio.1Peter Meerwald1-1/+7
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>
2013-04-17doc: Document PULSE_COOKIE in pulseaudio.1Peter Meerwald1-0/+3
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-04-17alsa-source: Fix log messageJoão Paulo Rechi Vita1-1/+1
The log message when updating the source sample rate wrongly mentions "Sink" instead of "Source". This was probably a copy and paste error.
2013-04-17doc: Some more nitpicking in pulse/def.h doxygen documentationPeter Meerwald1-6/+6
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-17doc: Mostly fixing up i.e. versus i.e.\ in doxygen documentationPeter Meerwald4-64/+64
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>
2013-04-16alsa-mixer: Change profile-sets directory to PA_SRCDIRDavid Henningsson1-1/+1
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>
2013-04-16Fix various typos in messages and commentsYuri Chornoivan8-20/+20
2013-04-16equalizer: Fix compiler warning due use of 'signal'Arun Raghavan1-33/+33
Changing uses of the symbol 'signal' as it redefines the signal-handling libc function of the same name.
2013-04-15build-sys: Bump sonamesv3.99.1Arun Raghavan1-6/+2
libpulse-simple changed this time as well (addition of hole-handling).
2013-04-14alsa: Fix mixer path when running from build treeArun Raghavan4-5/+5
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.
2013-04-14pulsecore: Don't conditionally inline pa_run_from_build_tree()Arun Raghavan2-12/+1
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.
2013-04-14alsa-mixer: Add more jack detection for Headset mic pathDavid Henningsson1-0/+6
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>
2013-04-10sink, source: Send notifications when flags changeTanu Kaskinen3-0/+8
The hooks aren't currently used, but for example, the D-Bus protocol could use them if it implemented flag change signals.
2013-04-10sink, source: Really set the fixed latency in ↵Tanu Kaskinen2-0/+7
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".
2013-04-10sink, source: Propagate flag changes to filtersTanu Kaskinen2-11/+46
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.
2013-04-10shm: Don't force the shm files to be read-onlyTanu Kaskinen1-1/+2
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
2013-04-09pstream: Optimise write of smaller packagesDavid Henningsson1-10/+25
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>
2013-04-09mix: Mix the right number of streamsTanu Kaskinen1-1/+1
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
2013-04-09semaphore-osx: posix implementation based on named semaphoresAlbert Zeyer1-11/+43
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=63014
2013-04-08socket-server: Make the new channel low-delay, not the listening oneDavid Henningsson1-2/+2
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>
2013-04-08pstream: Rename "do_something" functionDavid Henningsson1-3/+3
Rename it to "do_pstream_read_write" that better describes what the function does. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-04alsa-mixer: Add "Headset Playback|Capture" elementDavid Henningsson2-0/+14
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>
2013-04-02doc: Fix suggested dl-search-path in READMEPeter Meerwald1-1/+1
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>
2013-04-02alsa: skip eld initialization if hctl_handle is NULLMaarten Lankhorst1-0/+3
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>
2013-03-29systemd-login: Remove unused variable session.poljar (Damir Jelić)1-1/+0
2013-03-29console-kit, systemd-login: Check for logind, not for systemdMartin Pitt4-16/+8
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
2013-03-29remap: fix check when to apply specialized code pathPeter Meerwald3-3/+6
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>
2013-03-28sink: Fix flag name typoTanu Kaskinen1-1/+1
2013-03-28resample: Switch to speex-float-1 by defaultArun Raghavan3-5/+5
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).
2013-03-27alsa-mixer: It's valid to have zero elements in a pathDavid Henningsson1-14/+13
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>
2013-03-27Revert "card: Support adding ports dynamically"Mikel Astiz4-64/+0
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
2013-03-25build-sys: Use AM_CPPFLAGS instead of AM_CFLAGS for preprocessor argumentsJavier Jardón1-2/+3
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
2013-03-25client API: Document buffer_attr.maxlengthDavid Henningsson1-1/+7
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>
2013-03-25protocol-native: Lower default minreq in low-latency scenariosDavid Henningsson1-2/+8
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>
2013-03-25protocol-native: Ensure tlength is not set higher than maxlengthDavid Henningsson1-0/+2
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>
2013-03-25.gitignore: Add alsa-mixer-path-testTanu Kaskinen1-0/+1
2013-03-25protocol-native: Fix some debug outputArun Raghavan1-8/+8
s->buffer_attr_req is what we want to be printing from since that holds the actualy requested buffer attributes.
2013-03-25alsa: Minor debug log additionArun Raghavan1-2/+3
It's helpful to know what kind of scheduling latency we're expecting in that debug log.
2013-03-25stream: Make it easier to enable debug outputArun Raghavan1-6/+20
This is only useful while hacking on PulseAudio.
2013-03-25core: Fix up some debug loggingArun Raghavan1-4/+4
Replaces some debugging-only pa_log() calls with pa_log_debug() so we only get spammed while debugging if we want to be.