summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-lib
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-08-17 14:20:29 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-18 09:27:52 +0100
commit400e2628f1072a39e897ca02cde6a7a37cbb95e1 (patch)
treeba72a6b7dadd205bc537100035f6ef4462cb8994 /meta/recipes-multimedia/alsa/alsa-lib
parent9800b4d9ffda22466066ab1d301e4730e61726e0 (diff)
downloadpoky-400e2628f1072a39e897ca02cde6a7a37cbb95e1.tar.gz
alsa-lib: 1.1.1 -> 1.1.2
Changelog: http://www.alsa-project.org/main/index.php/Changes_v1.1.1_v1.1.2 Removed upstreamed patch: 0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch Rebased avoid-including-sys-poll.h-directly.patch (From OE-Core rev: 4d3ec9312d9f721f57d0afc08ec1512709f75d17) Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-lib')
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch137
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch20
2 files changed, 10 insertions, 147 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch
deleted file mode 100755
index bb2f82b1f5..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch
+++ /dev/null
@@ -1,137 +0,0 @@
1From 7c424edd116e76eee6218a1e9a6ff6c4daaf2a4d Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@freescale.com>
3Date: Wed, 6 Apr 2016 19:02:12 +0800
4Subject: [PATCH] pcm_plugin: fix appl pointer not correct when mmap_commit()
5 return error
6
7When snd_pcm_mmap_commit() return error, the appl pointer is also updated.
8which cause the avail_update()'s result wrong.
9This patch move the snd_pcm_mmap_appl_forward() to the place when
10snd_pcm_mmap_commit() is successfully returned.
11
12Upstream-Status: Accepted [expected in 1.1.2]
13
14Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16---
17 src/pcm/pcm_plugin.c | 48 ++++++++++++++++++++++++++++++++----------------
18 1 file changed, 32 insertions(+), 16 deletions(-)
19
20diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
21index d007e8c..940491d 100644
22--- a/src/pcm/pcm_plugin.c
23+++ b/src/pcm/pcm_plugin.c
24@@ -279,18 +279,22 @@ static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
25 return -EPIPE;
26 }
27 snd_atomic_write_begin(&plugin->watom);
28- snd_pcm_mmap_appl_forward(pcm, frames);
29 result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
30 if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
31 snd_pcm_sframes_t res;
32 res = plugin->undo_write(pcm, slave_areas, slave_offset + result, slave_frames, slave_frames - result);
33- if (res < 0)
34+ if (res < 0) {
35+ snd_atomic_write_end(&plugin->watom);
36 return xfer > 0 ? (snd_pcm_sframes_t)xfer : res;
37+ }
38 frames -= res;
39 }
40- snd_atomic_write_end(&plugin->watom);
41- if (result <= 0)
42+ if (result <= 0) {
43+ snd_atomic_write_end(&plugin->watom);
44 return xfer > 0 ? (snd_pcm_sframes_t)xfer : result;
45+ }
46+ snd_pcm_mmap_appl_forward(pcm, frames);
47+ snd_atomic_write_end(&plugin->watom);
48 offset += frames;
49 xfer += frames;
50 size -= frames;
51@@ -325,19 +329,23 @@ static snd_pcm_sframes_t snd_pcm_plugin_read_areas(snd_pcm_t *pcm,
52 return -EPIPE;
53 }
54 snd_atomic_write_begin(&plugin->watom);
55- snd_pcm_mmap_appl_forward(pcm, frames);
56 result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
57 if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
58 snd_pcm_sframes_t res;
59
60 res = plugin->undo_read(slave, areas, offset, frames, slave_frames - result);
61- if (res < 0)
62+ if (res < 0) {
63+ snd_atomic_write_end(&plugin->watom);
64 return xfer > 0 ? (snd_pcm_sframes_t)xfer : res;
65+ }
66 frames -= res;
67 }
68- snd_atomic_write_end(&plugin->watom);
69- if (result <= 0)
70+ if (result <= 0) {
71+ snd_atomic_write_end(&plugin->watom);
72 return xfer > 0 ? (snd_pcm_sframes_t)xfer : result;
73+ }
74+ snd_pcm_mmap_appl_forward(pcm, frames);
75+ snd_atomic_write_end(&plugin->watom);
76 offset += frames;
77 xfer += frames;
78 size -= frames;
79@@ -423,19 +431,23 @@ snd_pcm_plugin_mmap_commit(snd_pcm_t *pcm,
80 frames = plugin->write(pcm, areas, appl_offset, frames,
81 slave_areas, slave_offset, &slave_frames);
82 snd_atomic_write_begin(&plugin->watom);
83- snd_pcm_mmap_appl_forward(pcm, frames);
84 result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
85- snd_atomic_write_end(&plugin->watom);
86 if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
87 snd_pcm_sframes_t res;
88
89 res = plugin->undo_write(pcm, slave_areas, slave_offset + result, slave_frames, slave_frames - result);
90- if (res < 0)
91+ if (res < 0) {
92+ snd_atomic_write_end(&plugin->watom);
93 return xfer > 0 ? xfer : res;
94+ }
95 frames -= res;
96 }
97- if (result <= 0)
98+ if (result <= 0) {
99+ snd_atomic_write_end(&plugin->watom);
100 return xfer > 0 ? xfer : result;
101+ }
102+ snd_pcm_mmap_appl_forward(pcm, frames);
103+ snd_atomic_write_end(&plugin->watom);
104 if (frames == cont)
105 appl_offset = 0;
106 else
107@@ -490,19 +502,23 @@ static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm)
108 frames = (plugin->read)(pcm, areas, hw_offset, frames,
109 slave_areas, slave_offset, &slave_frames);
110 snd_atomic_write_begin(&plugin->watom);
111- snd_pcm_mmap_hw_forward(pcm, frames);
112 result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
113- snd_atomic_write_end(&plugin->watom);
114 if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
115 snd_pcm_sframes_t res;
116
117 res = plugin->undo_read(slave, areas, hw_offset, frames, slave_frames - result);
118- if (res < 0)
119+ if (res < 0) {
120+ snd_atomic_write_end(&plugin->watom);
121 return xfer > 0 ? (snd_pcm_sframes_t)xfer : res;
122+ }
123 frames -= res;
124 }
125- if (result <= 0)
126+ if (result <= 0) {
127+ snd_atomic_write_end(&plugin->watom);
128 return xfer > 0 ? (snd_pcm_sframes_t)xfer : result;
129+ }
130+ snd_pcm_mmap_hw_forward(pcm, frames);
131+ snd_atomic_write_end(&plugin->watom);
132 if (frames == cont)
133 hw_offset = 0;
134 else
135--
1361.9.1
137
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
index b8b1cb6546..3d44585939 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ b/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
@@ -1,4 +1,4 @@
1From 7dcf46969e85c881c901df4b49309e9091cad16a Mon Sep 17 00:00:00 2001 1From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com> 2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 9 Feb 2016 14:01:18 -0800 3Date: Tue, 9 Feb 2016 14:01:18 -0800
4Subject: [PATCH] avoid including <sys/poll.h> directly 4Subject: [PATCH] avoid including <sys/poll.h> directly
@@ -24,7 +24,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
24 12 files changed, 12 insertions(+), 12 deletions(-) 24 12 files changed, 12 insertions(+), 12 deletions(-)
25 25
26diff --git a/aserver/aserver.c b/aserver/aserver.c 26diff --git a/aserver/aserver.c b/aserver/aserver.c
27index 1579da7..ef64248 100644 27index ac20706..46f731a 100644
28--- a/aserver/aserver.c 28--- a/aserver/aserver.c
29+++ b/aserver/aserver.c 29+++ b/aserver/aserver.c
30@@ -20,7 +20,7 @@ 30@@ -20,7 +20,7 @@
@@ -62,7 +62,7 @@ index 3c2766e..a546194 100644
62 #include <stdarg.h> 62 #include <stdarg.h>
63 #include <endian.h> 63 #include <endian.h>
64diff --git a/include/local.h b/include/local.h 64diff --git a/include/local.h b/include/local.h
65index b429f5d..e05898f 100644 65index 317f2e3..6a43a47 100644
66--- a/include/local.h 66--- a/include/local.h
67+++ b/include/local.h 67+++ b/include/local.h
68@@ -47,7 +47,7 @@ 68@@ -47,7 +47,7 @@
@@ -75,18 +75,18 @@ index b429f5d..e05898f 100644
75 #include <errno.h> 75 #include <errno.h>
76 #if defined(__linux__) 76 #if defined(__linux__)
77diff --git a/src/control/control.c b/src/control/control.c 77diff --git a/src/control/control.c b/src/control/control.c
78index 4a28cf6..071c5db 100644 78index 6c00b8e..fd0c303 100644
79--- a/src/control/control.c 79--- a/src/control/control.c
80+++ b/src/control/control.c 80+++ b/src/control/control.c
81@@ -48,7 +48,7 @@ and IEC958 structure. 81@@ -90,7 +90,7 @@ I/O operations.
82 #include <string.h> 82 #include <string.h>
83 #include <fcntl.h> 83 #include <fcntl.h>
84 #include <signal.h> 84 #include <signal.h>
85-#include <sys/poll.h> 85-#include <sys/poll.h>
86+#include <poll.h> 86+#include <poll.h>
87 #include <stdbool.h>
87 #include "control_local.h" 88 #include "control_local.h"
88 89
89 /**
90diff --git a/src/control/control_shm.c b/src/control/control_shm.c 90diff --git a/src/control/control_shm.c b/src/control/control_shm.c
91index bd07d4a..9a2e268 100644 91index bd07d4a..9a2e268 100644
92--- a/src/control/control_shm.c 92--- a/src/control/control_shm.c
@@ -101,7 +101,7 @@ index bd07d4a..9a2e268 100644
101 #include <sys/uio.h> 101 #include <sys/uio.h>
102 #include <sys/mman.h> 102 #include <sys/mman.h>
103diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c 103diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
104index fd3877c..52ac093 100644 104index c3925cc..18f1dd5 100644
105--- a/src/pcm/pcm_direct.c 105--- a/src/pcm/pcm_direct.c
106+++ b/src/pcm/pcm_direct.c 106+++ b/src/pcm/pcm_direct.c
107@@ -30,7 +30,7 @@ 107@@ -30,7 +30,7 @@
@@ -114,7 +114,7 @@ index fd3877c..52ac093 100644
114 #include <sys/sem.h> 114 #include <sys/sem.h>
115 #include <sys/wait.h> 115 #include <sys/wait.h>
116diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c 116diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
117index 5c4fbe1..2cfa7db 100644 117index 1948289..4cf220a 100644
118--- a/src/pcm/pcm_mmap.c 118--- a/src/pcm/pcm_mmap.c
119+++ b/src/pcm/pcm_mmap.c 119+++ b/src/pcm/pcm_mmap.c
120@@ -22,7 +22,7 @@ 120@@ -22,7 +22,7 @@
@@ -153,7 +153,7 @@ index a815ac6..4ee958c 100644
153 #include <sys/mman.h> 153 #include <sys/mman.h>
154 #include <netinet/in.h> 154 #include <netinet/in.h>
155diff --git a/src/seq/seq.c b/src/seq/seq.c 155diff --git a/src/seq/seq.c b/src/seq/seq.c
156index 620ca3f..681cef1 100644 156index 9279830..d2027cb 100644
157--- a/src/seq/seq.c 157--- a/src/seq/seq.c
158+++ b/src/seq/seq.c 158+++ b/src/seq/seq.c
159@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev) 159@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
@@ -179,5 +179,5 @@ index 9843aa8..eaa71f0 100644
179 #include <sys/shm.h> 179 #include <sys/shm.h>
180 #include "list.h" 180 #include "list.h"
181-- 181--
1821.9.1 1822.8.1
183 183