| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
From https://bugs.debian.org/1006631:
> dbus supports policy files in both `/usr/share/dbus-1/system.d` and
> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially
> deprecates installing packages' default policies into `/etc/dbus-1/systemd`,
> instead reserving it for the sysadmin. This is the same idea as the
> difference between `/usr/lib/udev/rules.d` and `/etc/udev/rules.d`.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/783>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/789>
|
|
|
|
|
|
| |
The upstream repo changed quite some time ago.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/788>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently there is no way to unset the default sink or source once it was
configured manually by the user.
This patch introduces the special name @NONE@, which can be used with the pacmd
or pactl set-default-sink and set-default-source commands to unset the user
configured default. When the default is unset, pulseaudio will return to the
standard default sink or source selection mechanism based on priority.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/785>
|
|
|
|
|
| |
Signed-off-by: Weijia Wang <contact@weijia.wang>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/786>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code that removes the mixer path if probing fails can be called in
the path that sets a non-off device profile on hotplug *before*
card->active_profile is updated, which results in spuriously removing
the mixer path. By this point, context->ucm->active_verb would be set
to the same as the profile name, so we can use that instead to avoid
the issue.
On Apple Silicon machines with the UCM profiles in the Asahi Linux repo,
this manifests as the headphones jack having hardware volume controls
*only* if PA is started with headphones connected and until they are
disconnected. Hotplugs end up triggering the bad codepath, and it falls
back to software volume (which is particularly a problem when the
hardware volume happens to be very low or 0 at that point).
Fixes: a9cc1373e2a7 ("alsa: ucm - update the mixer path also after volume probe")
Signed-off-by: Hector Martin <marcan@marcan.st>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/752>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ucm_get_device_property() function adds to each UCM device's
playback_volumes (or capture_volumes) hash map an associated volume
mixer keyed with the UCM verb. These key-value pairs are then iterated
over in various places which assume the key is a profile name. This
assumption is no longer true since we can generate multiple profiles to
use conflicting devices.
A previous commit 45278904167f ("alsa-ucm: Stop conflating profile name
with UCM verb name") fixes some instances of this assumption, but misses
the relation explained above. Fix more instances of misleading
"profile"s where the UCM verb name is actually meant.
Fixes: 45278904167f ("alsa-ucm: Stop conflating profile name with UCM verb name")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/771>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although it's a valid UCM configuration to have multiple devices using
the same PlaybackPCM or CapturePCM, it's unclear how PulseAudio should
handle the cases where multiple of these devices are enabled. Some
options I can think of are:
- Merge all devices sharing the same PCM into the same mapping, open
only one PCM substream for this mapping, and add 'combination ports'
that enable combinations of the devices. This has been the case until
recently, although the combination port logic was broken. A problem
with this is that we can't independently control device volumes. We
most likely cannot use hardware volumes either.
- Have one mapping for each device in the same profile, and open one PCM
substream for each mapping. This is the current state, and it fails
when there are fewer substreams than devices. Otherwise it works, but
it's still confusing, as sound directed to a device-specific mapping
might end up playing at multiple devices.
- Make multiple profiles each with combinations of upto-substream-count
devices, and have one mapping/substream per device. This still causes
the confusion mentioned above. And it's likely that the substream
count will almost always be one, where this case degenerates into the
last one.
- Have one mapping for each device in the same profile, but open only
one PCM substream. I assume this is possible with software mixing, but
it is still confusing like the above, and probably less performant.
- Generate multiple profiles each with one of the shared-PCM devices,
again with one mapping/substream for that one device. The trade-off
with this is that we can't use multiple of these devices at the same
time. However, this doesn't have the output device confusion,
combination port's volume problems, or the substream count limitation.
This patch takes a short-cut to achieve the last option, by considering
shared-PCM devices implicitly conflicting with each other.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/743>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While switching profiles of the same UCM verb, existing code first
disables devices that are only on the first profile to avoid conflicts.
However, it only disables devices, not modifiers. Even worse, modifiers
which have PlaybackPCM/CapturePCM are incorrectly treated as devices and
result in a segmentation fault.
Check what we are disabling, and call the appropriate disable function
for both devices and modifiers. Modifiers are disabled before devices,
because _dismod calls fail when the modifier's supported devices are
disabled.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/742>
|
|
|
|
|
|
|
|
|
| |
These are mostly the same as the device helpers added in c83b34516929
("alsa-ucm: Add enable, disable, status helpers for devices"), but for
modifiers instead.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/742>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently module-switch-on-connect overwrites the default sink or source that
the user has configured. This means that when the overwritten default sink or
source becomes unavailable, the new default will be chosen based on priority
and the default will not return to the originally configured value.
This patch solves the issue by introducing new core variables for the sink
or source chosen by the policy module which have higher priority than the
user configured defaults.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/784>
|
|
|
|
|
|
|
|
|
|
| |
This helps to export correct APIs for compiler toolchain which
does not support version script file. For example, mingw clang.
The APIs in libpulse.def are similar with map-file except those
are in pulse-simple and pulse-mainloop-glib. Those are exported
in different shared library in Windows platform.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/761>
|
|
|
|
|
|
|
|
|
| |
There is no requirement for chunk index to be aligned, we only need chunk length
to be multiple of sample frame size.
Fixes: 6434853b0 ("memblockq: Do not allow non-frame indices in the memblock queue")
Fixes: 22827a5e1 ("protocol-native: Fail if trying to push unaligned memblock into queue")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/779>
|
|
|
|
|
|
|
|
| |
Looks like original intention was to scan over sample formats supported by PA,
but code does the scan by list of alsa formats. Reverse the map and adjust
fallback case which now can use the same map.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Remove descriptions as well.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/754>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/754>
|
|
|
|
|
|
|
|
|
|
|
|
| |
`pa_pstream_send_memblock()` would split incoming memblock into parts not
exceeding maximum pool block size.
To make sure split parts of memblock are still frame-aligned add new `align` arg
to `pa_pstream_send_memblock`, find out required alignment from stream sample
format and pass it there. Bump default alignment to 256 which is good up to
32bit 64ch frames.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/780>
|
|
|
|
|
|
|
|
|
|
| |
Looks like sbc_decode() would seldom access more than specified input length
bytes from input buffer if input length is less than expected frame size.
Fix potential access past allocated memory by checking if input contains
complete frame before calling sbc_decode()
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/781>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/774>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/774>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The assumption that the format enum is ordered by size is not valid for quite
some time, since 24bit formats were appended to format enum later than 32bit
formats. This causes resampler to produce properly aligned memblock of size
larger than maximum mempool block size if input format is 24bit and output
format is 32bit.
Oversized block is getting split by `pa_pstream_send_memblock()` into parts of
size not exceeding maximum mempool block size. This usually works well but for
32ch 32bit 48000Hz stream the frame alignment is 128 bytes and maximum mempool
block size value is multiple of 64 but not 128 bytes, therefore resulting parts
are misaligned.
On receiving side this causes extra allocation of 128 byte chunk while `mcalign`
helper reassembles properly aligned frame out of second block of misaligned
size. While first and second properly aligned frames are retrieved successfully
from `mcalign` helper, third retrieved frame would end up with properly aligned
size but misaligned memblock index (in this example, that would be 64 bytes.)
Attempt to push a chunk with misaligned memblock index causes assertion failure
Assertion 'uchunk->index % bq->base == 0' failed at memblockq.c:289,
function pa_memblockq_push(). Aborting.
Fix oversized block issue by checking proper size of format instead of enum
value.
Fixes: a67c21f09 ("merge 'lennart' branch back into trunk.")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/778>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When tunnel-sink-new was used in combination with module-combine-sink, PA
would hang because the main thread was blocked waiting for the execution
of the latency snapshot message. The message would never be processed
because the rtpoll associated with the control_inq of module-combine-sink
was never run.
This patch fixes the problem by running the rtpoll in the thread function
to process incoming messages. Though there are no users of the rtpoll for
module-tunnel-source-new, the same change is applied there.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/773>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When bluetooth transport has both both sink and source, pulseaudio would
synchronize writing out frames with reading frames from peer to make fair
schedule of reads and writes. Pulseaudio allows two blocks of data to be sent to
peer before synchronizing writes with reads just in case that peer implements
similar write schedule.
It could happen that first blocks are still missed by peer, which would cause
pulseaudio writes to stall waiting for first frames from peer.
Fix this by allowing more data frames out until data from peer is actually
received.
Closes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1424
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/777>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/776>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/775>
|
|
|
|
|
|
|
|
|
| |
inet_pton isn't guarantee to support IPV6 address when a scope has been specified.
Using getaddrinfo instead, we can safely pass through INET6+scope and have it translated
to a usable address.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/766>
|
|
|
|
|
|
|
|
|
|
| |
If the same role is named in trigger_roles and cork_roles, a stream with that
role will crash PA. This patch fixes the crash and re-introduces the old
behavior, so that for example specifying trigger_roles=alarm, phone and
cork_roles=alarm, multimedia means that a phone stream will cork alarm and
multimedia streams while an alarm stream will only cork multimedia streams.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/767>
|
|
|
|
|
|
|
|
| |
For module-role-ducking, trigger and ducking groups were introduced some years
ago. This patch extends the functionality to module-role-cork, so that trigger
and cork roles may now contain "/" separated groups.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/767>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Incoming RFCOMM string has extra end-of-command terminating character which
breaks both AT+BIA= and AT+BAC= parsers which only expect a comma.
This leads to error parsing last element of response in both cases and could
prevent detecting mSBC availability if mSBC codec id comes last, e.g. AT+BIA=1,2
Fix this by additionally checking for delimiters in both parsers.
Fixes: 3c63f8e6d ("backend-native: Fix stack corruption reading RFCOMM AT+BIA= response")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/768>
|
|
|
|
|
|
|
|
|
| |
This fixes the rare case of resume_time being bigger than time_stamp. Which
happens sometimes when a gstreamer client is quickly seeking through a
media file. The resulting integer underflow then causes a huge value in
current_time which will break the playback.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/764>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/759>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/757>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable macOS specific modules (module-bonjour-publish,
module-coreaudio-detect and module-coreaudio-device)
* Correctly set `PA_SOEXT` (.so, .dylib and .dll)
* Build `poll-posix.c` and `semaphore-osx.c`
* Drop linker flag `-Wl,-z,nodelete` on Darwin
* Drop linker flag `-Wl,--no-undefined` on Darwin
* Prefer to `clock_gettime` over compat impl for old Darwin
* Disable SCM credential on Darwin
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/746>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/758>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/756>
|
|
|
|
|
|
|
|
| |
Rate adjustment timer is set up when combine sink is resumed and relased when
combine sink is suspended. Do not create this timer again while module is loaded
to prevent duplicate effort causing assertion in time_callback.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/756>
|
|
|
|
|
|
|
|
|
|
| |
On-stack buffer size is too short for sscanf to read AT+BIA= and AT+BAC=
response strings which have variable length.
Fix this by replacing sscanf with proper copy of input string.
Fixes: cca0d6937 ("bluetooth: add AT+BIA support")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/755>
|
|
|
|
|
|
|
|
|
|
|
| |
When usng shm_open, FD_CLOEXEC is set explicitly.
However when using memfd_create, we must pass the MFD_CLOEXEC flag
to ensure the same fcntl value (FD_CLOEXEC) is set.
Fixes #1394
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/751>
|
|
|
|
|
|
|
|
|
| |
Samples with s24 format should be read with the readf_int read
function instead of the raw function.
This fixes playback of flac/wav with s24 sample format.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/750>
|
|
|
|
|
|
|
|
|
| |
Using wine,
The mmap call in shm_attach sometimes fails with ENOMEM which isn't propagated
up the call stack.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/747>
|
|
|
|
|
|
|
|
|
| |
Some devices unexpectedly return stereo backchannel stream with wrong frequency,
and volume of backchannel stream appears too low.
If this happens, boost source volume by 20dB.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
|
|
| |
Incoming frames can span multiple packets, add support for this.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
|
|
|
|
|
|
| |
Faststream backchannel decoder does not know whether incoming stream is mono or
stereo before first packet is decoded, and some devices return stereo stream.
As it is not easy to change source sample spec after source is created, use
stereo sample spec always and perform conversion if mono stream is found.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/748>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/749>
|
|
|
|
|
|
|
|
|
| |
When a stream is started but has not yet called smoother_2_put(), pa_smoother_2_get()
returns the time since the start of the stream even if the stream was started paused.
When the stream is started paused, pa_smoother_2_get() should return 0 instead. This
patch fixes the problem.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/745>
|