summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-utils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-utils')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch52
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch48
2 files changed, 100 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
new file mode 100644
index 0000000000..e99dd515f0
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -0,0 +1,52 @@
1From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 29 Aug 2014 18:58:56 +0300
4Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
5 asound.state is missing
6
7This avoids an error on bootup
8
9Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
10
11Upstream-Status: Pending
12
13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 alsactl/Makefile.am | 7 ++++---
17 alsactl/alsa-restore.service.in | 1 +
18 2 files changed, 5 insertions(+), 3 deletions(-)
19
20diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
21index 47f06e9..b728c06 100644
22--- a/alsactl/Makefile.am
23+++ b/alsactl/Makefile.am
24@@ -43,9 +43,10 @@ install-data-hook:
25 endif
26
27 edit = \
28- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
29- -e 's,@mydatadir\@,$(mydatadir),g' \
30- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
31+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
32+ -e 's,@sbindir\@,$(sbindir),g' \
33+ -e 's,@mydatadir\@,$(mydatadir),g' \
34+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
35 < $< > $@ || rm $@
36
37 alsa-state.service: alsa-state.service.in
38diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
39index 245a439..b017854 100644
40--- a/alsactl/alsa-restore.service.in
41+++ b/alsactl/alsa-restore.service.in
42@@ -10,6 +10,7 @@ DefaultDependencies=no
43 After=alsa-state.service
44 Before=shutdown.target
45 Conflicts=shutdown.target
46+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
47
48 [Service]
49 Type=oneshot
50--
511.9.1
52
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;