diff options
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-utils')
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 @@ | |||
1 | From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Lu, Han" <han.lu@intel.com> | ||
3 | Date: Wed, 3 Feb 2016 14:20:33 +0800 | ||
4 | Subject: [PATCH] alsabat: rename to avoid naming conflict | ||
5 | |||
6 | alsa-utils as well as bareos-bat (as well a some Bacula packages) | ||
7 | all contain a program called /usr/bin/bat, which causes conflicts on | ||
8 | various distributions ("basic audio tester" vs "bareos administration | ||
9 | tool"("bacula administration tool")). | ||
10 | Rename to avoid conflict. | ||
11 | |||
12 | Signed-off-by: Lu, Han <han.lu@intel.com> | ||
13 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
14 | |||
15 | Upstream-Status: Accepted [expected in version 1.1.1] | ||
16 | |||
17 | Signed-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 | |||
25 | diff --git a/bat/Makefile.am b/bat/Makefile.am | ||
26 | index 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@ | ||
49 | diff --git a/bat/bat.1 b/bat/alsabat.1 | ||
50 | similarity index 72% | ||
51 | rename from bat/bat.1 | ||
52 | rename to bat/alsabat.1 | ||
53 | index 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>. | ||
138 | diff --git a/bat/bat.c b/bat/bat.c | ||
139 | index 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 | -- | ||
152 | 2.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 @@ | |||
1 | From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 | 1 | From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Fri, 29 Aug 2014 18:58:56 +0300 | 3 | Date: Fri, 29 Aug 2014 18:58:56 +0300 |
4 | Subject: [PATCH] alsactl: don't let systemd unit restore the volume when | 4 | Subject: [PATCH] alsactl: don't let systemd unit restore the volume when |
@@ -12,16 +12,20 @@ Upstream-Status: Pending | |||
12 | 12 | ||
13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> | 14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> |
15 | |||
16 | Rebased on 1.1.0. | ||
17 | |||
18 | Signed-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 | ||
20 | diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am | 24 | diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am |
21 | index 47f06e9..b728c06 100644 | 25 | index 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 |
38 | diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in | 42 | diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in |
39 | index 245a439..b017854 100644 | 43 | index 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 | -- |
51 | 1.9.1 | 55 | 2.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 @@ | |||
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; | ||
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 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Systemd will report failure when run alsa-*, if the machine has not the | ||
6 | sound card. To void this annoyed message, alsa-restore/alsa-state ignore | ||
7 | all 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 | |||
15 | But alsa-store.service.in is missing, and better solution is to ignore | ||
16 | the exit code 19 which means not sound card device, not all exit code | ||
17 | |||
18 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
19 | --- | ||
20 | alsactl/alsa-store.service.in | 1 + | ||
21 | 1 file changed, 1 insertion(+) | ||
22 | |||
23 | diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in | ||
24 | index 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 | -- | ||
33 | 1.9.1 | ||
34 | |||