Commit graph

9005 commits

Author SHA1 Message Date
Tanu Kaskinen
613c2994af update NEWS 2018-07-14 20:06:19 +03:00
Mr. M
8af711d3bd i18n: update the Lithuanian translation 2018-07-14 18:59:34 +03:00
Tanu Kaskinen
916be59151 pipe-sink, pipe-source: fix file permissions
We recently changed the umask of the daemon from 022 to 077, which broke
module-pipe-sink in the system mode, because nobody was allowed to read
from the pipe.

module-pipe-source in the system mode was probably always broken,
because the old umask of 022 should prevent anyone from writing to the
pipe.

This patch uses chmod() after the file creation to set the permissions
to 0666, which is what the fkfifo() call tried to set.

Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107070
2018-07-10 14:44:46 +03:00
Tanu Kaskinen
1b377d4428 ladspa-sink: fix search path
Having a single level macro for stringizing LADSPA_PATH doesn't work,
because the '#' preprocessor operator doesn't expand any macros in its
parameter. As a result, we used the string "LADSPA_PATH" as the search
path, and obviously no plugins were ever found.

This adds a two-level macro in macro.h and uses that to expand and
stringize LADSPA_PATH.

Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107078
2018-07-09 15:16:56 +03:00
Sangchul Lee
c4efbc81b0 alsa-sink/source: Rename a variable for supported sample rates in userdata
It is changed from 'rates' to 'supported_rates'.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-07-05 14:51:46 +03:00
Ing. Jaroslav Safka
bee9b9481a rtp-send: add configurable RTP stream name
Add configuration option 'stream_name' for stream/session name so user
will see it on receiver side as RTP Strean ($stream_name)

ex: load-module module-rtp-send source=rtp.monitor stream_name=MyServerMedia
2018-07-05 14:47:17 +03:00
Sangchul Lee
9d7055004e alsa-util/sink/source: Add infrastructure for supported sample formats
There has been a function to get supported sample rates from alsa and
an array for it in userdata of each module-alsa-sink/source. Similarly,
this patch adds a function to get supported sample formats(bit depth)
from alsa and an array for it to each userdata of the modules.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-07-04 12:51:23 +03:00
Sangchul Lee
7c066fd886 i18n: Update the Korean translation
Translate argument of module-filter-apply and fix words which are
not in common usage.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-07-04 12:19:44 +03:00
Tanu Kaskinen
6665b466d2 sink, source: remove the state getters
pa_sink_get_state() and pa_source_get_state() just return the state
variable. We can as well access the state variable directly.

There are no behaviour changes, except that module-virtual-source
accessed the main thread's sink state variable from its push() callback.
I fixed the module so that it uses the thread_info.state variable
instead. Also, the compiler started to complain about comparing a sink
state variable to a source state enum value in protocol-esound.c. The
underlying bug was that a source pointer was assigned to a variable
whose type was a sink pointer (somehow using the pa_source_get_state()
macro confused the compiler enough so that it didn't complain before).
I fixed the variable type.
2018-07-02 21:23:13 +03:00
Tanu Kaskinen
b4a36453da sink-input, source-output: remove the state getters
pa_sink_input_get_state() and pa_source_output_get_state() just return
the state variable. We can as well access the state variable directly.

There are no behaviour changes, except that some filter sources accessed
the main thread's state variable from their push() callbacks. I fixed
them so that they use the thread_info.state variable instead.
2018-07-02 18:54:03 +03:00
Tanu Kaskinen
64ba239f65 sink-input: remove the DRAINED state
The only thing that the drained state was being used for was "pacmd
list-sink-inputs". In all other cases the drained and running states
were treated as equivalent. IMHO, this usage doesn't justify the
complexity that the additional state brings.

This patch was inspired by a bug report[1] that pointed out an error in
an if condition in pa_sink_input_set_state_within_thread(). The buggy
code is now removed altogether.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=106982
2018-07-02 18:16:10 +03:00
Tanu Kaskinen
e40adfa9cc switch-on-port-available: ignore bluetooth cards
When the user manually switches the profile of a bluetooth headset from
"off" to "a2dp_sink", the port availability changes from "unknown" to
"yes", which triggered a recursive profile change in
module-switch-on-port-available. Such recursivity isn't (and possibly
can't) be handled well (that is, PulseAudio crashed), so let's avoid
doing bluetooth profile changes from module-switch-on-port-available
(they're useless anyway).

Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107044
2018-07-02 18:14:18 +03:00
Arun Raghavan
12c36beb0a travis: Update gettext along with other packages
Hopefully fixes the build.
2018-06-30 10:52:01 +05:30
Lyndon Brown
7cb2e4ad3d mainloop: constify is_our_api api ref 2018-06-29 15:09:32 +03:00
João Paulo Rechi Vita
517ee7c924 bluetooth: backend-ofono: Demote registration failure to info
Now that both backend-native and backend-ofono can coexist and
backend-ofono is always loaded, even on systems without oFono, failing
to register with org.ofono is not necessarily an error.

This lowers the failure message log level from error to info.
2018-06-28 12:26:08 +03:00
Milo Casagrande
c4648946f5 i18n: update Italian translation
Signed-off-by: Milo Casagrande <milo@milo.name>
2018-06-27 13:43:14 +03:00
Lyndon Brown
4e3a080d76 context: pa_context_get_tile_size: constify 2018-06-26 11:51:18 +03:00
Lyndon Brown
351731c697 context: pa_context_get_index: constify 2018-06-26 11:47:32 +03:00
Lyndon Brown
b88a219f32 context: pa_context_get_server_protocol_version: constify 2018-06-26 11:45:07 +03:00
Lyndon Brown
b4b37a0e66 context: pa_context_get_server: constify 2018-06-26 11:42:00 +03:00
Lyndon Brown
792c2f0d7b context: pa_context_is_local: constify 2018-06-26 11:39:34 +03:00
Lyndon Brown
3b1ecb720d context: pa_context_is_pending: constify 2018-06-26 11:37:19 +03:00
Tanu Kaskinen
e7c88ee169 context: constify pa_context_set_error()
This allows constifying public API functions that report their errors
via the context error but don't modify the context in any other way.
Philosophical arguments could be made why this is wrong, but I believe
in practice this is a net positive change.
2018-06-26 11:32:51 +03:00
Lyndon Brown
d251665f22 context: pa_context_rttime_restart: constify context pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
31da2a7d3f context: pa_context_rttime_new: constify context pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
ccf3d29264 context: pa_context_errno: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
f727cd9ac0 context: hide error attr behind pointer
Paves the way towards more of the API using const pointers.

Some pa_context_* functions return their errors by setting the context
error, even when there's no other change in the context state. This
prevented constifying the pa_context arguments of such functions. This
patch puts the error in its own struct behind a pointer, so that setting
the error doesn't any more count as modifying the pa_context object.
2018-06-21 06:30:25 +05:30
Lyndon Brown
9472bebcb0 stream: constify internal functions 2018-06-21 06:30:25 +05:30
Nazar Mokrynskyi
1e734e9946 alsa-mixer: Don't move LFE in 2.1 and 4.1 modes on SB Omni Surround 5.1
A bit hacky approach, but it allows to preserve LFE output position
even in reduced output modes 2.1 and 4.1.

Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
2018-06-21 06:30:25 +05:30
Tomaz Solc
3f2a0c17ba cli-command: Report error in pa_play_file.
Current code does not check whether pa_play_file call failed. Hence no error is
reported in the cli interface if playback failed because e.g. file isn't
readable by the daemon.
2018-06-21 06:30:25 +05:30
Lyndon Brown
e6226b07c0 stream: pa_stream_get_monitor_stream: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
6f2a70191d stream: pa_stream_get_format_info: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
c16b842ac0 stream: pa_stream_get_underflow_index: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
883421df03 stream: pa_stream_[writable|readable]_size: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
d1f708ecfc stream: pa_stream_is_[suspended|corked]: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
22f2a445a2 stream: pa_stream_get_device_[index|name]: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
274cb7b6d0 stream: pa_stream_get_index: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
31eb433d7b stream: pa_stream_get_context: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
6ab533c7aa stream: pa_stream_get_state: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
a24be6cc13 operation: pa_operation_get_state: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
9b5077c468 mainloop: constify get_retval functions 2018-06-21 06:30:25 +05:30
Lyndon Brown
277c3735df context: pa_context_get_state: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
326b749a78 context: pa_context_get_protocol_version: constify 2018-06-21 06:30:25 +05:30
Lyndon Brown
c0a70e8db8 context: pa_context_new_with_proplist: constify proplist param 2018-06-21 06:30:25 +05:30
Lyndon Brown
d851021cf5 volume: pa_cvolume_get_position: constify 2018-06-21 06:30:25 +05:30
Tanu Kaskinen
3455d62e49 alsa-mixer: make the mono mapping a fallback only
If a sound card doesn't have the "front" device defined for it, we have
to use the "hw" device for stereo. Not so long ago, the analog-stereo
mapping had "hw:%f" in its device-strings and everything worked great,
except that it caused trouble with the Intel HDMI LPE driver that uses
the first "hw" device for HDMI, and we were incorrectly detecting it as
an analog device. That problem was fixed in commit ea3ebd09, which
removed "hw:%f" from analog-stereo and added a new stereo fallback
mapping for "hw".

Now the problem is that if a sound card doesn't have the "front" device
defined for it, and it supports both mono and stereo, only the mono
mapping is used, because the stereo mapping is only a fallback. This
patch makes the mono mapping a fallback too, so the mono mapping is used
only if there's absolutely nothing else that works.

This can cause trouble at least in theory. Maybe someone actually wants
to use mono output on a card that supports both mono and stereo. But
that seems quite unlikely.
2018-06-21 06:30:25 +05:30
Lyndon Brown
5c2d28f6df scache: pa_context_play_sample_with_proplist: constify proplist param
If the given proplist is NULL, the function creates a new (empty)
proplist. That caused a compiler warning after the constification, which
is why the new proplist is now created using a separate variable.
2018-06-21 06:30:25 +05:30
Lyndon Brown
f17bcb0ad5 scache: pa_context_play_sample_with_proplist: clarify proplist param
Existing documentation was unclear about which property list would be the
one changed (merged into), making it seem (along with the non-const
proplist pointer param, which needs changing seperately), that the proplist
object for which a pointer is given will be the one merged into, instead of
the internal cached entry's proplist.
2018-06-21 06:30:25 +05:30
Lyndon Brown
4af27c25d2 proplist: pa_proplist_equal: constify proplist pointers 2018-06-21 06:30:25 +05:30
Lyndon Brown
2562446c4a proplist: pa_proplist_[size|isempty]: constify proplist pointer 2018-06-21 06:30:25 +05:30