Commit graph

1434 commits

Author SHA1 Message Date
Pierre-Louis Bossart
051d82133f alsa: disable period wakeups in tsched mode if possible
This patch reflects a new capability that Lennart was wishing
for. Wish granted...

Re-submitting it now that alsa-lib 1.0.24
provides additional entry points to disable period
wakeups in timer-scheduling mode if hardware can
work without it (HDAudio, oxygen and Intel SST).

    Example with standard playback on HDAudio output
    Before change:

    Top causes for wakeups:
       3.8% (  5.4)   [hda_intel] <interrupt>
       2.8% (  4.0)   alsa-sink

    After change:
    Top causes for wakeups:
       2.3% (  3.0)   alsa-sink

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2011-02-01 09:41:02 +00:00
Arun Raghavan
9498440dc6 echo-cancel: Make Orc file names less silly
The naming was what it was because of the way orc.mak was originally
written. This has changed now.
2011-02-01 11:51:46 +05:30
Arun Raghavan
a9d824925d build: Simplify Orc-related make rules
This greatly simplifies the Orc-related make rules. The old system of
distributing generated files is gone, which means that anyone who wants
to build with Orc support enabled needs to have the orcc compiler
installed (presumably the orc 'devel' package in most distros).
2011-02-01 11:51:46 +05:30
Maarten Bosmans
974af43507 build: Don't include empty Makefile.am in subdirs 2011-01-31 12:40:43 +00:00
Colin Guthrie
8534149fbe Merge remote branch 'mkbosmans/rate-adjustment' 2011-01-31 11:45:50 +00:00
Lennart Poettering
1250b5d735 ratelimit: fix log levels of log suppression messages
When logging a suppression message do so on the same log level as the
suppressed messages.

Cherry picked by Colin Guthrie from ec5a785712
with a couple of additional changes due to extra limiting in master
that was not present in stable-queue.
2011-01-31 11:36:24 +00:00
Colin Guthrie
8c0e3efbf8 Merge commit 'e4979ab5cf' 2011-01-17 22:19:10 +00:00
Colin Guthrie
26c64fb54e tunnel: Fix automatic names when source/sink_name argument is missing.
Spotted by palmerdabbelt via #894
2011-01-16 14:34:11 +00:00
Maarten Bosmans
72b90ea8ac module-rtp-recv: Request proper rewind after underrun 2011-01-16 02:27:25 +01:00
Maarten Bosmans
27db0603d6 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-01-16 02:27:25 +01:00
Maarten Bosmans
e868638768 module-rtp-recv: Average the estimated real sample rate 2011-01-16 02:27:25 +01:00
Maarten Bosmans
d053a25b67 module-rtp-recv: Use new algorithm for adjusting sample rate 2011-01-16 02:27:25 +01:00
Maarten Bosmans
8b4cb54595 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-01-16 02:14:41 +01:00
Maarten Bosmans
11dbe30bfa module-loopback: Add adjust_time to valid args 2011-01-16 02:02:55 +01:00
Jyri Sarha
aefa94f052 alsa-sink: Don't assume we were able to enable hw-volume or sync-volume (v1.1)
This patch also disables mixer callback code if we do not have neither
HW-volume or HW-mute.
2011-01-15 13:26:21 +00:00
Jyri Sarha
98db3dffb6 alsa-sink: Fix double use of string 2011-01-15 13:26:07 +00:00
Cai Yuanqing
95ccbf7346 loopback: Add new arguments to disable stream move
The arguments sink_dont_move and source_dont_move have been added to toggle
module automatic unloading when the sink or source were no longer
available, rather than just moving them to the next available
sink/source (via rescue streams).

Reviewed and tweaked by Colin Guthrie.
2011-01-03 09:42:12 +00:00
Luiz Augusto von Dentz
e4979ab5cf bluetooth: detect when bitpool has changed on sbc codec
A2DP spec allow bitpool changes midstream which is why sbc configuration
has a range of values for bitpool that the encoder can use and decoder
must support.

Bitpool changes do not affect the state of encoder/decoder so they don't
need to be reinitialize when this happens, so the impact is fairly small,
what it does change is the frame length so encoders may change the
bitpool to use the link more efficiently.
2010-12-23 13:16:43 +02:00
Luiz Augusto von Dentz
96338eec28 bluetooth: fix build for libdbus < 1.3 2010-12-23 13:16:43 +02:00
Luiz Augusto von Dentz
07eea95dc1 bluetooth: fix case of profile UUIDs to match what BlueZ uses 2010-12-23 13:16:43 +02:00
Cai Yuanqing
d28fc0df89 coreaudio: Make coreaudio-detect safer by adding asserts before dereferencing 2010-12-22 15:08:19 +00:00
Chen Rui
fb05059acf fix bug about get source-output status 2010-12-20 11:31:15 +00:00
Zhang Wanming
0c0c285e79 Fix typos 2010-12-20 11:07:30 +00:00
Maarten Lankhorst
971bbe04a8 module-loopback: Prevent an infinite loop when rate adjusting is disabled 2010-12-12 20:30:36 +00:00
Maarten Lankhorst
01a853e0c0 bluetooth: Fix a2dp processing 2010-12-12 20:26:10 +00:00
David Henningsson
1e8b60e3a7 jack: Add module-jackdbus-detect 2010-12-05 16:06:09 +00:00
Arun Raghavan
de706d9cf7 build-sys: Fix a warning during distcheck
This adds a dummy Makefile.am to the dbus module to eliminate missing
directory warnings during distcheck.
2010-12-05 16:00:35 +00:00
Colin Guthrie
3e28f60592 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-05 15:58:59 +00:00
Arun Raghavan
8df8cfa0c2 echo-cancel: Fix source may_move_to function
This is required to make sure that the source output between
module-echo-cancel and ALSA can't get plugged to the virtual source or
monitor of the virtual sink that we expose. This could be triggered by
changing the profile of the underlying ALSA device.
2010-12-02 16:34:03 +05:30
Arun Raghavan
596e1792e0 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 16:30:59 +05:30
Juho Hämäläinen
027786c6de alsa-sink: take base volume into account when applying hw volume
Currently if sink base volume differs from 0dB and sync-volume is used,
wrong volume values are written to hw. This patch fixes that.

Signed-off-by: Juho Hämäläinen <ext-juho.hamalainen@nokia.com>
2010-12-01 10:42:17 +00:00
Daniel Mack
948950a3fd module-bonjour-publish: don't include avahi headers
The avahi layer won't work on OSX and is unnecessary, too.
2010-11-25 22:02:15 +00:00
Lennart Poettering
af18bc8038 alsa-source: fix enum types 2010-11-25 16:38:32 +00:00
Lennart Poettering
c72d878913 alsa-mixer: make a few strings translatable
Original patch contributed by 'kelemeng'

http://pulseaudio.org/ticket/843
2010-11-25 16:38:18 +00:00
Daniel T Chen
148a90e482 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:54 +00:00
David Henningsson
c2c11603a1 Add "Rear Mic" to alsa mixer paths.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2010-11-25 15:14:48 +00:00
Tanu Kaskinen
f1e43cd9b8 alsa: Print dB values in addition to percentages in debug messages.
How about this? There are a couple of bugs in sink_write_volume_cb,
by the way. Another patch will be sent once this dB value printing
patch is accepted.
-- 8< --
2010-11-19 16:21:21 +00:00
Arun Raghavan
1cbacead13 alsa: Sprinkle some PA_UNLIKELYs around error checks
This just adds a few PA_UNLIKELY macros around some error paths in
frequently called code.
2010-11-18 08:51:06 +00:00
Colin Guthrie
71cb35691c combine: Only check if the sink is h/w etc. in automatic mode 2010-11-17 23:56:56 +00:00
Stephen Moehle
ff7acb4d05 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-16 23:03:11 +00:00
Antti-Ville Jansson
b27be51f78 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-16 21:17:38 +00:00
Pierre-Louis Bossart
13cce22268 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-16 21:05:22 +00:00
Luiz Augusto von Dentz
e8a7d1932f bluetooth: make use of dbus-util helper functions 2010-10-20 14:30:05 +03:00
Colin Guthrie
44e4709871 dbus: Fix log message after volume changes. 2010-10-19 09:53:45 +01:00
Arun Raghavan
9b8f20f617 volume: Fix incorrect usage of PA_VOLUME_IS_VALID
The commit that introduced this macro was incorrect in some places. This
patch fixes these. Thanks to Pierre-Louis Bossart for pointing this out.
2010-10-19 09:52:19 +01:00
Daniel Mack
8aa332c6f5 alsa-mixer: add profile for Native Instruments Korecontroller 2010-10-16 12:23:46 +01:00
Jyri Sarha
3e53e3bba3 daemon-conf: Add sync volume parameters to daemon-conf
Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
2010-10-16 11:53:39 +01:00
Jyri Sarha
43b3f39a2f udev-detect: Add sync_volume parameter
Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
2010-10-16 11:53:39 +01:00
Jyri Sarha
1bea955829 alsa: Take syncronized HW volume infra into use for alsa-sink
Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
2010-10-16 11:53:39 +01:00
Arun Raghavan
49101fc540 volume: Clamp volume to PA_VOLUME_MAX
This ensures that we always clamp the volume to PA_VOLUME_MAX. While
this currently has no effect, it will be required for making sure we
don't exceed PA_VOLUME_MAX when its value changes in the future.
2010-10-15 01:10:00 +05:30