- Mar 22, 2023
-
-
Weijia Wang authored
Signed-off-by:
Weijia Wang <contact@weijia.wang> Part-of: <!786>
-
- Mar 19, 2023
-
-
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: a9cc1373 ("alsa: ucm - update the mixer path also after volume probe") Signed-off-by:
Hector Martin <marcan@marcan.st> Part-of: <!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 45278904 ("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: 45278904 ("alsa-ucm: Stop conflating profile name with UCM verb name") Signed-off-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <!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: <!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: <!742>
-
These are mostly the same as the device helpers added in c83b3451 ("alsa-ucm: Add enable, disable, status helpers for devices"), but for modifiers instead. Signed-off-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com> Part-of: <!742>
-
- Mar 16, 2023
-
-
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: <!784>
-
Biswapriyo Nath authored
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: <!761>
-
- Feb 26, 2023
-
-
There is no requirement for chunk index to be aligned, we only need chunk length to be multiple of sample frame size. Fixes: 6434853b ("memblockq: Do not allow non-frame indices in the memblock queue") Fixes: 22827a5e ("protocol-native: Fail if trying to push unaligned memblock into queue") Part-of: <!779>
-
- Feb 25, 2023
-
-
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: <!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: #1414 Bug: https://github.com/alsa-project/alsa-lib/issues/119 Part-of: <!782>
-
- Feb 20, 2023
-
-
Ataberk Özen authored
Remove descriptions as well. Part-of: <!754>
-
Ataberk Özen authored
Part-of: <!754>
-
- Feb 10, 2023
-
-
`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: <!780>
-
- Feb 09, 2023
-
-
Igor Kovalenko authored
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: <!781>
-
- Feb 08, 2023
-
-
Part-of: <!774>
-
Part-of: <!774>
-
Igor Kovalenko authored
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: a67c21f0 ("merge 'lennart' branch back into trunk.") Part-of: <!778>
-
- Feb 07, 2023
-
-
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: <!773>
-
- Feb 06, 2023
-
-
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: #1424 Part-of: <!777>
-
Part-of: <!776>
-
Igor Kovalenko authored
Part-of: <!775>
-
- Jan 21, 2023
-
-
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: <!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: <!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: <!767>
-
- Jan 19, 2023
-
-
Igor Kovalenko authored
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: 3c63f8e6 ("backend-native: Fix stack corruption reading RFCOMM AT+BIA= response") Part-of: <!768>
-
- Dec 29, 2022
-
-
- Dec 14, 2022
-
-
Alistair Leslie-Hughes authored
Part-of: <!759>
-
- Dec 10, 2022
-
-
Part-of: <!757>
-
- Dec 07, 2022
-
-
* 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: <!746>
-
- Dec 06, 2022
-
-
Alistair Leslie-Hughes authored
Part-of: <!758>
-
- Nov 27, 2022
-
-
Igor Kovalenko authored
Part-of: <!756>
-
Igor Kovalenko authored
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: <!756>
-
- Nov 26, 2022
-
-
Igor Kovalenko authored
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: cca0d693 ("bluetooth: add AT+BIA support") Part-of: <!755>
-
- Nov 24, 2022
- Nov 10, 2022
-
-
Wim Taymans authored
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: <!750>
-
- Oct 18, 2022
-
-
Alistair Leslie-Hughes authored
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: <!747>
-
- Oct 17, 2022
-
-
Igor Kovalenko authored
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: <!628>
-
Igor Kovalenko authored
Incoming frames can span multiple packets, add support for this. Part-of: <!628>
-
Igor Kovalenko authored
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: <!628>
-