Commit graph

9012 commits

Author SHA1 Message Date
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
Arun Raghavan
878ef44079 core: Expose API to elevate a thread to realtime priority
This should make it easier for clients to elevate their audio threads to
real time priority without having to dig through much through specific
system internals.
2018-06-21 06:29:32 +05:30
Arun Raghavan
651a3d108e PROTOCOL: Bump to version 33
Required for the addition of new pa_encoding_t values.
2018-06-21 06:29:32 +05:30
Pierre-Louis Bossart
cdeac17801 format: Add support for Dolby TrueHD and DTS-HD HBR passthrough
Add definitions and fixups for channel count

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-06-21 06:29:32 +05:30
Sangchul Lee
47ed9ae1f4 rtp-send: remove dead code
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-06-21 06:29:32 +05:30
Tanu Kaskinen
385e73e63e .gitignore: add m4/extern-inline.m4 and remove-ptcdate.sed 2018-06-21 06:29:32 +05:30
Javier Jardón
57e3ccaf51 Use upstream gettext instead intltool 2018-06-21 06:28:59 +05:30
Yuri Chornoivan
63500323ef i18n: update the Ukrainian translation 2018-06-21 06:28:59 +05:30
Andika Triwidada
745f020821 i18n: update the Indonesian translation 2018-06-21 06:28:57 +05:30
Mr. M
db8588c987 i18n: update the Lithuanian translation 2018-06-21 06:24:40 +05:30
Luiz Augusto von Dentz
493892434a bluetooth: policy: Remove BlueZ 4 related code
This removes hfpw option and profile which were only used by BlueZ 4.
2018-06-21 06:24:40 +05:30
Luiz Augusto von Dentz
3b1093c0ad bluetooth: Remove BlueZ 4 support
BlueZ 4 is no longer supported by BlueZ community for a long long time,
also by moving to BlueZ 5 it should make it even more clearer that
BlueZ 4 is no longer an option.
2018-06-21 06:24:36 +05:30
Luiz Augusto von Dentz
fb600395e1 bluetooth: ofono: Use Acquire method if available
Attempt to use Acquire method if available since it directly returns
the fd in the reply or an error if that the connection could not be
created while Connect offer neither of these and depend on
NewConnection to deliver the fd.
2018-06-21 06:05:36 +05:30
Raman Shyshniou
556cdfa190 optimize set_state_in_io_thread() callbacks
Source and sink are passed in arguments to set_state_in_io_thread()
callbacks. There is optimal to access them directly.
2018-06-21 06:05:36 +05:30
Tanu Kaskinen
de705a0eea set exit_idle_time to 0 when we detect a session
As the comments explain, this fixes relogin problems on some systems
that remove our sockets on logout without terminating the daemon.
2018-06-21 06:02:21 +05:30
Bert Hekman
83675b3745 alsa-mixer: add support for SteelSeries Arctis 5 and renamed Arctis 7 files appropriately 2018-06-21 05:57:07 +05:30
Tanu Kaskinen
0d50e787f8 alsa-card: improve the profile availability logic
When a new card shows up (during pulseaudio startup or hotplugged),
pulseaudio needs to pick the initial profile for the card. Unavailable
profiles shouldn't be picked, but module-alsa-card sometimes marked
unavailable profiles as available, causing bad initial profile choices.

This patch changes module-alsa-card so that it marks all profiles
unavailable whose all output ports or all input ports are unavailable.
Previously only those profiles were marked as unavailable whose all
ports were unavailable. For example, if a profile contains one sink and
one source, and the sink is unavailable and the source is available,
previously such profile was marked as available, but now it's marked as
unavailable.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=102902
2018-06-21 05:50:29 +05:30
Raman Shyshniou
4895e52da9 loopback: use source sample spec and channel map by default
Currently the loopback module uses sample spec and channel map of the
sink by default. It leads to double resample if source and sink sample
specs are different and no rate/format specified in arguments. This
patch causes the source sample spec and channel map to be used by
default.
2018-06-21 05:50:29 +05:30
Raman Shyshniou
5864c4f976 loopback: add max_latency_msec argument
Currently loopback module indefinitely increases latency if underruns
occur. This patch allows to set up the upper limit of latency.
2018-06-21 05:50:29 +05:30
Georg Chini
4762aa45d9 core-util: correct error in set_nonblock()
set_nonblock() will always set the file descriptor to non-blocking,
regardless of the nonblock argument.

This patch fixes the issue by passing the correct argument to the
fcntl() call. The bug had no impact because there is only one caller
of pa_make_fd_block() in poll-win32.c
2018-06-21 05:50:29 +05:30
Arun Raghavan
114cdfbdde build-sys: First pass at a meson-ified build system
This is a working implementation of a build with meson. The server,
utils, and most modules build with this, and it is possible to run from
a build tree and play/capture audio on ALSA devices.

There are a number of FIXMEs, of course, and a number of features that
need to be enabled (modules, dependencies, installation, etc.), but this
should provide everything we need to get there relatively quickly.

To use this, install meson (distro package, or mesonbuild.com) and run:

  $ cd <pulseaudio src dir>
  $ meson <builddir>
  $ ninja -C <builddir>
2018-06-21 05:50:29 +05:30
Jean-Philippe Guillemin
04361ee0d2 alsa-mixer: add a profile-set file to fix iec958 input and output on CMEDIA USB2.0 High-Speed True HD Audio
The iec958 output uses device 2 and the iec958 input uses device 0. The
USB configuration in alsa doesn't set up the device numbers correctly,
which is why we need custom configuration in PulseAudio. Ideally this
would be fixed in alsa, but trying to get help for that wasn't
successful.
2018-06-21 05:50:29 +05:30
Tanu Kaskinen
43e6ef5c7b update NEWS 2018-06-18 17:10:46 +03:00
Tanu Kaskinen
ad14bdb240 sink-input, source-output: fix uninitialized variable access
The volume_map variable was initialized only for PCM streams, but the
variable was passed to pa_cvolume_remap() also for non-PCM streams. The
volume remapping is never necessary for passthrough streams (PCM or
not), because no volume will be applied anyway, so let's skip the
pa_cvolume_remap() call for all passthrough streams.
2018-05-31 16:29:29 +03:00
Tanu Kaskinen
9e5be0899f alsa-card: fix null dereference
jack->melem can be null if the jack disappears between probing the card
and the init_jacks() call. I don't know if jacks actually ever disappear
like that (seems unlikely), but this check is in any case needed as long
as init_jacks() has proper handling for the jack disappearing case
(rather than just an assert).

There was a crash report[1] that indicated that card_suspend_changed()
called report_jack_state() with a null melem. I don't know if that was
because the jack actually disappeared, or is there some other bug too.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=104385
2018-05-30 19:56:29 +03:00
Georg Chini
1e68e9aa10 alsa-util: Use time stamp config only for alsa versions >= 1.1.0
The commit "alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()"
broke the build on ALSA versions below 1.1.0 because the time stamp
configuration function was introduced in 1.1.0.

This patch makes the usage of snd_pcm_status_set_audio_htstamp_config()
dependent on ALSA version.
2018-05-15 07:52:19 +02:00