Commit graph

8987 commits

Author SHA1 Message Date
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
Lyndon Brown
5a146049df proplist: pa_proplist_contains: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
25b55284db proplist: pa_proplist_to_string[_sep]: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
6161e106c0 context: pa_context_proplist_update: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
887150530a tagstruct: pa_tagstruct_put_format_info: constify format pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
e8c32998f7 tagstruct: pa_tagstruct_put_proplist: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
58c3f9b671 proplist: pa_proplist_gets: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
cc063264e6 proplist: pa_proplist_get: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
5d101fd2e2 proplist: pa_proplist_iterate: constify proplist pointer 2018-06-21 06:30:25 +05:30
Lyndon Brown
e82506f08d proplist: add and use const version of MAKE_HASHMAP macro 2018-06-21 06:30:25 +05:30
Lyndon Brown
b757a2de5b hashmap: constify pointer of pa_hashmap_get
relies upon the same having just been done for the private hash_scan
function
2018-06-21 06:30:25 +05:30
Lyndon Brown
d9f72d9f42 hashmap: constify pointer of private hash_scan function
paves the way for doing the same for pa_hashmap_get and users of it
2018-06-21 06:30:25 +05:30
Lyndon Brown
65450eea2c hashmap: constify hashmap ptr for various functions 2018-06-21 06:30:25 +05:30
Arun Raghavan
d0a9eabbac build-sys: Update meson.build based on recent changes
Bump the protocol version, and drop (commented out) references to BlueZ
4.
2018-06-21 06:30:25 +05:30
Sangchul Lee
ef094638f5 udev-detect, alsa-card: Adopt avoid resampling option from daemon.conf
Previously, the "avoid-resampling" option of daemon.conf is to make the
daemon try to use the stream sample rate if possible for all sinks or
sources.

This patch applies this option to module-udev-detect and module-alsa-card
as a module argument in order to override the default value of daemon.conf.

As a result, user can use this argument for more fine-grained control.
e.g.) set it false in daemon.conf and set it true for module-udev-detect
or a particular module-alsa-card in default.pa.(or vice versa)

To set it, use "avoid_resampling=true or false" as the module argument.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-06-21 06:30:25 +05:30
Nazar Mokrynskyi
3b2a5bdc10 alsa-mixer: More output modes for SB Omni Surround 5.1 and cleanup
There are only stereo and 5.1 output modes supported natively on this
sound card, but with this config more modes like 2.1, 4.0, 4.1 and 5.0
are now exposed. Also profiles list is cleaner now with all profiles
explicitly specified.

Last thing is removed support for microphone on Linux kernels older than
4.3-rc1, which shouldn't be an issue with future version of PulseAudio
likely be installed on newer kernels anyway.

Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
2018-06-21 06:30:03 +05:30
Arun Raghavan
50a7fb1ce3 map-file: Fix typo while adding pa_thread_make_realtime 2018-06-21 06:30:03 +05:30
Arun Raghavan
55525d75b8 null-sink,null-source: Use realtime scheduling if possible
We do this on other sink/source modules, and in general it makes sense
to do so here as well.
2018-06-21 06:30:03 +05:30
Tanu Kaskinen
78b6c4fe92 core-format: fix TrueHD and DTS-HD channel maps
Since these formats use 8 channels, the channel map needs to be
configured to 8 channels as well.
2018-06-21 06:30:03 +05:30