summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-utils
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-02-17 18:56:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-18 07:39:32 +0000
commita231a4e86a09c10a89871fb532f1b33000f8b001 (patch)
tree26776a8167b4711639558d362e6a4e905c7e3419 /meta/recipes-multimedia/alsa/alsa-utils
parent1adbb73d0d45fb989332b561c4cd9d5b8169c7e3 (diff)
downloadpoky-a231a4e86a09c10a89871fb532f1b33000f8b001.tar.gz
alsa-utils: 1.0.29 -> 1.1.0
Changelog: http://alsa-project.org/main/index.php/Changes_v1.0.29_v1.1.0 This release introduces two new tools: - alsatplg for converting topology data from text representation to a binary format consumed by the kernel - alsabat; "bat" stands for "basic audio tester" Backported a patch from upstream that renames bat to alsabat. Rebased patch "0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch". Dropped patches "alsa-utils-aplay-interrupt-signal-handling.patch" and "assume-storing-is-success-if-not-sound-card-device.patch", because the issues have been fixed upstream. (From OE-Core rev: 0b10c468cee39520bb8f7330222fb177ceff249d) 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-utils')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch153
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch20
-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/assume-storing-is-success-if-not-sound-card-device.patch34
4 files changed, 165 insertions, 90 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
new file mode 100644
index 0000000000..b6d7d4f0d0
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
@@ -0,0 +1,153 @@
1From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001
2From: "Lu, Han" <han.lu@intel.com>
3Date: Wed, 3 Feb 2016 14:20:33 +0800
4Subject: [PATCH] alsabat: rename to avoid naming conflict
5
6alsa-utils as well as bareos-bat (as well a some Bacula packages)
7all contain a program called /usr/bin/bat, which causes conflicts on
8various distributions ("basic audio tester" vs "bareos administration
9tool"("bacula administration tool")).
10Rename to avoid conflict.
11
12Signed-off-by: Lu, Han <han.lu@intel.com>
13Signed-off-by: Takashi Iwai <tiwai@suse.de>
14
15Upstream-Status: Accepted [expected in version 1.1.1]
16
17Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
18---
19 bat/Makefile.am | 10 +++++-----
20 bat/{bat.1 => alsabat.1} | 43 ++++++++++++++++++++++---------------------
21 bat/bat.c | 2 +-
22 3 files changed, 28 insertions(+), 27 deletions(-)
23 rename bat/{bat.1 => alsabat.1} (72%)
24
25diff --git a/bat/Makefile.am b/bat/Makefile.am
26index 842ae6b..985f00c 100644
27--- a/bat/Makefile.am
28+++ b/bat/Makefile.am
29@@ -1,9 +1,9 @@
30-bin_PROGRAMS = bat
31-man_MANS = bat.1
32+bin_PROGRAMS = alsabat
33+man_MANS = alsabat.1
34
35-EXTRA_DIST = bat.1
36+EXTRA_DIST = alsabat.1
37
38-bat_SOURCES = \
39+alsabat_SOURCES = \
40 bat.c \
41 common.c \
42 analyze.c \
43@@ -21,4 +21,4 @@ noinst_HEADERS = \
44 AM_CPPFLAGS = \
45 -Wall -I$(top_srcdir)/include
46
47-bat_LDADD = @FFTW_LIB@
48+alsabat_LDADD = @FFTW_LIB@
49diff --git a/bat/bat.1 b/bat/alsabat.1
50similarity index 72%
51rename from bat/bat.1
52rename to bat/alsabat.1
53index e00fc27..8d0b9c0 100644
54--- a/bat/bat.1
55+++ b/bat/alsabat.1
56@@ -1,23 +1,23 @@
57-.TH BAT 1 "20th October 2015"
58+.TH ALSABAT 1 "20th October 2015"
59 .SH NAME
60-bat \- command\-line sound tester for ALSA sound card driver
61+alsabat \- command\-line sound tester for ALSA sound card driver
62
63 .SH SYNOPSIS
64-\fBbat\fP [\fIflags\fP]
65+\fBalsabat\fP [\fIflags\fP]
66
67 .SH DESCRIPTION
68-\fBBAT(Basic Audio Tester)\fP is a simple command\-line utility intended
69-to help automate audio driver and sound server testing with little human
70-interaction. BAT can be used to test audio quality, stress test features
71-and test audio before and after PM state changes.
72+\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
73+intended to help automate audio driver and sound server testing with little
74+human interaction. ALSABAT can be used to test audio quality, stress test
75+features and test audio before and after PM state changes.
76
77-BAT's design is relatively simple. BAT plays an audio stream and captures
78-the same stream in either a digital or analog loop back. It then compares
79-the captured stream using a FFT to the original to determine if the test
80-case passes or fails.
81+ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
82+captures the same stream in either a digital or analog loop back. It then
83+compares the captured stream using a FFT to the original to determine if
84+the test case passes or fails.
85
86-BAT can either run wholly on the target machine being tested (standalone
87-mode) or can run as a client/server mode where by bat client runs on the
88+ALSABAT can either run wholly on the target machine being tested (standalone
89+mode) or can run as a client/server mode where by alsabat client runs on the
90 target and runs as a server on a separate tester machine. The client/server
91 mode still requires some manual interaction for synchronization, but this
92 is actively being developed for future releases.
93@@ -93,8 +93,8 @@ Frequencies with amplitude larger than threshold will be recognized as a
94 peak, and the frequency with largest peak value will be recognized as a
95 detected frequency.
96 .br
97-BAT then compares the detected frequency to target frequency, to decide
98-if the detecting passes or fails.
99+ALSABAT then compares the detected frequency to target frequency, to
100+decide if the detecting passes or fails.
101 .br
102 The default value is 3.0.
103 .TP
104@@ -117,18 +117,19 @@ Target WAV file to save capture test content.
105 .TP
106 \fI\-\-local\fP
107 Internal loopback mode.
108-Playback, capture and analysis internal to BAT only. This is intended for
109-developers to test new BAT features as no audio is routed outside of BAT.
110+Playback, capture and analysis internal to ALSABAT only. This is intended
111+for developers to test new ALSABAT features as no audio is routed outside
112+of ALSABAT.
113
114 .SH EXAMPLES
115
116 .TP
117-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
118+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
119 Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
120 and then capture and analyze.
121
122 .TP
123-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
124+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
125 Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
126 data, and then capture and analyze.
127
128@@ -152,7 +153,7 @@ Currently only support RIFF WAV format with PCM data. Please report any bugs to
129 the alsa-devel mailing list.
130
131 .SH AUTHOR
132-\fBbat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard Gautier
133-<bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
134+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard
135+Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
136 This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
137 <han.lu@intel.com>.
138diff --git a/bat/bat.c b/bat/bat.c
139index 086b9fa..ddb60b7 100644
140--- a/bat/bat.c
141+++ b/bat/bat.c
142@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat)
143 static void usage(struct bat *bat)
144 {
145 fprintf(bat->log,
146-_("Usage: bat [-options]...\n"
147+_("Usage: alsabat [-options]...\n"
148 "\n"
149 " -h, --help this help\n"
150 " -D pcm device for both playback and capture\n"
151--
1522.7.0
153
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
index e99dd515f0..e578dfe743 100644
--- 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
@@ -1,4 +1,4 @@
1From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 1From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net> 2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 29 Aug 2014 18:58:56 +0300 3Date: Fri, 29 Aug 2014 18:58:56 +0300
4Subject: [PATCH] alsactl: don't let systemd unit restore the volume when 4Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
@@ -12,16 +12,20 @@ Upstream-Status: Pending
12 12
13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> 13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> 14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15
16Rebased on 1.1.0.
17
18Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
15--- 19---
16 alsactl/Makefile.am | 7 ++++--- 20 alsactl/Makefile.am | 7 ++++---
17 alsactl/alsa-restore.service.in | 1 + 21 alsactl/alsa-restore.service.in | 1 +
18 2 files changed, 5 insertions(+), 3 deletions(-) 22 2 files changed, 5 insertions(+), 3 deletions(-)
19 23
20diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am 24diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
21index 47f06e9..b728c06 100644 25index cac8094..ff865dc 100644
22--- a/alsactl/Makefile.am 26--- a/alsactl/Makefile.am
23+++ b/alsactl/Makefile.am 27+++ b/alsactl/Makefile.am
24@@ -43,9 +43,10 @@ install-data-hook: 28@@ -38,9 +38,10 @@ install-data-hook:
25 endif 29 endif
26 30
27 edit = \ 31 edit = \
@@ -36,17 +40,17 @@ index 47f06e9..b728c06 100644
36 40
37 alsa-state.service: alsa-state.service.in 41 alsa-state.service: alsa-state.service.in
38diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in 42diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
39index 245a439..b017854 100644 43index 2884098..bac3ccc 100644
40--- a/alsactl/alsa-restore.service.in 44--- a/alsactl/alsa-restore.service.in
41+++ b/alsactl/alsa-restore.service.in 45+++ b/alsactl/alsa-restore.service.in
42@@ -10,6 +10,7 @@ DefaultDependencies=no 46@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
47 ConditionPathExists=!@daemonswitch@
48 ConditionPathExistsGlob=/dev/snd/control*
43 After=alsa-state.service 49 After=alsa-state.service
44 Before=shutdown.target
45 Conflicts=shutdown.target
46+ConditionPathExists=@localstatedir@/lib/alsa/asound.state 50+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
47 51
48 [Service] 52 [Service]
49 Type=oneshot 53 Type=oneshot
50-- 54--
511.9.1 552.7.0.rc3
52 56
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
deleted file mode 100644
index 5df004aeae..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
+++ /dev/null
@@ -1,48 +0,0 @@
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/assume-storing-is-success-if-not-sound-card-device.patch b/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch
deleted file mode 100644
index 5309c4ecd4..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1[PATCH] assume storing is success if not sound card device
2
3Upstream-Status: Pending
4
5Systemd will report failure when run alsa-*, if the machine has not the
6sound card. To void this annoyed message, alsa-restore/alsa-state ignore
7all the exit codes by prefixing "-" in ExecStart, like:
8
9 alsa-utils-1.0.29$ grep "=-" ./ -r|grep service.in
10 ./alsactl/alsa-restore.service.in:ExecStart=-@sbindir@/alsactl restore
11 ./alsactl/alsa-state.service.in:ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
12 ./alsactl/alsa-state.service.in:ExecStop=-@sbindir@/alsactl -s kill save_and_quit
13 lsa-utils-1.0.29$
14
15But alsa-store.service.in is missing, and better solution is to ignore
16the exit code 19 which means not sound card device, not all exit code
17
18Signed-off-by: Roy Li <rongqing.li@windriver.com>
19---
20 alsactl/alsa-store.service.in | 1 +
21 1 file changed, 1 insertion(+)
22
23diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in
24index f1a56bb..68ca529 100644
25--- a/alsactl/alsa-store.service.in
26+++ b/alsactl/alsa-store.service.in
27@@ -13,3 +13,4 @@ Before=shutdown.target
28 Type=oneshot
29 ExecStart=@sbindir@/alsactl store
30 StandardOutput=syslog
31+SuccessExitStatus=0 19
32--
331.9.1
34