Commit graph

7378 commits

Author SHA1 Message Date
Cheng-Chia Tseng
7682cab60e i18n: Update zh_TW translation
https://bugs.freedesktop.org/show_bug.cgi?id=56454
2013-08-06 09:34:11 +05:30
Peter Meerwald
834d10fe65 cli: Use pa_xnew0 to save some 0 inits
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-08-02 16:25:42 +02:00
Peter Meerwald
193bf997c1 pacmd: Discriminate between interactive and non-interactive mode
interactive sessions are initiated with a hello message in order to
receive a welcome message from the PA daemon and a command prompt

interactive sessions have a terminal connected to stdin

non-interactive sessions execute commands given on the command line
or received via stdin; non-interactive sessions have neither welcome
message nor command prompt

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-08-02 16:25:27 +02:00
Peter Meerwald
e729783331 cli: Output prompt and welcome message only when requested by 'hello'
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-08-02 16:24:41 +02:00
David Henningsson
e6051cdf8d alsa-mixer: Prefer moving "Capture" before moving boosts
Some HD-audio codecs (at least ALC269VB and ALC283) become quite noisy on
high Mic Boost levels. So e g, if there is a "Mic Boost" and a "Capture"
control, both ranging from 0 dB to +30 dB, you get better quality if
"Mic Boost" is 0 dB and "Capture" is +30 dB, than the other way around.

By changing the order in the configuration files, this patch makes us prefer
leaving "Mic Boost" low and "Capture" high if the user selects a medium gain.

(This is based on limited experience, and there is no guarantee that there are
no sound cards that work the other way around, and therefore this patch could
potentially regress quality on those machines. Hopefully those are fewer, so
this is what we should default to.)

BugLink: https://bugs.launchpad.net/1085402
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-08-02 15:17:04 +02:00
Arun Raghavan
55e169655d sample: Apply SPARC-specific condition on SPARC only
Improves correctness, unbreaks software volume in recent Android.
2013-08-02 14:25:29 +05:30
Kerrick Staley
328ef1d35a Fix typos in command_names 2013-07-31 14:25:17 +02:00
Tanu Kaskinen
1470fc325a resampler: Fix peaks resampler's channel handling
In the resampling phase the input and output data have the same number
of channels (o_ss.channels).
2013-07-29 10:49:19 +03:00
Tanu Kaskinen
60f1e695fd loopback: Increase the maximum allowed latency
Currently the biggest possible sink latency is 10 seconds. The total
latency of the loopback is divided evenly for the source, an
intermediate buffer and the sink, so if I want to test 10 s sink
latency, the total needs to be three times that, i.e. 30 seconds.
2013-07-29 10:43:12 +03:00
David Henningsson
908deb136c alsa-ucm: Make combination ports have lower priority
Usually, you want to use one input or output at a time: e g,
you expect your speaker to mute when you plug in headphones.

Therefore, the headphones+speaker port should have lower priority
and both headphones and speaker.

A practical formula to do this is 1/x = 1/xa + 1/xb + .. + 1/xn.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-07-26 14:30:08 +02:00
David Henningsson
ce21dc4348 daemon.conf: Document new speex-float-1 default
We document the default values in daemon.conf, but this was not
updated when we changed the default from speex-float-3 to speex-float-1.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-07-23 15:58:42 +02:00
Tanu Kaskinen
9813ada2ec vala: Add CVolume.set()
Thanks to Alberto Ruiz for the patch.
2013-07-18 09:16:22 +03:00
Tanu Kaskinen
7c3d31abe7 dbus: Fix invalid dbus_bool_t values
libdbus doesn't like it if it's passed a boolean whose value is not 0
nor 1.
2013-07-17 23:17:23 +03:00
Tanu Kaskinen
afb2c8f9e3 sink: Add missing curly braces
The missing braces didn't cause any practical problems, but obviously
the intention was to reset the chunk only if the memblock was
non-NULL.
2013-07-16 14:01:06 +03:00
Luiz Augusto von Dentz
16886bbf87 pactl: Print available flag of card profiles 2013-07-15 19:51:45 +03:00
Luiz Augusto von Dentz
b98a2e158f introspect: Expose card profile available flag
Available flag can be used by clients to disable the selection of
profiles unavailable.

Update protocol to 29
2013-07-15 19:41:07 +03:00
Tanu Kaskinen
b76b9c32d9 ucm: Fix an incorrect log message
The log message didn't match the code, so one of them was wrong. It's
entirely possible that the code is wrong, but I didn't have the
motivation to study the code enough to understand what the code is
supposed to do.
2013-07-15 17:09:07 +03:00
Tanu Kaskinen
b5e1c06a5e log: Harmonize log target output
The file targets used different output format than stderr and syslog.
That's now fixed.
2013-07-15 16:47:29 +03:00
Tanu Kaskinen
a1fdbcfaa7 log: Use pa_write() instead of write() 2013-07-15 16:46:06 +03:00
Tanu Kaskinen
bc2ed3482a log: Remove pa_log_set_fd()
The function isn't used any more.
2013-07-15 16:34:19 +03:00
João Paulo Rechi Vita
4a4b0c6785 build-sys: Fix misuse of "dependant"
Dependant in British English is a person who is financially supported by
someone else. To express software dependency relations "dependent"
should be used instead, which is correct for both British and US
English.
2013-07-15 13:08:55 +03:00
João Paulo Rechi Vita
ed4d0d989c bluetooth: Fix coding style 2013-07-15 13:08:20 +03:00
João Paulo Rechi Vita
4359647841 bluetooth: Remove unused DBusError 2013-07-15 13:08:16 +03:00
João Paulo Rechi Vita
701d86dca3 module: Fix style 2013-07-15 13:07:09 +03:00
Tanu Kaskinen
705d3c28f2 tunnel: Fix reading state from wrong variable
u->sink->state is not yet updated, so the state must be read from
u->sink->thread_info.state. This makes pausing and resuming of the
smoother happen at the right time.

Thanks to Pierre Ossman for the patch.
2013-07-14 13:39:32 +03:00
Tanu Kaskinen
999b47c099 caps: Fix compilation on Windows
Thanks to Pierre Ossman for the patch.
2013-07-14 13:26:24 +03:00
Pierre Ossman
e55f4edaad alsa: Support ALSA without a use case manager
The ALSA use case manager is a fairly recent addition,
so make sure the ALSA modules can be used on systems that
have an older version of ALSA.
2013-07-11 14:30:06 +03:00
Tanu Kaskinen
d90d99bd38 log: Fix thread name printing
Not all threads have a name.

Thanks to Pierre Ossman for the patch.
2013-07-11 14:15:33 +03:00
Tanu Kaskinen
ada83601f0 module: Fix crash in pa_module_unload_all()
Previously, if there were no modules loaded when the daemon exited,
pa_module_unload_all() would crash due to giving zero count to
pa_xnew().

Thanks to Pierre Ossman for the patch.
2013-07-11 13:35:24 +03:00
Tanu Kaskinen
1ce71cbd82 Revert "resampler: Resample first followed by remapping if have more out channels than in channels"
This reverts commit 30ce3a14e5.

The commit broke the leftover buffer handling, see [1] for more
information.

[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17479/focus=17487
2013-07-10 21:24:04 +03:00
Tanu Kaskinen
8e0e2617fb sink-input: Keep reference ratio up-to-date
The reference ratio should always be kept up-to-date. If the reference
ratio is not updated when the input volume changes, the stale
reference ratio ends up being used as the new input volume when the
input is moved.
2013-07-09 17:40:38 +03:00
Tanu Kaskinen
ee5e245afa Use pa_(c)volume_snprint_verbose() everywhere
All pa_cvolume_snprint(), pa_volume_snprint(),
pa_sw_cvolume_snprint_dB() and pa_sw_volume_snprint_dB() calls have
been replaced with pa_cvolume_snprint_verbose() and
pa_volume_snprint_verbose() calls, making the log output more
informative and the code sometimes simpler.
2013-07-09 17:37:04 +03:00
Tanu Kaskinen
596b2988a5 pulse: Add verbose volume printing functions
For more informative logging.
2013-07-09 17:20:28 +03:00
Mikel Astiz
8c81f4d0bd loopback: Fix cork state not updated after move
The source output and sink inputs should be corked if the corresponding
sink/source is suspended, as handled during module initialization. This
also needs to be handled during stream move, because the suspend state
of the destination sink/source might be different to the previous one.

This fixes the issue with an infinite number of "Requesting rewind due
to end of underrun" traces after a stream move.
2013-07-08 17:53:28 +03:00
Peter Meerwald
736e041980 sconv: avoid multiply in ARM NEON s16->float conversion
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-07-05 09:52:19 +03:00
Peter Meerwald
40c3c117e7 sconv: avoid multiply in ARM NEON float->s16 conversion
optimization idea taken from libavresample

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-07-05 09:38:52 +03:00
Tanu Kaskinen
0e8d26a6a1 channelmap, volume: Don't refer to bool in the public API documentation 2013-07-04 12:35:55 +03:00
Tanu Kaskinen
efcc3ba576 mainloop-test: Use FALSE instead of false for gboolean 2013-07-04 12:33:47 +03:00
poljar (Damir Jelić)
b224716f33 macro: Remove unneeded typedef for pa_bool_t. 2013-07-04 12:26:02 +03:00
poljar (Damir Jelić)
24a0639a21 Revert windows BOOL variables to use TRUE/FALSE instead of true/false 2013-07-04 12:25:56 +03:00
poljar (Damir Jelić)
b358aea89b Revert dbus_bool_t variables to use TRUE/FALSE instead of true/false 2013-07-04 12:25:47 +03:00
poljar (Damir Jelić)
408f0ba783 Fix alignment issues introduced by the pa_bool -> bool conversion 2013-07-04 12:25:40 +03:00
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
Tanu Kaskinen
e9822bfcb0 build-sys: Add native-instruments-traktor-audio2.conf to Makefile.am
Thanks to Jan Steffens for reporting the issue.
2013-07-03 15:22:05 +03:00
Tanu Kaskinen
944ffb0323 device-manager: Refuse to load empty descriptions 2013-07-02 17:49:17 +03:00
David Henningsson
242b8e5fd3 Revert "alsa-mixer: Add a couple of assertions"
This reverts commit 2613e4c747.

Please don't replace correct NULL pointer checks with assertions.
2013-06-28 16:16:22 +02:00
Tanu Kaskinen
67132eea1a device-manager: Add a sanity check for reading entries
There is code elsewhere that assumes that if user_set_description is
true, then the description is non-NULL.
2013-06-28 09:58:07 +03:00
Tanu Kaskinen
491c6a3a0b waveout: Simplify setting the device description 2013-06-28 09:57:05 +03:00
Tanu Kaskinen
2613e4c747 alsa-mixer: Add a couple of assertions
I checked the code to ensure that the assertions hold currently.
2013-06-27 19:18:36 +03:00
Tanu Kaskinen
0f2840f4c6 dynarray: Reimplement with nicer semantics
A dynamic array is a nice simple container, but the old interface
wasn't quite what I wanted it to be. I like GLib's way of providing
the free callback at the container creation time, because that way
the free callback doesn't have to be given every time something is
removed from the array.

The allocation pattern was changed too: instead of increasing the
array size always by 25 when the array gets full, the size gets
doubled now (the lowest non-zero size is still 25).

The array can't store NULL pointers anymore, and pa_dynarray_get() was
changed so that it's forbidden to try to access elements outside the
valid range.

The set of supported operations may seem a bit arbitrary. The
operation set is by no means complete at this point. I have included
only those operations that are required by the current code and some
unpublished code of mine.
2013-06-27 11:45:41 +03:00