Hello community, here is the log from the commit of package alsa for openSUSE:Factory checked in at 2018-11-26 10:17:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alsa (Old) and /work/SRC/openSUSE:Factory/.alsa.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa" Mon Nov 26 10:17:17 2018 rev:186 rq:649311 version:1.1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/alsa/alsa.changes 2018-10-23 20:35:54.640865426 +0200 +++ /work/SRC/openSUSE:Factory/.alsa.new.19453/alsa.changes 2018-11-26 10:17:22.865938269 +0100 @@ -1,0 +2,7 @@ +Thu Nov 15 15:10:45 CET 2018 - [email protected] + +- Backport upstream fix for a PCM regression for audacity + (bsc#1116153): + 0002-pcm-interval-Interpret-x-x-1-correctly-and-return-x-.patch + +------------------------------------------------------------------- New: ---- 0002-pcm-interval-Interpret-x-x-1-correctly-and-return-x-.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa.spec ++++++ --- /var/tmp/diff_new_pack.Bwslqz/_old 2018-11-26 10:17:23.481937549 +0100 +++ /var/tmp/diff_new_pack.Bwslqz/_new 2018-11-26 10:17:23.485937544 +0100 @@ -51,6 +51,7 @@ Source41: install-snd-module # upstream fixes Patch1: 0001-conf-ucm-Dell-WD15-Dock-Fix-incorrect-device-names.patch +Patch2: 0002-pcm-interval-Interpret-x-x-1-correctly-and-return-x-.patch # rest suse fixes Source101: chtcx2072x.conf Source102: chtcx2072x-HiFi.conf @@ -119,6 +120,7 @@ %prep %setup -q -n alsa-lib-%{package_version} %patch1 -p1 +%patch2 -p1 %build export AUTOMAKE_JOBS="%{?_smp_mflags}" ++++++ 0002-pcm-interval-Interpret-x-x-1-correctly-and-return-x-.patch ++++++ >From b420056604f06117c967b65d43d01536c5ffcbc9 Mon Sep 17 00:00:00 2001 From: Timo Wischer <[email protected]> Date: Thu, 18 Oct 2018 13:33:24 +0200 Subject: [PATCH] pcm: interval: Interpret (x x+1] correctly and return x+1 Without this change an interval of (x x+1] will be interpreted as an empty interval but the right value would be x+1. This leads to a failing snd_pcm_hw_params() call which returns -EINVAL. An example issue log is given in the following: snd_pcm_hw_params failed with err -22 (Invalid argument) ACCESS: MMAP_NONINTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 16000 PERIOD_TIME: (15999 16000] PERIOD_SIZE: (255 256] PERIOD_BYTES: (510 512] PERIODS: [2 3) BUFFER_TIME: 32000 BUFFER_SIZE: 512 BUFFER_BYTES: 1024 In case of (x x+1) we have to interpret it anyway as a single value of x to compensate rounding issues. For example the period size will result in an interval of (352 353) when the period time is 16ms and the sample rate 22050 Hz (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x period size to avoid Xruns. The buffer size will not end up with an interval of (705 706) simular to the period size because snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer size. Therefore this value will be interpreted as an integer interval instead of a real interval further on. This issue seems to exist since the change of 9bb985c38 ("pcm: snd_interval_refine_first/last: exclude value only if also excluded before") Signed-off-by: Timo Wischer <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]> --- src/pcm/interval_inline.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pcm/interval_inline.h b/src/pcm/interval_inline.h index a68e292b2279..d9a30b2a8646 100644 --- a/src/pcm/interval_inline.h +++ b/src/pcm/interval_inline.h @@ -51,12 +51,14 @@ INTERVAL_INLINE int snd_interval_single(const snd_interval_t *i) { assert(!snd_interval_empty(i)); return (i->min == i->max || - (i->min + 1 == i->max && i->openmax)); + (i->min + 1 == i->max && (i->openmin || i->openmax))); } INTERVAL_INLINE int snd_interval_value(const snd_interval_t *i) { assert(snd_interval_single(i)); + if (i->openmin && !i->openmax) + return i->max; return i->min; } -- 2.19.1
