SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0013-alsaloop-fix-the-avail_min-setup.patch
Takashi Iwai 3a57fbf7f8 Accepting request 122710 from home:tiwai:branches:multimedia:libs
- backport fix patches from upstream:
  * Some document fixes
  * Improve xrun_sync in alsaloop
  * Add option to dump HW parameters to aplay
  * Add the support for mapped volumes to amixer
  * Add option to tread any xrun as fatal to aplay/arecord
  * configure.in fixes
  * alsactl: Don't access other cards than specified
  * aplay prints Vu-meter to stderr now
  * fix the avail_min setup in alsaloop

OBS-URL: https://build.opensuse.org/request/show/122710
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=52
2012-05-29 09:34:36 +00:00

38 lines
1.1 KiB
Diff

From b72e221aab77229f5195c15b1675de8e52db3cb0 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 13 May 2012 13:24:01 +0200
Subject: [PATCH 13/13] alsaloop: fix the avail_min setup
The previous code does not work as expected for some period_size
configurations. We do not rely on the period size value, so do not
correlate the avail_min parameter with this value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
alsaloop/pcmjob.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c
index c9b120f..139b6fd 100644
--- a/alsaloop/pcmjob.c
+++ b/alsaloop/pcmjob.c
@@ -246,15 +246,11 @@ static int setparams_set(struct loopback_handle *lhandle,
} else {
if (lhandle == lhandle->loopback->play) {
val = bufsize + bufsize / 2;
- if (val < (period_size * 3) / 4)
- val = (period_size * 3) / 4;
if (val > (buffer_size * 3) / 4)
val = (buffer_size * 3) / 4;
val = buffer_size - val;
} else {
val = bufsize / 2;
- if (val < period_size / 2)
- val = period_size / 2;
if (val > buffer_size / 4)
val = buffer_size / 4;
}
--
1.7.9.2