mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-24 04:36:01 +00:00
Selection of cherry-picks from the 1.4 branch. Adjust the 1.4.8 ebuild to not apply these, just 1.4.8-r1. Signed-off-by: Sam James <sam@gentoo.org>
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4912
|
|
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/dd3798487c2ffae9a6b294eb475c72fe1684d3ea
|
|
|
|
From dd3798487c2ffae9a6b294eb475c72fe1684d3ea Mon Sep 17 00:00:00 2001
|
|
From: Pauli Virtanen <pav@iki.fi>
|
|
Date: Mon, 22 Sep 2025 20:27:19 +0300
|
|
Subject: [PATCH] alsa: don't fail if 3 periods_min fails
|
|
|
|
Some drivers (emu10k1) appear to not necessarily support more than 2
|
|
periods.
|
|
|
|
Don't fail start if snd_pcm_hw_params_set_periods_min() fails, then we
|
|
just set nearest possible periods and buffer sizes.
|
|
---
|
|
spa/plugins/alsa/alsa-pcm.c | 12 ++++++++----
|
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
|
|
index cea6d3e44d..509e187423 100644
|
|
--- a/spa/plugins/alsa/alsa-pcm.c
|
|
+++ b/spa/plugins/alsa/alsa-pcm.c
|
|
@@ -2358,10 +2358,14 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
|
|
snd_pcm_uframes_t period_size_max;
|
|
unsigned int periods_min = (periods == UINT_MAX) ? 3 : periods;
|
|
|
|
- CHECK(snd_pcm_hw_params_set_periods_min(hndl, params, &periods_min, &dir), "set_periods_min");
|
|
- CHECK(snd_pcm_hw_params_get_period_size_max(params, &period_size_max, &dir), "get_period_size_max");
|
|
- if (period_size > period_size_max)
|
|
- period_size = SPA_MIN(period_size, flp2(period_size_max));
|
|
+ err = snd_pcm_hw_params_set_periods_min(hndl, params, &periods_min, &dir);
|
|
+ if (!err) {
|
|
+ CHECK(snd_pcm_hw_params_get_period_size_max(params, &period_size_max, &dir), "get_period_size_max");
|
|
+ if (period_size > period_size_max)
|
|
+ period_size = SPA_MIN(period_size, flp2(period_size_max));
|
|
+ } else {
|
|
+ spa_log_debug(state->log, "set_periods_min: %s", snd_strerror(err));
|
|
+ }
|
|
}
|
|
|
|
CHECK(snd_pcm_hw_params_set_period_size_near(hndl, params, &period_size, &dir), "set_period_size_near");
|
|
--
|
|
GitLab
|