alsa/0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
Ismail Dönmez 5da7a20162 Accepting request 241986 from home:tiwai:branches:multimedia:libs
- Remove superfluous Loopback.conf from the source, as it was
  already included in 1.0.28 tarball
- Backport upstream fixes: UCM dummy PCM definition, ICE1712 surround
  definitions, USB-audio secondary PCM definition, PCM rate plugin
  boundary overwrap fix, MONOTONIC_RAW timestamp support, PCM route
  plugin 3-byte format fixes, etc:
  0001-ucm-Document-PlaybackPCMIsDummy-and-CapturePCMIsDumm.patch
  0002-ICE1712-add-surround71-pcm-definition.patch
  0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch
  0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
  0005-pcm-Provide-a-CLOCK_MONOTONIC_RAW-timestamp-type.patch
  0006-Add-timestamp-type-to-sw_params-internal-only.patch
  0007-pcm-Add-sw_params-API-functions-to-get-set-timestamp.patch
  0008-pcm-Implement-timestamp-type-setup-in-hw-plugin.patch
  0009-pcm-Implement-timestamp-type-handling-in-all-plugins.patch
  0010-test-audio_time-Set-timestamp-type-explicitly.patch
  0011-pcm-route-Use-get-put-labels-for-all-3-byte-formats.patch
  0012-pcm-Fill-sw_params-proto-field.patch
  0013-pcm-route-Use-get32-for-multi-source-route-calculati.patch
  0014-pcm-Drop-snd_pcm_linear_-get-put-32_index.patch

OBS-URL: https://build.opensuse.org/request/show/241986
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=162
2014-07-24 11:12:46 +00:00

31 lines
980 B
Diff

From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@freescale.com>
Date: Mon, 14 Jul 2014 16:55:48 +0800
Subject: [PATCH 04/14] pcm: rate: fix hw_ptr exceed the boundary
For long time test case, the hw_ptr will exceed the boundary, then cause
the avail size wrong.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/pcm/pcm_rate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
index 7f667d4c6a52..2563d824ddb8 100644
--- a/src/pcm/pcm_rate.c
+++ b/src/pcm/pcm_rate.c
@@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
rate->hw_ptr =
(slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
+
+ rate->hw_ptr %= pcm->boundary;
}
static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
--
2.0.1