summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa
diff options
context:
space:
mode:
authorMuzaffar Mahmood <muzaffar_mahmood@mentor.com>2014-09-26 18:28:54 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-30 14:10:34 +0100
commitecf089785f676ff547f694288a48e3913c515fb1 (patch)
tree8748d2c7e80e36601548ed9d485111200e62a476 /meta/recipes-multimedia/alsa
parent78b44ce53d954ce72d6f080fe578aa65748b9be1 (diff)
downloadpoky-ecf089785f676ff547f694288a48e3913c515fb1.tar.gz
alsa-utils: interrupt streaming via signal
aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming via CTRL-C. Fixed the issue by reverting buggy patches and properly handling 'in_aborting' flag in appropriate functions. (From OE-Core rev: 8e4ab29924c8c5fe2a79e8b0ca41fa45cc8e94a1) Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/alsa')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch48
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
new file mode 100644
index 0000000000..5df004aeae
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
@@ -0,0 +1,48 @@
1Upstream-Status: Pending
2
3aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming
4via CTRL-C. Fixed the issue by reverting buggy patches and
5properly handling 'in_aborting' flag in appropriate functions.
6
7Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
8Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
9
10--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530
11+++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530
12@@ -392,14 +392,22 @@
13 putchar('\n');
14 if (!quiet_mode)
15 fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig));
16- if (handle)
17+ if (stream == SND_PCM_STREAM_CAPTURE) {
18+ if (fmt_rec_table[file_type].end) {
19+ fmt_rec_table[file_type].end(fd);
20+ fd = -1;
21+ }
22+ stream = -1;
23+ }
24+ if (fd > 1) {
25+ close(fd);
26+ fd = -1;
27+ }
28+ if (handle && sig != SIGABRT) {
29 snd_pcm_abort(handle);
30- if (sig == SIGABRT) {
31- /* do not call snd_pcm_close() and abort immediately */
32 handle = NULL;
33- prg_exit(EXIT_FAILURE);
34 }
35- signal(sig, signal_handler);
36+ prg_exit(EXIT_FAILURE);
37 }
38
39 /* call on SIGUSR1 signal. */
40@@ -2096,7 +2104,7 @@
41 ssize_t result = count, r;
42 size_t size;
43
44- while (count > 0) {
45+ while (count > 0 && !in_aborting) {
46 size = count;
47 if (size > chunk_bytes - buffer_pos)
48 size = chunk_bytes - buffer_pos;
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
index 2d23482c16..5f35d76a6e 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
@@ -13,6 +13,7 @@ PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xm
13 13
14SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ 14SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
15 file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ 15 file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
16 file://alsa-utils-aplay-interrupt-signal-handling.patch \
16 " 17 "
17 18
18SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211" 19SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211"