Commit graph

5412 commits

Author SHA1 Message Date
Daniel Mack
8aa332c6f5 alsa-mixer: add profile for Native Instruments Korecontroller 2010-10-16 12:23:46 +01:00
Jyri Sarha
58bdd97260 man: sync_volume parameters to manual page
Some wording teaks by Colin Guthrie and others.

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
2010-10-16 12:12:04 +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
Jyri Sarha
5391daf8df core: Add infrastructure for synchronizing HW and SW volume changes
To make concurrent use of SW and HW volume glitchles their application
needs to be synchronized. For accurate synchronization the HW volume
needs to be applied in IO thread. This patch adds infrastructure to
delay the applying of HW volume to match with SW volume timing. To
avoid synchronization problems this patch moves many of the volume and
mute related functions from main thread to IO thread. All these
changes become active only if the sync volume flag for a sink has been
set. So, for this patch to have any effect it needs to be taken into
use by sink implementor.

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:38 +01:00
Arun Raghavan
179b291b18 volume: Decrease PA_VOLUME_MAX to be < 2^31
This decrease PA_VOLUME_MAX to be less than 2^31. We want to do this in
order to simplify signed arithmetic when applying software volume
scaling (since the volume can now always be safely treated as a signed
number).
2010-10-15 01:10:00 +05:30
Arun Raghavan
3265424f27 pactl: Validate volume before setting
This makes sure that a valid volume is provided before setting on
sink/sink-input/source.
2010-10-15 01:10:00 +05:30
Arun Raghavan
0edbb2c6aa cli: Validate volume before setting
This causes an error to be generated if an invalid volume is provided to
commands that set sink/sink-input/source volume.
2010-10-15 01:10:00 +05:30
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
Arun Raghavan
1d2ef7923d volume: Use a macro to check if a volume is valid
This adds a PA_VOLUME_IS_VALID() macro for checking if a given
pa_volume_t is valid. This makes changes to the volume ranges simpler
(just change PA_VOLUME_MAX, for example, without needing to modify any
other code).
2010-10-15 01:10:00 +05:30
David Henningsson
4d84a00b49 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:03 +01:00
Colin Guthrie
489f50e2f4 Merge remote branch 'vudentz2/master' 2010-10-13 09:21:01 +01:00
David Fries
2e9c38aec1 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-10-13 09:07:39 +01:00
David Fries
2da3c47838 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-10-13 09:07:39 +01:00
David Fries
9295e4a0dc 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-10-13 09:07:39 +01:00
David Fries
34b568af95 doxygen: Fix documentation typos 2010-10-13 09:07:39 +01:00
Luiz Augusto von Dentz
8f3ef04b43 bluetooth: Add support for Media API
Make use of D-Bus to transfer file descriptors.
2010-10-07 17:22:41 +03:00
Colin Guthrie
3de129f3ac introspect: Include whether a stream is corked in the info callback. 2010-10-06 09:17:01 +01:00
Colin Guthrie
5e442f4e0e augment-properties: Fix debug messages and statement bracketing. 2010-10-06 09:17:01 +01:00
Colin Guthrie
b6be95ef53 sink-input: Fix comment 2010-10-01 01:39:35 +01:00
Colin Guthrie
d195a54979 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-01 01:39:35 +01:00
Colin Guthrie
b02abcb613 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:08:37 +01:00
Colin Guthrie
098e9ea1fb augment-properties: Search for .desktop files in subfolders too. 2010-09-29 22:06:01 +01:00
Arun Raghavan
f25676c2bb build: Copy orc dist files to the correct directory 2010-09-29 16:40:27 +01:00
Arun Raghavan
b424008160 echo-cancel: Use S16NE for adrian module
This forces us to get native-endian samples in the adrian module so that
we can rely on the existing endianness conversion mechanisms instead of
doing it in the module.
2010-09-27 16:57:01 +05:30
Arun Raghavan
6897217d26 echo-cancel: Ensure correct handling of endianness
The adrian module was using home-brewed endianness conversion instead of
the appropriate mactos, and speex assumed a little-endian host. This
fixes both of these.
2010-09-23 17:46:00 +05:30
Arun Raghavan
83d3c8f22b echo-cancel: orc-ify some bits for optimisation
This uses Orc to optimise an inner loop in the core NLMS function of the
Adrian echo canceller.
2010-09-23 17:17:03 +05:30
Arun Raghavan
963250abb9 echo-cancel: Add SSE optimisation to the adrian module
Optimises the core inner-product function, which takes the most CPU. The
SSE-optimised bits of the adrian echo canceller only if the CPU that PA
is running on actually supports SSE.
2010-09-23 17:17:03 +05:30
Arun Raghavan
ab4223e9cf cpu: Add CPU information to pa_core
This retains CPU information (processor type and supported features) in
pa_core, so that this information can be used by modules at init time to
figure out what optimisations may be used.
2010-09-23 17:17:03 +05:30
Arun Raghavan
ffcf3c8a6c build: Fix make distcheck
src/utils/qpaeq was not being dist'ed
2010-09-23 17:17:03 +05:30
Arun Raghavan
395dae4d1a echo-cancel: Fix out-of-tree build 2010-09-20 14:08:16 +05:30
Colin Guthrie
f73e9c19f7 x11: Use the default screen for X11 properties.
This commit restores the functionality originally included in 65e807
by Leszek Koltunski.
2010-09-18 12:05:38 +01:00
Colin Guthrie
c0e045d003 xcb: xcb_get_setup() can return 0, so make sure we check it before using 2010-09-18 12:05:26 +01:00
Colin Guthrie
24014e779c xcb: Ensure the XCB connection is valid before using it. 2010-09-18 12:05:19 +01:00
Colin Guthrie
38778117f8 x11: Partially convert to XCB.
This commit mostly converts the X11 handling to XCB. There are still
some uses of XLib to deal with the X11 session handling modules, however all
client-side code should now be free of XLib and thus this should fix Bug #799

Note that this removes the screen-based changes by Leszek Koltunski
in 65e80, however this will be restored in due course.
2010-09-18 12:04:09 +01:00
Colin Guthrie
2ecd764662 alsa: Only set the 'first' flag to false when we actually call snd_pcm_start()
Previously, if work_done was false, we could conceivably not call snd_pcm_start().
2010-09-14 19:44:57 +01:00
Colin Guthrie
f97faae006 alsa: Set the rewind safeguard proportionally to sample spec
Currently when rewinding alsa, a fixed value of 256 bytes is used,
which represents 1.33ms @ 48kHz (2ch, 16bit). This is typically fine
and due to DMA constraints we would not want to rewind less than this.

However with more demanding sample specs, (e.g. 8ch 192kHz 32bit)
256 bytes is likely not sufficient, so calculate what 1.33ms would
be and use which ever value is bigger.

Discussed with David Henningsson and Pierre-Louis Bossart here:
 http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7286
2010-09-14 08:32:51 +01:00
Daniel Mack
d30d22dfb8 alsa-mixer: add profile for Traktor Kontrol S4
This new audio interface from Native Instruments has 2 stereo channels
for both input and output direction. This patch adds mappings for them.
2010-09-12 13:15:36 +01:00
Rico Tzschichholz
49a90649e0 echo-cancel: Fix make distcheck
Add missing files to module_echo_cancel_la_SOURCES
Add Adrian license file to EXTRA_DIST
2010-09-10 12:11:51 +01:00
Wim Taymans
26dfacf20b echo-cancel: pause timer when echo canceling is off
While the sink or source is in the suspended state, disable the timer
callback because we are not doing any echo canceling then.
2010-09-09 17:03:46 +01:00
Wim Taymans
7b873785ca echo-cancel: improve accuracy
Make the echo canceler drift up to 1ms now that things are more accurate.
Add 10 samples of headroom to allow for timing inaccuracies.
2010-09-09 17:03:45 +01:00
Wim Taymans
c47d689613 alsa: make defines for smoother configuration
Make new defines for the smoother window size and adjust time constants instead
of reusing some unrelated constant.

Increase the smoother window size even more because the bigger it is, the
better. Since we have a 200ms max update interval and the max smoother history
is 64 entries, 10seconds is a good default.

Decrease the smoother adjust time to 1 second. The previous value of 4 seconds
was too much to adapt quickly after a resume.
2010-09-09 17:03:45 +01:00
Wim Taymans
771fb0b59b echo-cancel: rework alignment code
Rework the code to align capture and playback samples so that we can keep more
accurate timings.
2010-09-09 17:03:45 +01:00
Wim Taymans
f29acfd0e0 alsa: work around slightly broken _delay implementations
Use snd_pcm_avail_delay() in pa_alsa_safe_delay() so that we can check the delay
value against the avail value and patch it up when it looks invalid. Only do
this for capture.
2010-09-09 17:03:34 +01:00
Wim Taymans
b0042cec71 alsa-time-test: make test usable for capture too
Extend the test to also work for capture devices.
2010-09-07 12:23:14 +02:00
Wim Taymans
e382589d84 alsa-source: refactor smoother and device start
Move the code to start the capture and the smoother closer together to improve
smoother accuracy.
Rework things to look more like the alsa sink where the device is started in
only one place.
2010-09-07 12:22:51 +02:00
Wim Taymans
2ee7cd15b3 smoother: avoid losing precision
Avoid losing precision by subtracting uint64 values before converting them to
doubles.
2010-09-07 12:07:24 +02:00
Arun Raghavan
c36ab6896f echo-cancel: Mark immutable parameters as const in vfunc
Marks the recording and playback streams as const in the
pa_echo_canceller->run method for clarity.
2010-09-07 15:12:12 +05:30
Arun Raghavan
948a3d042c echo-cancel: Make blocksize a module-wide parameter
Since all algorithms will need to specify a block size (the amount of
data to be processed together), we make this a common parameter and have
the implementation set it at initialisation time.
2010-09-07 15:12:12 +05:30