Commit graph

3240 commits

Author SHA1 Message Date
Lennart Poettering
c524b4c5b5 memblockq: implement new call pa_memblockq_peek_fixed_size() 2011-03-28 14:40:59 +05:30
Colin Guthrie
b872254762 volume: Add a PA_VOLUME_UI_MAX define for the recommended max volume to show in UIs
This value is not a technical upper limit, it's just a 'sensible'
value that is not crazy high, but also allows software amplification
above 0dB (aka 100%) for very quiet audio sources.

We recommend that a comprehensive volume control UI should allow
users to set volumes up to this limit, although of course should
deal gracefully if the user has set the volume even higher than this
without resulting in a feedback loop that effectively limits the
upper volume.

The value chosen is +11dB. This was selected somewhat subjectively
and is very similar to the current 150% that gnome-volume-control
uses (which is ~+10.57dB).

On the plus side, we now recommend that everyone allows
'Volumes up to 11' which is pretty awesome.
http://en.wikipedia.org/wiki/Up_to_eleven

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-April/006945.html
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-April/006950.html
2011-03-03 13:29:08 +00:00
Colin Guthrie
a8cd9d2880 conf: Make system.pa use udev-detect and not hal-detect.
Also fix a left over reference to HAL in default.pa
2011-03-03 09:37:29 +00:00
Maarten Bosmans
2ee4ec507c module-rtp-recv: Remove smoother from write index
It isn't necessary anymore with the new algorithm.  The slow adjust of the
smoother was even detrimental to the accuracy of the rate estimate.
2011-02-25 10:34:50 +00:00
Maarten Bosmans
2bfc0322c9 module-rtp-recv: Average the estimated real sample rate 2011-02-25 10:34:46 +00:00
Maarten Bosmans
46200391f3 module-rtp-recv: Use new algorithm for adjusting sample rate 2011-02-25 10:34:41 +00:00
Maarten Bosmans
90c5520e03 Limit rate adjustments to small, inaudible jumps
The same logic is applied to the sample rate adjustments in module-rtp-recv,
module-loopback and module-combine:
 - Each time an adjustment is made, the new rate can differ at most 2‰ from the
   old rate.  Such a step is equal to 3.5 cents (a cent is 1/100th of a
   semitone) and as 5 cents is generally considered the smallest observable
   difference in pitch, this results in inaudible adjustments.
 - The sample rate of the stream can only differ from the rate of the
   corresponding sink by 25%.  As these adjustments are meant to account for
   very small clock drifts, any large deviation from the base rate suggests
   something is seriously wrong.
 - If the calculated rate is within 20Hz of the base rate, set it to the base
   rate.  This saves CPU because no resampling is necessary.
2011-02-25 10:34:37 +00:00
Maarten Bosmans
09770e5779 module-loopback: Add adjust_time to valid args 2011-02-25 10:34:33 +00:00
Arun Raghavan
67d188894c client: Don't update smoother while corked
This prevents the smoother attached to the stream clock from being
updated while the stream is corked, which in turn ensures that once
corking is completed, pa_stream_get_time() always returns the same value
until the stream is uncorked - i.e., the clock does not advance when the
client believes that it will not.

The actual call to pa_smoother_put() happens on things like stream
suspend/unsuspend, which trigger timing updates. This changes the
smoother coefficients, which means that a call to pa_smoother_get() for
the same value of 'x' can return different values before and after a
timing update.
2011-02-01 10:38:27 +00:00
David Henningsson
6b280e97e3 Fighting rewinds: Reduce calls to handle_seek
If many small blocks are in queue, handle_seek is being called
for every one of them, sometimes causing a rewind. Delay the
call until all blocks are handled, then call handle_seek only
once.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-01-31 11:38:55 +00:00
David Henningsson
3aeb047282 Fighting rewinds: Seek and write data in the same message
Allow a message in the queue to perform both a seek and a post data.
For clients that do not use PA_SEEK_RELATIVE (e g gstreamer), this
cuts the message count - and sometimes even the rewinds - in half.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-01-31 11:38:44 +00:00
Scott Reeves
1e1b299784 Core: Fix incorrect check of return value 2011-01-23 14:19:39 +00:00
Colin Guthrie
408072519e tunnel: Fix automatic names when source/sink_name argument is missing.
Spotted by palmerdabbelt via #894
2011-01-23 13:12:15 +00:00
Lennart Poettering
ec5a785712 ratelimit: fix log levels of log suppression messages
When logging a suppression message do so on the same log level as the
suppressed messages.
2011-01-22 01:08:36 +01:00
Colin Guthrie
862bbee309 console-kit: Console Kit support is dependent on DBUS and is thus optional.
Therefore, we must reflect this in the default.pa. Several users
have reported an error with consolekit when starting a self-built PA
due to the default config not working properly. This works around the
issue but we should include a warning on configure about the lack of
DBUS and udev support as this is a common mistake.
2011-01-11 11:27:30 +00:00
Michal Schmidt
7cb1401eae padsp: wrap __open_2 and __open64_2
These functions are used in OSS programs where the "flags" parameter for
open() is not a build-time constant and the build has _FORTIFY_SOURCE
enabled.
2011-01-10 20:49:56 +00:00
Chen Rui
6f870f501d fix bug about get source-output status 2010-12-20 11:30:49 +00:00
Zhang Wanming
4269b05b97 Fix typos 2010-12-20 11:08:31 +00:00
Vincent Becker
84c8b23c7f Fix return value of pa_sndfile_format_from_string
This prevented to use pacat --file-format option correctly
2010-12-18 11:25:09 +00:00
Yang Xichuan
d963b868de core: Fix variable "has_whined" value bug
In the file src/pulsecore/random.c

I found that the log information "Failed to get proper entropy. Falling
back to seeding with current time." would never be printed.

This change corrects the issue.
2010-12-18 11:21:02 +00:00
Maarten Lankhorst
3e6af07496 module-loopback: Prevent an infinite loop when rate adjusting is disabled 2010-12-12 20:32:28 +00:00
David Henningsson
205cad6eed jack: Add module-jackdbus-detect 2010-12-05 16:01:46 +00:00
Colin Guthrie
675cc0ae0b build-sys: Replace dummy Makefiles with proper Makefile.am's
This is needed to better support out of tree builds (including
distcheck) and to ensure the necessary folders are created in the
build tree on configure and also works around an intl-tools bug
(https://bugs.launchpad.net/intltool/+bug/605826)

The Makefile.am's used are minimal (and in some cases completely
blank). At present they do not include anything interesting
with the majority of the real work still done by the monolitic
src/Makefile.am

It may make sense to start splitting out src/Makefile.am into
smaller chunks but this commit makes the minimum changes to address
the issues that result from using make distcheck and other out of
tree builds.

Note: This 'breaks' the ability to type make in e.g. the src/modules
folder and have all of PA rebuilt accordingly (this is because the
static Makefiles previously present just did a "make -C ..") which
was purportedly for use in emacs. But I'm sure there will be a better
and more robust way to configure emacs to do your builds properly if
this behaviour is still desirable.
2010-12-04 13:59:48 +00:00
Arun Raghavan
bd769fa98a rescue-streams: Fix segfault in some conditions
There is a call to this function where 'skip' variable is NULL. Looks
like this code doesn't get hit very often, probably because a suitable
default sink can be found to move the stream to. However, if we can't
move to the default sink and skip is NULL, there will be a segfault.
2010-12-02 14:45:17 +00:00
Arun Raghavan
f6574c8c22 volume: Add explicit checks for ARMv6 instructions
This ensures that the build does not fail if the ssat and pkhbt
instructions are not available (armv5te and below).

Fixes: http://www.pulseaudio.org/ticket/790
2010-11-28 16:58:38 +00:00
Daniel T Chen
dad4b4e742 Handle 'Internal Mic 1' as an 'Input Source'
BugLink: https://launchpad.net/bugs/680810

Some laptops have 'Internal Mic 1' exposed as an 'Input Source', e.g., Dell
XPSM 1530, so handle these, too.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
2010-11-25 15:14:03 +00:00
David Henningsson
167a9a4ae6 Add "Rear Mic" to alsa mixer paths.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2010-11-25 15:13:34 +00:00
Lennart Poettering
b53f06a942 alsa-source: fix enum types 2010-11-25 04:34:04 +01:00
Lennart Poettering
9472d7aeec alsa-mixer: make a few strings translatable
Original patch contributed by 'kelemeng'

http://pulseaudio.org/ticket/843
2010-11-25 04:03:58 +01:00
Jan Kratochvil
745f59acff pulse: make sure legacy_dir is not static 2010-11-25 03:49:27 +01:00
Stephen Moehle
803659883d upnp: Implement the MediaServer2 D-Bus interface
This allows PulseAudio to work with versions of Rygel 0.7.1 and higher
which only support MediaServer2:
 http://live.gnome.org/Rygel/MediaServer2Spec
2010-11-17 23:44:57 +00:00
Colin Guthrie
70a060db92 combine: Only check if the sink is h/w etc. in automatic mode 2010-11-17 23:44:57 +00:00
Antti-Ville Jansson
33ea7b7816 combine: Handle reappearing slave sinks in non-automatic mode.
Earlier, if slave sinks were unlinked in non-automatic mode, their
re-appearance was disregarded. Now they are added back to the list of outputs.

Signed-off-by: Antti-Ville Jansson <antti-ville.jansson@digia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
2010-11-17 22:02:46 +00:00
Pierre-Louis Bossart
34fd605677 alsa: remove redundant call to snd_pcm_nonblock()
The PCM handle is already opened with the SND_PCM_NONBLOCK flag.
This additional call is useless.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-11-17 22:02:29 +00:00
David Fries
2c9c908e85 doxygen: Add 'See also' linking to the overview page
A good many of the header files are broken into a function
reference page and an overview page.  These changes add
a direct link from each function reference page to their
overview page if one exists.
2010-11-17 22:01:00 +00:00
David Fries
f2593da3a3 doxygen: Documentation improvements
stream.h, simple.h
The words drain and flush are a little ambiguous, make it explicit as
to what happens to any existing audio.

*mainloop.h
reword *_free and *_get_api for grammar
2010-11-17 22:00:47 +00:00
David Fries
14bc4548ce doxygen: Fix the "all" comments regarding volume helper functions.
Mostly change "Set the volume of all channels" to
"Set the volume of the first n channels" as the first is incorrect,
it doesn't set all the channels and doesn't explain what n was for.
2010-11-17 22:00:35 +00:00
David Fries
b7303e2dd4 doxygen: Fix documentation typos 2010-11-17 22:00:30 +00:00
Colin Guthrie
352ae22015 sink-input: Fix comment 2010-11-17 21:59:17 +00:00
Colin Guthrie
848dd378bb intended-roles: Mark devices with a form factor of 'headset' as being appropriate for 'phone' streams
This was a result a report by Patrick Ben Koetter relating to his
Logitech Wireless Headset.
2010-10-31 20:33:39 +00:00
Daniel Mack
8a30d4c06e alsa-mixer: add profile for Native Instruments Korecontroller 2010-10-31 20:32:39 +00:00
David Henningsson
a8d76e99ff SSE/MMX/ARM: Fix high frequency noise with unusual number of channels
In the assembly optimized versions of SSE, a noise could occur when the
number of channels were 3,5,6 or 7. For MMX and ARM, this could occur
when the number of channels were 3.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2010-10-13 14:52:13 +01:00
Colin Guthrie
a378c02ebb augment-properties: Fix debug messages and statement bracketing. 2010-10-06 09:16:16 +01:00
Colin Guthrie
9109a188cd suspend: Do not assert when checking for device suspended status and a stream is not linked.
When looping through the streams on a given device checking to see if the
stream is 'active' there should be no assert if the stream is not linked, it
should simply be ignored.

This assert can be hit if a sink and a sink input are both created and setup
but the final put calls are left to the end as is done in module-ladspa-sink.

While the order of the calls in module-ladspa-sink could be altered, we should
deal gracefully with the way it is now and not complain about ending up
in this state.

A trigger case was trivial:
 1. Load a ladspa-sink.
 2. Play a stream and move it to it.
 3. Unload the module, then reload it.
 4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks
    will ultimately hit this assert.

Thanks to Kim Therkelsen for highlighting this issue.
2010-10-05 10:13:53 +01:00
Colin Guthrie
a21b8328aa device-manager: Ensure that sinks/sources populate the device manager lists in order of their priority.
Currently the order of the sinks is simply that of their position in the idxset which is certainly
not what the user would want.
2010-09-29 22:10:29 +01:00
Colin Guthrie
858abe6cb9 augment-properties: Search for .desktop files in subfolders too. 2010-09-29 22:10:23 +01:00
Colin Guthrie
a7a6f4427d stream-restore: Clear the save_sink/save_source flags on apply_entry.
If the user specifically removes the device element from the stream
restore rule, we have to clear the save_sink/save_source flag of the
stream. This means that other stream routing systems
(e.g. module-device-manager) can take over routing for this
stream. In order to facilitate the reapplication of other routing
rules, we fire a stream change event. Arguably the stream itself
has not changed, but the rules governing its routing have, so
I feel this is justified.
2010-09-29 22:09:58 +01:00
Arun Raghavan
9729966ac3 Add a configure option to change 'udevrulesdir'
This patch serves two purposes:

  1) Allows something other than the de-facto standard udev rules dir or
     /lib/udev/rules.d to be used (the udev build system allows you to
     customise this)

  2) Allows a prefixed, non-root install (right now, the /lib/... path
     is hard-coded into the build system
2010-09-21 22:56:40 +01:00
Colin Guthrie
165cb87c38 x11: Use the default screen for X11 properties.
This commit restores the functionality originally included in 65e807
by Leszek Koltunski.
2010-09-18 11:38:44 +01:00
Colin Guthrie
5c0bc09180 xcb: xcb_get_setup() can return 0, so make sure we check it before using 2010-09-18 10:37:11 +01:00