Commit graph

9489 commits

Author SHA1 Message Date
Tanu Kaskinen
1f5da4c20b gitlab: explain the container image tag better 2019-12-21 05:15:31 +00:00
Arun Raghavan
c48f36fcb3 gitlab: Make container updates automatic 2019-12-21 05:15:31 +00:00
RODRIGUEZ Christophe
6f48bc9508 raop: Allow channel map module argument 2019-12-20 19:49:09 +00:00
ckdo
c922e2c5b2 raop: Fix soft volume not applied on initial volume 2019-12-20 16:17:40 +01:00
Jaroslav Kysela
f18b0c3402 alsa-mixer: handle interface type (CARD,PCM) for mixer element lookups
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:35:40 +01:00
Jaroslav Kysela
dacfcbb09c alsa-ucm: use the proper mixer name for ucm pcm sink/source
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Jaroslav Kysela
e438382a51 alsa-ucm: get the mixer names from ucm, don't guess
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Jaroslav Kysela
ddd0fdb997 alsa-ucm: add control and mixer device items
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Jaroslav Kysela
d8200ee805 alsa-util: do not try to guess the mixer name from the PCM name
This is just invalid. It results to an error in almost all cases.
The hw:<number> scheme is sufficient to get the right card mixer.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Jaroslav Kysela
ef1df94627 alsa-ucm: do not try to use UCM device name as jack name by default
Remove the implicit rule. It is perfectly ok to have the jack with
the same name for another I/O in the driver. Trust only the
value obtained from UCM.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Jaroslav Kysela
4c64f73c97 alsa-ucm: parse correctly the device values
The UCM library is used to get the fallback values from the verbs
and the defaults section. There is no reason to duplicate this code
inside application.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-18 08:29:11 +01:00
Hui Wang
f62a49b8cf stream-restore: skip entries set on source from gnome-control-center
When users select an input device from gnome-control-center UI, the
source of this input device will be set to the
configured_default_source and the default_source, these actions are
expected, but after these actions, the gnome-control-center will call
extension_cb() to modify the entries in the database, let all stream
entries to bind the source users select, this is not correct since the
source is default_source now.

This is a temp fix for this issue, after gnome-control-center fixes
this problem, this patch should be reverted.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
5e0d5a8682 source: move the streams to the default_source when the source unlink
When a source is unlinked, all streams of this source are moved to
default_source, this action is implemented in the core rather than
modules now.

And after this change, the module-rescue-streams is not needed, but
for backward compatibility, we keep it as a dummy module.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
976a366c9f device-port: moving streams since active_port on source changes status
When the active port of a source becomes unavailable, all streams from
that source should be moved to the default source.

When the active port of a source changes state from unavailable, all
streams that have their preferred_source set to this source should be
moved to this source.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
1cea7ab38d source: move streams to new appeared sources if they prefer these sources
When a new source appears, all streams that have their
preferred_source set to the new source should be moved to the new
source.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
c254f8405c core: move source-outputs conditionally when update default_source
When the default source changes, the streams from the old default
source should be moved to the new default source, unless the
preferred_source string is set to the old default source and the
active port of the old default source is not unavailable

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
70bbbcdc84 source-output: clear the preferred_source if it is default_source
When the user moves a stream to the current default source, the
preferred_source should be set to NULL and module-stream-restore
should clear the routing for that stream in the stream database. From
that point on the stream will be always routed to the default source.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
e529db75ec source-output: add a new API pa_source_output_set_preferred_source
If the source here is NULL, that means users want to clear the
preferred_source and move the source-output to the default_source,
otherwise set the preferred_source to the source->name and move the
source-output to the source. After that fire the source_output_change
event.

After adding this API, we can use this API to simplify the entry_apply
in the module-stream-restore.c.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Hui Wang
5eec504d68 source-output: change bool save_source to char *preferred_source
The finial objective is to store the preferred source name in the
source-output struct, and use module-stream-restore to save and
restore it.

This patch just replaces the save_source with preferred_source, and
tries to keep the original logic.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-12-14 18:40:19 +00:00
Kai-Heng Feng
734a00c849 alsa: Skip resume PCM if hardware doesn't support it
Hardwares without SNDRV_PCM_INFO_RESUME capability, like USB Audio,
don't support snd_pcm_resume() when it's in suspended state.

Let's use snd_pcm_hw_params_can_resume() to check hardware's capability
before snd_pcm_resume() attempt. If it doesn't support resume, just go
to snd_pcm_drop() to leave suspended state directly.
2019-12-10 16:16:18 +08:00
Alexander Patrakov
464828faf2 Split the enable-lfe-remixing setting into two
remixing-produce-lfe controls upmixing, and remixing-consume-lfe
controls downmixing. The motivation is that a user might want to
synthesize LFE while playing stereo audio on his/her 5.1 speakers,
but at the same time follow the industry recommendation to omit
the LFE channel when producting a stereo downmix (e.g. for headphones)
from 5.1 content. Or the other way round.

Fixes: #753.
2019-12-10 06:50:59 +00:00
Marc Ranolfi
b94dba9daf card-restore: prevent segfault caused by 'restore_bluetooth_profile=true'
This fixes an oversight introduced in 1f45082c which ultimately causes a segfault error in 'add_key_value()' from 'modargs.c'.

Closes #773.
2019-12-08 01:24:13 -03:00
Jaroslav Kysela
e6779ad229 alsa-ucm: validate access to PA_DEVICE_PORT_DATA()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
f5c02dfcd8 alsa-ucm: add comments to ucm_get_mixer_id()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
e04f14ebf3 alsa-ucm: fix parsing for JackControl
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
156bd77424 alsa-ucm: split correctly JackHWMute device names
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
6d830bf0f0 alsa-ucm: add support for master volume
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
dc9dc70fcc alsa-ucm: use the correct mixer identifiers as first
The mixer identifiers should be used for snd_mixer_selem API.
Use them as first, then try to fallback to the raw control
identifiers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaska Uimonen
9acacd9ba3 alsa-ucm: Fix volume control based on review
- sync mixer logic added
- mixer path creation, empty set in mapping creation, paths added in path creation
- path creation moved inside new port creation as it might be called twice otherwise
- some comments added
2019-12-06 10:05:44 +00:00
Arun Raghavan
3dfccada46 alsa-ucm: Support Playback/CaptureVolume
This allows us to support the PlaybackVolume and CaptureVolume commands
in UCM, specifying a mixer control to use for hardware volume control.
This only works with ports corresponding to single devices at the
moment, and doesn't support stacking controls for combination ports.

The configuration is intended to provide a control (like Headphone
Playback Volume), but we try to resolve to a simple mixer control
(Headphone) to reuse existing volume paths.

On the UCM side, this also requires that when disabling the device for
the port, the volume should be reset to some default.

When enabling/disabling combination devices, things are a bit iffy since
we have no way to reset the volume before switching to a combination
device. It would be nice to have a combination-transition-sequence
command in UCM to handle this and other similar cases.

PlaybackSwitch and CaptureSwitch are yet to be implemented.
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
1c240b7a12 alsa-mixer: improve alsa_id_decode() function
Accept those identifiers:

        Speaker,1
        'Speaker',1
        "Speaker",1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
7f4b8e1a7c alsa-mixer: handle the index for ALSA mixer element identifiers
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
ab5be56a10 alsa-ucm: add mixer IDs to ucm_items
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Jaroslav Kysela
c8f065250d alsa-ucm: use ucm2 name for the direct card index open
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-12-06 10:05:44 +00:00
Dave Chiluk
1ee1f749e1 alsa-mixer: add support for LucidSound LS31, and create usb-gaming-headset profile 2019-12-05 03:02:28 +00:00
Krzysztof Stasiowski
79d3b99ba4 alsa-mixer: Add support for SteelSeries Arctis 5 2019 headset
Signed-off-by: Dave Chiluk <chiluk@ubuntu.com>
2019-12-05 03:02:28 +00:00
Josh
7259e8c22f alsa-mixer: add support for SteelSeries Arctis Pro 2019 headset
Signed-off-by: Dave Chiluk <chiluk@ubuntu.com>
2019-12-05 03:02:28 +00:00
Hui Wang
f899d5f466 stream-restore: skip entries setting action from gnome-control-center
When users select an output device from gnome-control-center UI, the
sink of this output device will be set to the configured_default_sink
and the default_sink, these actions are expected, but after these
actions, the gnome-control-center will call extension_cb() to modify
the entries in the database, let all stream entries to bind the sink
users select, this is not correct since the sink is default_sink now.

This is a temp fix for this issue, after gnome-control-center fixes
this problem, this patch should be reverted.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-27 12:26:40 +08:00
Hui Wang
43e3a7f3c3 sink: move the streams to the default_sink when the sink is unlinked
When a sink is unlinked, all streams of this sink are moved to
default_sink, this action is implemented in the core rather than
modules now.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-27 12:26:34 +08:00
Hui Wang
60d948618e device-port: moving streams due to changing the status of active_port
When the active port of a sink becomes unavailable, all streams from
that sink should be moved to the default sink.

When the active port of a sink changes state from unavailable, all
streams that have their preferred_sink set to this sink should be moved
to this sink.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-27 12:23:17 +08:00
Hui Wang
b886836630 sink: move streams to new appeared sinks if they prefer these sinks
When a new sink appears, all streams that have their preferred_sink
set to the new sink should be moved to the new sink.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-27 12:11:28 +08:00
Hui Wang
40d92e9b1a core: move sink-inputs conditionally when update default_sink
When the default sink changes, the streams from the old default sink
should be moved to the new default sink, unless the preferred_sink
string is set to the old default sink and the active port of the old
default sink is not unavailable

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-27 12:09:21 +08:00
Hui Wang
bc0e728320 sink-input: clear the preferred_sink if it is default_sink
When the user moves a stream to the current default sink, the
preferred_sink should be set to NULL and module-stream-restore
should clear the routing for that stream in the stream database. From
that point on the stream will be always routed to the default sink.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-26 19:38:29 +08:00
Hui Wang
24d5d180b8 sink-input: add a new API pa_sink_input_set_preferred_sink
If the sink here is NULL, that means users want to clear the
preferred_sink and move the sink-input to the default_sink, otherwise
set the preferred_sink to the sink->name and move the sink-input to
the sink. After that fire the sink_input_change event.

After adding this API, we can use this API to simplify the entry_apply
in the module-stream-restore.c.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-25 19:43:53 +08:00
Hui Wang
fbf8716685 sink-input: change bool save_sink to char *preferred_sink
The finial objective is to store the preferred sink name in the
sink-input struct, and use module-stream-restore to save and restore
it.

This patch just replaces the save_sink with preferred_sink, and tries
to keep the original logic.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2019-11-25 19:43:53 +08:00
Arun Raghavan
26a66d103f switch-on-connect: Fix warning on discarded const qualifier
pa_modargs_get_value() returns a const string -- instead of discarding
the const qualifier, let's just duplicate the string and free it
explicitly in the failure case.
2019-11-22 22:32:16 +05:30
Ryszard Knop
ad16d77dfe switch-on-connect: Add blacklisting
Add a new module argument, blacklist, which is a regular expression.
If the sink/source name matches the provided blacklist regex, don't
automatically switch to it. By default, no devices are blacklisted.

Add a new function to check whenever a regex pattern is valid, plus
extra NULL asserts in pa_match.
2019-11-21 22:19:44 +01:00
muzena
c90894b4d5 i18n: Update the Croatian translation 2019-11-21 15:14:15 +02:00
Wim Taymans
c7a55174dc X11: Add xauthority parameter
Add an xauthority parameter and use it in the startup script.

Apparently on some systems the X authentication cookie is not stored in
~/.Xauthority but in some dynamic location pointed to by the XAUTHORITY
environment variable. The environment variable therefore needs to be set
in the PulseAudio daemon environment in order to have access to the X
server from the PulseAudio daemon, but the variable is not necessarily
set when starting PulseAudio. For example, systemd starts PulseAudio
outside the X session. The start-pulseaudio-x11 script is run in the
X session, so it has the environment variable available, and can pass it
to the X modules, which then can set the variable in the daemon
environment.

RedHat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1723065
Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593746

Based on patch by Alexander Kurtz <kurtz.alex@googlemail.com>
2019-11-21 14:44:09 +02:00
Tanu Kaskinen
6f28865950 man: remove outdated information about real-time scheduling
The pulse-rt group doesn't exist any more, and rtkit exists to make it
safe to acquire real-time scheduling for regular users.
2019-11-21 10:10:19 +00:00