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
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
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
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>
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.
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.
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
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
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.
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.
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.
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>
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.
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.
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.
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.