Age | Commit message (Collapse) | Author | Files | Lines |
|
Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old behaviour.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/311>
|
|
Perform detection of supported sample format and rates just after device is
opened, before `snd_pcm_hw_params()` is called for the first time. This fixes a
problem where device restricts available sample rates after HW params are set
preventing sample rate detection (seen with UAC2 devices and kernel 6.1.9)
Bug: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1414
Bug: https://github.com/alsa-project/alsa-lib/issues/119
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782>
|
|
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/726>
|
|
When decibel fixes object is cloned, there is only a shallow copy of `key`
string member of original object. This may lead to double-free crash reported in
pipewire tracker https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1125
Fix this by doing a deep copy of `key` string to maintain correct ownership.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/569>
|
|
When fallback mapping is selected all subsequent profile sets containing
selected mapping are ignored. When there are only e.g. fallback input mappings
available, admitted profile set will only contain one profile with selected
first input fallback mapping and no outputs, and rest of profiles will only
contain outputs and no inputs. When there are only fallback input and output
mappings, there will be no profiles admitted at all.
Fix this by making sure that selected first fallback input or output mapping
is actually allowed to exist in all probed profile sets.
Note while this change allows selected fallback mappings to be found in duplex
configuraitons, probing fallbacks still can fail if there is more than one input
fallback and first one (selected) does not work in duplex configurations.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/539>
|
|
Sometimes decibel fixes are used as a trick to set a maximum hardware
volume, and in these cases max_dB may be negative yet still valid.
Here's an example:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292#note_671300
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447>
|
|
Volume scaling in dB mode is broken if max dB is negative.
I have a Nobsound USB amplifier (1908:2220) that reports a dB range
of -127.07 dB to -128 dB in Alsa.
While this is likely a driver/device bug, in my naive imagination
userspace wouldn't bother too much with the absolute values and just set
out_dB(percent) = min_dB + (max_dB - min_dB) * percent
However, this is not what PulseAudio is doing, instead max_dB is used
as base_volume with which the desired software volume is multiplied
while min_dB does not seem to be taken into account.
The result is that with this device only a tiny portion of the volume
slider is usable.
Setting it to 97% already reaches min_dB which effectively turns any
(software) audio knob to an on/off switch.
To work around this, simply set the has_dB flag to false if max_dB is
negative.
This falls back to using raw Alsa values (ranging from 0 - 255), now
the settings in pavucontrol perfectly mirror those in alsamixer.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447>
|
|
Previously both paths had description "Headphones", which I assume can
cause confusion with users who see two ports with identical names. I
don't have this kind of hardware myself nor have I heard complaints from
users, this is just something I noticed while reading the configuration
files.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
|
|
Some systems have two jacks with same name but different index, we need
to take index into consideration to use both jacks.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
|
|
We have at least one USB hardware which supports the 8
channels in one mixer element:
https://github.com/alsa-project/alsa-ucm-conf/pull/25
POSITION_MASK_CHANNELS define was added for the future extensions.
The override_map variable was changed from bool to mask (unsigned int).
The channel map override settings is handled for channels up to eight now.
Also added missing override-map.3 .. override-map.8 to the configuration
parser array.
The driver channel position was added to the override mask arguments
(syntax is driver:pulseaudio like left:all-left). If ommited, the ALSA's
channel positions are guessed by index.
Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
|
|
Use safe values for the min_dB and max_dB fields when the position mask
is unset to avoid breakage for the upper levels.
If the range is incorrect, the volume range shown in pavucontrol shows
strange values.
(Thanks to Wim Taymans for the idea.)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
|
|
The old behaviour was such that if none of the normal mappings worked,
we would probe ALL fallbacks. I don't think that makes sense, and it
caused concrete issues: let's say we have a regular stereo mic device,
but there's no "front" PCM defined for it. In this situation we would
probe the stereo-fallback mapping (which uses "hw" instead of "front"),
and it would work, but then we'd also probe the "multichannel-input"
mapping, which would also work, so we end up with two mappings that
don't have any difference in behaviour.
I think it's better to simply pick the first working fallback and ignore
the rest.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/901
(issue is marked as confidential due to unreleased hardware)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/304>
|
|
Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old
behaviour (prefix-defined directory).
core-util: Ignore non-absolute XDG base dirs
These are invalid per the spec.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/862
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/293>
|
|
This same profile should also work for the GSX 1200, but I don't know the USB id
for that.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/257>
|
|
The HP Thunderbolt Dock [1] has two separate USB cards, a headset jack
and an optional module which is a speakerphone.
This patch adds new description for them, and mark the intended-roles as
phone for the speakerphone module.
[1] https://store.hp.com/us/en/pdp/hp-thunderbolt-dock-120w-g2-with-audio
|
|
|
|
HDMI jacks are configured like this:
[Jack HDMI/DP]
append-pcm-to-name = yes
The pa_alsa_jack.name field is then "HDMI/DP" and pa_alsa_jack.alsa_name
is set to "HDMI/DP,pcm=3 Jack" or similar. If we compare the name fields
of HDMI paths, they appear to use the same jack element even though they
are different in reality, so all HDMI ports got incorrectly assigned to
the same availability group.
|
|
Previously they were set once per mapping, which caused the numbering to
restart from 1 for every mapping, so ports were incorrectly assigned to
the same group.
|
|
This reverts commit e0ab9fa4a478a79fac5fa25a957daff4947d5133.
The change broke some Xonar cards, and we probably don't want to hold up
the 14.0 release for this.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1009
|
|
We have at least one USB hardware which supports the 8
channels in one mixer element:
https://github.com/alsa-project/alsa-ucm-conf/pull/25
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
From: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
The items array is assigned later and the order of fields is important.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
"Availability group" is more clear about what the field is about.
Credits to Arun Raghavan for coming up with the better name.
|
|
There were three bugs:
1) j->state_plugged was set to PA_AVAILABLE_UNKNOWN too early. It must
be set only after we have found that the jack is shared by two ports.
The result of setting it too early was that no jack ever could have
the PA_AVAILABLE_YES status.
2) The inner jack loop iterated through p->jacks instead of p2->jacks,
so the code didn't compare jacks between two ports at all. As a result
all ports were put in the same availability group.
3) The inner jack loop checked j->state_plugged instead of
j2->state_plugged. The result was that the speaker port, which uses the
Headphone jack to toggle between unknown and unavailable, was put in the
same group with the headphone port.
|
|
|
|
|
|
They were unused since 20f1fa17bebe086cb9cff09a5157dc7ca009ba61.
|
|
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
Create automatically the groups per paths where
the similar jacks are used.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
There is some case that multiple ucm devices share an amixer Jack
like "Headphones", "Headset" and "Mic2" share the "Headphone Mic Jack",
When the Jack state is changed, the module-switch-on-port-available
will process them in the order they are in the jack->ucm_devices, and
the last device will decide the final setting.
But usually users put priority for those devices and expect the
final setting is based on the highest priority device if there is no
other policies like manual selection. So here do some change to store
the ucm_devices according to their priority (from low to high).
For example, we have ucm devices definition like below (ucm2):
SectionDevice."Mic2" {
Comment "Headphones Stereo Microphone"
...
Value {
CapturePriority 200
...
}
SectionDevice."Headset" {
Comment "Headset Mono Microphone"
...
Value {
CapturePriority 300
...
}
}
Without this patch, the final setting is based on Mic2, after applying
this patch, the final setting is based on the Headset (with higher
priority than Mic2).
Signed-off-by: Hui Wang <hui.wang@canonical.com>
|
|
The unused mixer instances are created without this code.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
The ALSA mixer can be opened multiple times (especially for UCM
in the probe). This adds a simple mixer cache to prevent
multiple open calls.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/640
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
Accept those identifiers:
Speaker,1
'Speaker',1
"Speaker",1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
It is possible that we might want to have a separate userdata to be used
for these callbacks, so let's split them out.
This is particularly needed when using an pa_rtpoll_item around pa_fdsem
since that uses its own before/after callback but will essentially have
whatever is using the fdsem set up the work callback appropriately (and
thus at least the work callback's userdata needs to be separated from
the before/after callback -- we might as well then just separate all
three).
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
|
|
Consumers are expected to use <alsa/asoundlib.h> instead of
<asoundlib.h>.
This is in preparation of an change to pkgconfig(alsa) to
not pollute CFLAGS with -I/usr/include/alsa anymore.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
from build tree
It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.
[1] https://reproducible-builds.org/
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
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.
|
|
appropriately
|
|
This removes the need to hardcode the ELD device index in the path
configuration. The hardcoded values don't work with the Intel HDMI LPE
driver.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
|
|
This removes the need to hardcode the PCM device index in the HDMI jack
names. The hardcoded values don't work with the Intel HDMI LPE driver.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
|
|
We have so far assumed that HDMI always uses device indexes 3, 7, 8, 9,
10, 11, 12 and 13. These values are hardcoded in the path configuration.
The Intel HDMI LPE driver, however, uses different device numbering
scheme. Since the indexes aren't always the same, we need to query the
hw device index from ALSA.
Later patches will use the queried index for HDMI jack detection and ELD
information reading.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
|
|
Some sound cards don't have any alsa-lib configuration, but they used to
work well enough up to PulseAudio 10. PulseAudio 11 stopped using "hw:0"
for the analog-stereo mapping, and instead defined it as a fallback
mapping without any mixer handling. As a result, switching between
headphones and speakers stopped working without changing the mixer
settings manually at least on Toshiba Chromebook 2. This patch adds the
mixer handling back to the fallback mapping.
I also renamed "unknown-stereo" to "stereo-fallback", because I like
that name more.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=102560
|
|
|