Commit graph

9005 commits

Author SHA1 Message Date
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
Tanu Kaskinen
26b41dd169 build-sys: remove module-defs.h.m4 from EXTRA_DIST
The file doesn't exist any more.
2018-05-11 14:28:14 +03:00
Tanu Kaskinen
d25387454a build-sys: fix distribution of GSettings files
dist_gsettingsdataconvert_DATA was set only if GSettings was enabled. If
the developer that generates the tarball doesn't have GSettings enabled,
pulseaudio.convert wouldn't get included in the tarball.

The schema file was not being added to the tarball even if GSettings was
enabled.
2018-05-11 14:28:14 +03:00
Tanu Kaskinen
0ee9d65467 build-sys: bump sonames
A few small internal changes in libpulse. No changes in libpulse-simple
and libpulse-mainloop-glib.
2018-05-11 13:53:31 +03:00
Georg Chini
b32705a5d4 alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()
The current code does not call snd_pcm_status_set_audio_htstamp_config()
to configure the way timestamps are updated in ALSA. In kernel 4.14 and
above a bug in ALSA has been fixed which changes timmestamp behavior.
This leads to inconsistencies in the delay reporting because the time
stamp no longer reflects the time when the delay was updated if the
ALSA report_delay flag is not set. Therefore latencies are not calculated
correctly.

This patch uses snd_pcm_status_set_audio_htstamp_config() to set the
ALSA report_delay flag to 1 before the call to snd_pcm_status(). With
this, time stamps are updated as expected.
2018-05-11 11:11:38 +03:00
Georg Chini
3b04539d5e bluez5-device: Fix memory leak in sco_process_render()
sco_process_render does not unref the memblock when it encounters an error.

This patch fixes the issue. It also changes the return value to 1 in the case
of EAGAIN. Because the data was already rendered and cannot be re-sent, we
have to discard the block.

Because the modified EAGAIN handling prevents the log message about EAGAIN
after POLLOUT from being printed, the log message was moved to
a2dp/sco_process_render().
2018-05-09 07:29:12 +02:00
Georg Chini
192c3aaef8 bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink
The rewrite of the thread function does not change functionality much,
most of it is only cleanup, minor bug fixing  and documentation work.

This patch also changes the send buffer size for a2dp sink to avoid lags
after temporary connection drops, following the proof-of-concept patch
posted by Dmitry Kalyanov.

Bug-Link: https://bugs.freedesktop.org/show_bug.cgi?id=58746

Additionally the patch changes the fixed latency for HSP playback from 125
to 25 ms. Tests showed that this produces better audio sync, which is
expected as HSP should have smaller latency than A2DP.
2018-05-09 07:27:58 +02:00
David Hewitt
dc65a03454 vala: Fix lengths for source/sink port arrays 2018-05-07 17:30:56 +03:00