alsa-utils/0025-aplay-fix-the-test-position-test-for-playback-avail-.patch
Takashi Iwai f936d7ca95 Accepting request 865332 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes:
  various fixes in aplay, alsamixer, alsactl and alsaloop, updated
  translations, etc:
  0001-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch
  0002-alsamixer-Fix-the-mixer-views-description-in-man-pag.patch
  0003-Add-Slovak-translation.patch
  0004-Add-Basque-translation.patch
  0006-aplay-cosmetic-code-fix-in-xrun.patch
  0007-aplay-fix-the-CPU-busy-loop-in-the-pause-handler.patch
  0008-alsa-info-Add-lsusb-and-stream-outputs.patch
  0013-aplay-add-test-code-for-snd_pcm_status-to-test-posit.patch
  0014-ucm-fix-typo-in-docs.patch
  0015-aplay-add-avail-delay-checks-to-test-position.patch
  0016-alsactl-daemon-read_pid_file-fix-the-returned-code-o.patch
  0017-alsactl-init-set_ctl_value-fix-bytes-parsing.patch
  0018-alsactl-init-parse-fix-possible-double-free.patch
  0019-alsaloop-fix-possible-memory-leak-in-create_loopback.patch
  0020-alsaloop-get_queued_playback_samples-simplify-code.patch
  0021-topology-fix-possible-double-free-in-load.patch
  0022-alsamixer-remove-dead-fcn-widget_handle_key-in-widge.patch
  0023-alsamixer-remove-unused-variable-y-in-display_scroll.patch
  0024-alsamixer-fix-shift-in-parse_words.patch
  0025-aplay-fix-the-test-position-test-for-playback-avail-.patch

OBS-URL: https://build.opensuse.org/request/show/865332
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=188
2021-01-21 10:13:28 +00:00

35 lines
1.3 KiB
Diff

From b8a1e95773227e2b4942d2f67cc10f7d133d75ad Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Tue, 19 Jan 2021 12:36:28 +0100
Subject: [PATCH 25/25] aplay: fix the test position test for playback (avail >
delay)
The avail > delay condition is invalid only for capture, of course.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
aplay/aplay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index b75be6c55794..9c827f468d5a 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -1985,11 +1985,11 @@ static void do_test_position(void)
fprintf(stderr, _("Suspicious status buffer position (%li total): "
"avail = %li, delay = %li, buffer = %li\n"),
++counter, (long)savail, (long)sdelay, (long)buffer_frames);
- } else if (avail > delay) {
+ } else if (stream == SND_PCM_STREAM_CAPTURE && avail > delay) {
fprintf(stderr, _("Suspicious buffer position avail > delay (%li total): "
"avail = %li, delay = %li\n"),
++counter, (long)avail, (long)delay);
- } else if (savail > sdelay) {
+ } else if (stream == SND_PCM_STREAM_CAPTURE && savail > sdelay) {
fprintf(stderr, _("Suspicious status buffer position avail > delay (%li total): "
"avail = %li, delay = %li\n"),
++counter, (long)savail, (long)sdelay);
--
2.26.2