diff options
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-utils')
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 @@ | |||
1 | From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 29 Aug 2014 18:58:56 +0300 | ||
4 | Subject: [PATCH] alsactl: don't let systemd unit restore the volume when | ||
5 | asound.state is missing | ||
6 | |||
7 | This avoids an error on bootup | ||
8 | |||
9 | Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
14 | Signed-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 | |||
20 | diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am | ||
21 | index 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 | ||
38 | diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in | ||
39 | index 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 | -- | ||
51 | 1.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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming | ||
4 | via CTRL-C. Fixed the issue by reverting buggy patches and | ||
5 | properly handling 'in_aborting' flag in appropriate functions. | ||
6 | |||
7 | Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> | ||
8 | Signed-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; | ||