From a231a4e86a09c10a89871fb532f1b33000f8b001 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Wed, 17 Feb 2016 18:56:14 +0200 Subject: 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 Signed-off-by: Richard Purdie --- .../alsa/alsa-utils-scripts_1.0.29.bb | 21 --- .../alsa/alsa-utils-scripts_1.1.0.bb | 21 +++ ...1-alsabat-rename-to-avoid-naming-conflict.patch | 153 +++++++++++++++++++++ ...-t-let-systemd-unit-restore-the-volume-wh.patch | 20 +-- ...lsa-utils-aplay-interrupt-signal-handling.patch | 48 ------- ...oring-is-success-if-not-sound-card-device.patch | 34 ----- meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb | 97 ------------- meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb | 102 ++++++++++++++ 8 files changed, 288 insertions(+), 208 deletions(-) delete mode 100644 meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch delete mode 100644 meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch delete mode 100644 meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch delete mode 100644 meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb deleted file mode 100644 index a98f9b90ba..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb +++ /dev/null @@ -1,21 +0,0 @@ -require alsa-utils_${PV}.bb - -SUMMARY = "Shell scripts that show help info and create ALSA configuration files" -PROVIDES = "alsa-utils-alsaconf" - -FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:" - -PACKAGES = "${PN}" -RDEPENDS_${PN} += "bash" - -FILES_${PN} = "${sbindir}/alsaconf \ - ${sbindir}/alsa-info.sh \ - " - -S = "${WORKDIR}/alsa-utils-${PV}" - -do_install() { - install -d ${D}${sbindir} - install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/ - install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/ -} diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb new file mode 100644 index 0000000000..a98f9b90ba --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb @@ -0,0 +1,21 @@ +require alsa-utils_${PV}.bb + +SUMMARY = "Shell scripts that show help info and create ALSA configuration files" +PROVIDES = "alsa-utils-alsaconf" + +FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:" + +PACKAGES = "${PN}" +RDEPENDS_${PN} += "bash" + +FILES_${PN} = "${sbindir}/alsaconf \ + ${sbindir}/alsa-info.sh \ + " + +S = "${WORKDIR}/alsa-utils-${PV}" + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/ + install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/ +} 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 @@ +From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001 +From: "Lu, Han" +Date: Wed, 3 Feb 2016 14:20:33 +0800 +Subject: [PATCH] alsabat: rename to avoid naming conflict + +alsa-utils as well as bareos-bat (as well a some Bacula packages) +all contain a program called /usr/bin/bat, which causes conflicts on +various distributions ("basic audio tester" vs "bareos administration +tool"("bacula administration tool")). +Rename to avoid conflict. + +Signed-off-by: Lu, Han +Signed-off-by: Takashi Iwai + +Upstream-Status: Accepted [expected in version 1.1.1] + +Signed-off-by: Tanu Kaskinen +--- + bat/Makefile.am | 10 +++++----- + bat/{bat.1 => alsabat.1} | 43 ++++++++++++++++++++++--------------------- + bat/bat.c | 2 +- + 3 files changed, 28 insertions(+), 27 deletions(-) + rename bat/{bat.1 => alsabat.1} (72%) + +diff --git a/bat/Makefile.am b/bat/Makefile.am +index 842ae6b..985f00c 100644 +--- a/bat/Makefile.am ++++ b/bat/Makefile.am +@@ -1,9 +1,9 @@ +-bin_PROGRAMS = bat +-man_MANS = bat.1 ++bin_PROGRAMS = alsabat ++man_MANS = alsabat.1 + +-EXTRA_DIST = bat.1 ++EXTRA_DIST = alsabat.1 + +-bat_SOURCES = \ ++alsabat_SOURCES = \ + bat.c \ + common.c \ + analyze.c \ +@@ -21,4 +21,4 @@ noinst_HEADERS = \ + AM_CPPFLAGS = \ + -Wall -I$(top_srcdir)/include + +-bat_LDADD = @FFTW_LIB@ ++alsabat_LDADD = @FFTW_LIB@ +diff --git a/bat/bat.1 b/bat/alsabat.1 +similarity index 72% +rename from bat/bat.1 +rename to bat/alsabat.1 +index e00fc27..8d0b9c0 100644 +--- a/bat/bat.1 ++++ b/bat/alsabat.1 +@@ -1,23 +1,23 @@ +-.TH BAT 1 "20th October 2015" ++.TH ALSABAT 1 "20th October 2015" + .SH NAME +-bat \- command\-line sound tester for ALSA sound card driver ++alsabat \- command\-line sound tester for ALSA sound card driver + + .SH SYNOPSIS +-\fBbat\fP [\fIflags\fP] ++\fBalsabat\fP [\fIflags\fP] + + .SH DESCRIPTION +-\fBBAT(Basic Audio Tester)\fP is a simple command\-line utility intended +-to help automate audio driver and sound server testing with little human +-interaction. BAT can be used to test audio quality, stress test features +-and test audio before and after PM state changes. ++\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility ++intended to help automate audio driver and sound server testing with little ++human interaction. ALSABAT can be used to test audio quality, stress test ++features and test audio before and after PM state changes. + +-BAT's design is relatively simple. BAT plays an audio stream and captures +-the same stream in either a digital or analog loop back. It then compares +-the captured stream using a FFT to the original to determine if the test +-case passes or fails. ++ALSABAT's design is relatively simple. ALSABAT plays an audio stream and ++captures the same stream in either a digital or analog loop back. It then ++compares the captured stream using a FFT to the original to determine if ++the test case passes or fails. + +-BAT can either run wholly on the target machine being tested (standalone +-mode) or can run as a client/server mode where by bat client runs on the ++ALSABAT can either run wholly on the target machine being tested (standalone ++mode) or can run as a client/server mode where by alsabat client runs on the + target and runs as a server on a separate tester machine. The client/server + mode still requires some manual interaction for synchronization, but this + is actively being developed for future releases. +@@ -93,8 +93,8 @@ Frequencies with amplitude larger than threshold will be recognized as a + peak, and the frequency with largest peak value will be recognized as a + detected frequency. + .br +-BAT then compares the detected frequency to target frequency, to decide +-if the detecting passes or fails. ++ALSABAT then compares the detected frequency to target frequency, to ++decide if the detecting passes or fails. + .br + The default value is 3.0. + .TP +@@ -117,18 +117,19 @@ Target WAV file to save capture test content. + .TP + \fI\-\-local\fP + Internal loopback mode. +-Playback, capture and analysis internal to BAT only. This is intended for +-developers to test new BAT features as no audio is routed outside of BAT. ++Playback, capture and analysis internal to ALSABAT only. This is intended ++for developers to test new ALSABAT features as no audio is routed outside ++of ALSABAT. + + .SH EXAMPLES + + .TP +-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR ++\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR + Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format, + and then capture and analyze. + + .TP +-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR ++\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR + Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM + data, and then capture and analyze. + +@@ -152,7 +153,7 @@ Currently only support RIFF WAV format with PCM data. Please report any bugs to + the alsa-devel mailing list. + + .SH AUTHOR +-\fBbat\fP is by Liam Girdwood , Bernard Gautier +- and Han Lu . ++\fBalsabat\fP is by Liam Girdwood , Bernard ++Gautier and Han Lu . + This document is by Liam Girdwood and Han Lu + . +diff --git a/bat/bat.c b/bat/bat.c +index 086b9fa..ddb60b7 100644 +--- a/bat/bat.c ++++ b/bat/bat.c +@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat) + static void usage(struct bat *bat) + { + fprintf(bat->log, +-_("Usage: bat [-options]...\n" ++_("Usage: alsabat [-options]...\n" + "\n" + " -h, --help this help\n" + " -D pcm device for both playback and capture\n" +-- +2.7.0 + 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 @@ -From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 +From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 29 Aug 2014 18:58:56 +0300 Subject: [PATCH] alsactl: don't let systemd unit restore the volume when @@ -12,16 +12,20 @@ Upstream-Status: Pending Signed-off-by: Koen Kooi Signed-off-by: Cristian Iorga + +Rebased on 1.1.0. + +Signed-off-by: Tanu Kaskinen --- alsactl/Makefile.am | 7 ++++--- alsactl/alsa-restore.service.in | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am -index 47f06e9..b728c06 100644 +index cac8094..ff865dc 100644 --- a/alsactl/Makefile.am +++ b/alsactl/Makefile.am -@@ -43,9 +43,10 @@ install-data-hook: +@@ -38,9 +38,10 @@ install-data-hook: endif edit = \ @@ -36,17 +40,17 @@ index 47f06e9..b728c06 100644 alsa-state.service: alsa-state.service.in diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in -index 245a439..b017854 100644 +index 2884098..bac3ccc 100644 --- a/alsactl/alsa-restore.service.in +++ b/alsactl/alsa-restore.service.in -@@ -10,6 +10,7 @@ DefaultDependencies=no +@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State + ConditionPathExists=!@daemonswitch@ + ConditionPathExistsGlob=/dev/snd/control* After=alsa-state.service - Before=shutdown.target - Conflicts=shutdown.target +ConditionPathExists=@localstatedir@/lib/alsa/asound.state [Service] Type=oneshot -- -1.9.1 +2.7.0.rc3 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 @@ -Upstream-Status: Pending - -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. - -Signed-off-by: Anant Agrawal -Signed-off-by: Mikhail Durnev - ---- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530 -+++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530 -@@ -392,14 +392,22 @@ - putchar('\n'); - if (!quiet_mode) - fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); -- if (handle) -+ if (stream == SND_PCM_STREAM_CAPTURE) { -+ if (fmt_rec_table[file_type].end) { -+ fmt_rec_table[file_type].end(fd); -+ fd = -1; -+ } -+ stream = -1; -+ } -+ if (fd > 1) { -+ close(fd); -+ fd = -1; -+ } -+ if (handle && sig != SIGABRT) { - snd_pcm_abort(handle); -- if (sig == SIGABRT) { -- /* do not call snd_pcm_close() and abort immediately */ - handle = NULL; -- prg_exit(EXIT_FAILURE); - } -- signal(sig, signal_handler); -+ prg_exit(EXIT_FAILURE); - } - - /* call on SIGUSR1 signal. */ -@@ -2096,7 +2104,7 @@ - ssize_t result = count, r; - size_t size; - -- while (count > 0) { -+ while (count > 0 && !in_aborting) { - size = count; - if (size > chunk_bytes - buffer_pos) - 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 @@ -[PATCH] assume storing is success if not sound card device - -Upstream-Status: Pending - -Systemd will report failure when run alsa-*, if the machine has not the -sound card. To void this annoyed message, alsa-restore/alsa-state ignore -all the exit codes by prefixing "-" in ExecStart, like: - - alsa-utils-1.0.29$ grep "=-" ./ -r|grep service.in - ./alsactl/alsa-restore.service.in:ExecStart=-@sbindir@/alsactl restore - ./alsactl/alsa-state.service.in:ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon - ./alsactl/alsa-state.service.in:ExecStop=-@sbindir@/alsactl -s kill save_and_quit - lsa-utils-1.0.29$ - -But alsa-store.service.in is missing, and better solution is to ignore -the exit code 19 which means not sound card device, not all exit code - -Signed-off-by: Roy Li ---- - alsactl/alsa-store.service.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in -index f1a56bb..68ca529 100644 ---- a/alsactl/alsa-store.service.in -+++ b/alsactl/alsa-store.service.in -@@ -13,3 +13,4 @@ Before=shutdown.target - Type=oneshot - ExecStart=@sbindir@/alsactl store - StandardOutput=syslog -+SuccessExitStatus=0 19 --- -1.9.1 - diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb deleted file mode 100644 index 97fe4b2fe4..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb +++ /dev/null @@ -1,97 +0,0 @@ -SUMMARY = "ALSA sound utilities" -HOMEPAGE = "http://www.alsa-project.org" -BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" -SECTION = "console/utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" -DEPENDS = "alsa-lib ncurses libsamplerate0" - -PACKAGECONFIG ??= "udev" -PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev" -PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ - file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ - file://alsa-utils-aplay-interrupt-signal-handling.patch \ - file://assume-storing-is-success-if-not-sound-card-device.patch \ - " - -SRC_URI[md5sum] = "6b289bf874c4c9a63f4b3973093dd404" -SRC_URI[sha256sum] = "5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b" - -# lazy hack. needs proper fixing in gettext.m4, see -# http://bugs.openembedded.org/show_bug.cgi?id=2348 -# please close bug and remove this comment when properly fixed -# -EXTRA_OECONF_append_libc-uclibc = " --disable-nls" - -inherit autotools gettext pkgconfig - -# This are all packages that we need to make. Also, the now empty alsa-utils -# ipk depends on them. - -ALSA_UTILS_PKGS = "\ - alsa-utils-alsamixer \ - alsa-utils-midi \ - alsa-utils-aplay \ - alsa-utils-amixer \ - alsa-utils-aconnect \ - alsa-utils-iecset \ - alsa-utils-speakertest \ - alsa-utils-aseqnet \ - alsa-utils-aseqdump \ - alsa-utils-alsactl \ - alsa-utils-alsaloop \ - alsa-utils-alsaucm \ - " - -PACKAGES += "${ALSA_UTILS_PKGS}" -RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" - -FILES_${PN} = "" -FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" -FILES_alsa-utils-amixer = "${bindir}/amixer" -FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" -FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" -FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" -FILES_alsa-utils-aconnect = "${bindir}/aconnect" -FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" -FILES_alsa-utils-iecset = "${bindir}/iecset" -FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" -FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" -FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" -FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" - - -SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA" -SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings" -SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" -SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility" -SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" -SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager" -SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer" -SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" -SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" -SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" -SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility" -SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" - -RRECOMMENDS_alsa-utils-alsactl = "alsa-states" - -ALLOW_EMPTY_alsa-utils = "1" - -do_install() { - autotools_do_install - - # We don't ship this here because it requires a dependency on bash. - # See alsa-utils-scripts_${PV}.bb - rm ${D}${sbindir}/alsaconf - rm ${D}${sbindir}/alsa-info.sh - - if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then - # This is where alsa-utils will install its rules if we don't tell it anything else. - rm -rf ${D}/lib/udev - rmdir --ignore-fail-on-non-empty ${D}/lib - fi -} diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb new file mode 100644 index 0000000000..af40488180 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb @@ -0,0 +1,102 @@ +SUMMARY = "ALSA sound utilities" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "console/utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" +DEPENDS = "alsa-lib ncurses libsamplerate0" + +PACKAGECONFIG ??= "udev" +PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftw" +PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev" +PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ + file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ + file://0001-alsabat-rename-to-avoid-naming-conflict.patch \ + " + +SRC_URI[md5sum] = "b9d6102fbbd0b68040bb77023ed30c0c" +SRC_URI[sha256sum] = "3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1" + +# lazy hack. needs proper fixing in gettext.m4, see +# http://bugs.openembedded.org/show_bug.cgi?id=2348 +# please close bug and remove this comment when properly fixed +# +EXTRA_OECONF_append_libc-uclibc = " --disable-nls" + +inherit autotools gettext pkgconfig + +# This are all packages that we need to make. Also, the now empty alsa-utils +# ipk depends on them. + +ALSA_UTILS_PKGS = "\ + ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \ + alsa-utils-alsamixer \ + alsa-utils-alsatplg \ + alsa-utils-midi \ + alsa-utils-aplay \ + alsa-utils-amixer \ + alsa-utils-aconnect \ + alsa-utils-iecset \ + alsa-utils-speakertest \ + alsa-utils-aseqnet \ + alsa-utils-aseqdump \ + alsa-utils-alsactl \ + alsa-utils-alsaloop \ + alsa-utils-alsaucm \ + " + +PACKAGES += "${ALSA_UTILS_PKGS}" +RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" + +FILES_${PN} = "" +FILES_alsa-utils-alsabat = "${bindir}/alsabat" +FILES_alsa-utils-alsatplg = "${bindir}/alsatplg" +FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" +FILES_alsa-utils-amixer = "${bindir}/amixer" +FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" +FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" +FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" +FILES_alsa-utils-aconnect = "${bindir}/aconnect" +FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" +FILES_alsa-utils-iecset = "${bindir}/iecset" +FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" +FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" +FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" +FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" + +SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver" +SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel" +SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA" +SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings" +SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" +SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility" +SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" +SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager" +SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer" +SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" +SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" +SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" +SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility" +SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" + +RRECOMMENDS_alsa-utils-alsactl = "alsa-states" + +ALLOW_EMPTY_alsa-utils = "1" + +do_install() { + autotools_do_install + + # We don't ship this here because it requires a dependency on bash. + # See alsa-utils-scripts_${PV}.bb + rm ${D}${sbindir}/alsaconf + rm ${D}${sbindir}/alsa-info.sh + + if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then + # This is where alsa-utils will install its rules if we don't tell it anything else. + rm -rf ${D}/lib/udev + rmdir --ignore-fail-on-non-empty ${D}/lib + fi +} -- cgit 1.2.3-korg