diff options
author | Wang Zidan <b50113@freescale.com> | 2014-08-04 11:21:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-06 10:03:20 +0100 |
commit | a06c9340e99df56ce79f03b56a25a694997daefc (patch) | |
tree | 05af683fab0036a4dc5dfae8fb56c1fc69b6cd49 /meta/recipes-multimedia/alsa/alsa-lib | |
parent | 9a923b9191676663477956809b44397d61b0a680 (diff) | |
download | poky-a06c9340e99df56ce79f03b56a25a694997daefc.tar.gz |
alsa-lib: fix hw_ptr exceed the boundary
For long time test case, the hw_ptr will exceed the boundary, then cause
the avail size wrong.
(From OE-Core rev: b8d472cb96cf4f6c3077bdb8acf1026d37dac438)
Signed-off-by: Wang Zidan <b50113@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-lib')
-rwxr-xr-x | meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch new file mode 100755 index 0000000000..8be3d757a1 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
3 | Date: Mon, 14 Jul 2014 16:55:48 +0800 | ||
4 | Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary | ||
5 | |||
6 | For long time test case, the hw_ptr will exceed the boundary, then cause | ||
7 | the avail size wrong. | ||
8 | |||
9 | Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch | ||
10 | |||
11 | Upstream Status: Backported | ||
12 | |||
13 | Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
14 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
15 | --- | ||
16 | src/pcm/pcm_rate.c | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c | ||
20 | index 7f667d4..2563d82 100644 | ||
21 | --- a/src/pcm/pcm_rate.c | ||
22 | +++ b/src/pcm/pcm_rate.c | ||
23 | @@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm) | ||
24 | rate->hw_ptr = | ||
25 | (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size + | ||
26 | rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size); | ||
27 | + | ||
28 | + rate->hw_ptr %= pcm->boundary; | ||
29 | } | ||
30 | |||
31 | static int snd_pcm_rate_hwsync(snd_pcm_t *pcm) | ||
32 | -- | ||
33 | 1.7.9.5 | ||
34 | |||