Commit graph

8785 commits

Author SHA1 Message Date
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
Tanu Kaskinen
efba6e3b30 allow-passthrough: fix hook return value
-PA_ERR_NOENTITY is not a valid pa_hook_result_t value.
2018-05-07 16:53:57 +03:00
Arun Raghavan
f9f9877d18 module-allow-passthrough: Don't crash if we can't find a sink
module-allow-passthrough has a (necessary) hack to replicate the default
sink selection and format negotiation from sink-input.c. One thing that
got missed in this replication is the possibility that the sink input is
not compatible with the default sink. When this happen, we now exit
gracefully.
2018-05-06 08:04:08 +05:30
Sangchul Lee
66e8ec3453 ladspa-sink: fix incorrect error conditions
fix codes to prevent null pointer dereference of cdata variable.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-05-04 17:30:59 +03:00
Piotr Drąg
ae843808bc i18n: update Polish translation
https://bugs.freedesktop.org/show_bug.cgi?id=106284
2018-05-01 18:13:46 +03:00
Sangchul Lee
3f6a1c3b4c alsa-sink/source: always set reconfiguration callback
Reconfiguration callback should also be set in case of avoiding resampling
option. This patch set the callback for every case because the callback
has already conditions to leave if it is not needed.
Also unnecessary codes of setting alternate sample rate to 0 are removed.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2018-05-01 18:01:48 +03:00
Tanu Kaskinen
e3b68ee76f gsettings: run gsettings-data-convert from gsettings-helper
This was originally planned to be done by paprefs when it starts, but
since the schema is now fully controlled by pulseaudio, it makes sense
to run the conversion from pulseaudio instead.
2018-04-26 14:58:17 +03:00
wellington wallace
f8abe975ab vala: fix a struct field name and add missing source output volume/mute functions 2018-04-26 14:34:48 +03:00
Tanu Kaskinen
5d66b44203 build-sys: enable GSettings by default
A new paprefs release is expected soon, and it will only support
GSettings. In order to have the default configuration work with the new
paprefs version, we need to enable GSettings by default.

If both module-gconf and module-gsettings are enabled when building
PulseAudio, both modules will be part of the default configuration. That
can cause trouble, because when the GConf database is migrated to
GSettings, the old configuration in GConf is not removed, so both
module-gconf and module-gsettings will try to load modules.

Generally it's not necessary to have both modules enabled even at build
time, so let's default to having only one of them enabled.
2018-04-19 14:45:31 +03:00
Tanu Kaskinen
f97cd3449e gsettings: free group_names after use 2018-04-19 14:45:25 +03:00
Tanu Kaskinen
2977afb9b0 gsettings: free the module-group GSettings objects after use
g_settings_get_child() returns a new GSettings object that needs to be
freed when it's not used any more. This patch collects all the childern
to a GPtrArray and frees them at the end of main(). They can't be freed
earlier, because that would prevent the "changed" signals from being
delivered.
2018-04-19 14:45:19 +03:00
Tanu Kaskinen
705779eddd gsettings: remove bad signal connection
The removed g_signal_connect() call didn't make sense. The callback
expects to be called when individual module groups are changed, not when
the top level object is changed. Also, module_group_callback() expects
user_data to be non-NULL, but here it was set to NULL.
2018-04-19 14:45:13 +03:00
Tanu Kaskinen
8484b63c18 gsettings: check that children haven't been deleted before using them
According to the documentation of g_settings_list_children(), the listed
children may be removed at any time, so g_settings_get_child() may
return NULL. This is probably very unlikely to happen in practice, but
it's good to check anyway.
2018-04-19 14:45:06 +03:00
Tanu Kaskinen
f5ff5d8bf2 build-sys: remove a redundant enable_gsettings check
If HAVE_GSETTINGS is 1, then enable_gsettings must be yes, so checking
enable_gsettings isn't necessary.
2018-04-19 14:38:36 +03:00
Tanu Kaskinen
890bc108d6 gsettings: rename "module" to "module-group"
It is confusing if there's a thing named "module" which defines up to 10
modules to load. Calling the thing a "module group" instead should make
it easier to understand.
2018-04-19 14:38:29 +03:00
Tanu Kaskinen
0623b3c91e gconf, gsettings: fix config.h includes
config.h should be included by all .c files and none of the .h files.
2018-04-19 14:38:18 +03:00
Tanu Kaskinen
d7a457eaed gsettings: add the modules schema to the schema description file
Originally the idea was to provide the "modules" schema with paprefs,
but since module-gsettings refers to the "modules" schema in its code,
that would make module-gsettings depend on paprefs, which is not good.
Now all schemas are provided by module-gsettings, so the paprefs
dependency is avoided. Unfortunately this means that if paprefs is
modified to load some new modules, the schema in pulseaudio needs to be
updated as well.
2018-04-19 14:38:10 +03:00
Tanu Kaskinen
b43d47f005 default.pa: add module-gsettings
This also makes the module-gconf section conditional on HAVE_GCONF,
because if only gsettings support is built, the gconf section in the
configuration file would be redundant and confusing.
2018-04-19 14:31:18 +03:00
Tanu Kaskinen
29ed94600c .gitignore: add module-gsettings related things 2018-04-19 14:31:12 +03:00
Sylvain Baubeau
785b660d8a module-gsettings: new module to store configuration using gsettings
GConf is deprecated, and distributions are removing it. paprefs depends
on GConf, so in order to avoid paprefs getting removed as well, paprefs
has to be changed to use something else than GConf. GSettings is the
easiest alternative to migrate to, although it has the same problems
that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts
it in stdin-util.[ch], which is then reused by module-gsettings.
module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update
PulseAudio and paprefs at the same time, or first PulseAudio and then
paprefs. paprefs depends on module-gsettings, and module-gsettings
conflicts with module-gconf. Therefore module-gconf gets automatically
removed during the paprefs update. After the update an old PulseAudio is
likely to be running with module-gconf loaded. If the user tries to use
paprefs during this period, whatever the user does in paprefs won't have
any effect until PulseAudio is restarted (probably by a reboot or
relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert
(implemented in a later patch). That will copy the settings from GConf
to GSettings. If gsettings-data-convert is not available (it's part of
GConf, so it may have already been uninstalled), then any previous
paprefs settings are lost.
2018-04-19 14:30:30 +03:00
Felipe Sateler
ba2b748d40 qpaeq: fix Qt5 mainloop use
This change was missed in the Qt4 -> Qt5 conversion.
2018-04-11 15:26:19 +03:00