Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | SUMMARY = "ALSA Plugins" |
| 2 | DESCRIPTION = "Used to create virtual devices that can be used like normal \ |
| 3 | hardware devices but cause extra processing of the sound stream to take place. \ |
| 4 | They are used while configuring ALSA in the .asoundrc file." |
| 5 | HOMEPAGE = "http://alsa-project.org" |
| 6 | BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" |
| 7 | SECTION = "multimedia" |
| 8 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9 | # The primary license of alsa-plugins is LGPL-2.1-only. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 10 | # |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 11 | # m4/attributes.m4 is licensed under GPL-2.0-or-later. m4/attributes.m4 is part |
| 12 | # of the build system, and doesn't affect the licensing of the build result. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 13 | # |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 14 | # The samplerate plugin source code is licensed under GPL-2.0-or-later to be |
| 15 | # consistent with the libsamplerate license. However, if the licensee has a |
| 16 | # commercial license for libsamplerate, the samplerate plugin may be used under |
| 17 | # the terms of LGPL-2.1-only like the rest of the plugins. |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 18 | LICENSE = "LGPL-2.1-only & GPL-2.0-or-later" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 19 | LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ |
| 20 | file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
| 21 | file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ |
| 22 | file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ |
| 23 | " |
| 24 | |
| 25 | SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 26 | SRC_URI[sha256sum] = "8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 27 | |
| 28 | DEPENDS += "alsa-lib" |
| 29 | |
| 30 | inherit autotools pkgconfig |
| 31 | |
| 32 | PACKAGECONFIG ??= "\ |
| 33 | samplerate \ |
| 34 | speexdsp \ |
| 35 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ |
| 36 | " |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 37 | PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,libavtp" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 38 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 39 | PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav" |
| 40 | PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" |
| 41 | PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" |
| 42 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" |
| 43 | PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" |
| 44 | PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" |
| 45 | |
| 46 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" |
| 47 | |
| 48 | PACKAGES_DYNAMIC = "^libasound-module-.*" |
| 49 | |
| 50 | # The alsa-plugins package doesn't itself contain anything, it just depends on |
| 51 | # all built plugins. |
| 52 | FILES:${PN} = "" |
| 53 | ALLOW_EMPTY:${PN} = "1" |
| 54 | |
| 55 | do_install:append() { |
| 56 | rm -f ${D}${libdir}/alsa-lib/*.la |
| 57 | |
| 58 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then |
| 59 | # We use the example as is. Upstream installs the file under |
| 60 | # /etc, but we move it under /usr/share and add a symlink under |
| 61 | # /etc to be consistent with other installed configuration |
| 62 | # files. |
| 63 | mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf |
| 64 | ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf |
| 65 | fi |
| 66 | } |
| 67 | |
| 68 | python populate_packages:prepend() { |
| 69 | plugindir = d.expand('${libdir}/alsa-lib/') |
| 70 | packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) |
| 71 | d.setVar("RDEPENDS:alsa-plugins", packages) |
| 72 | } |
| 73 | |
| 74 | # Many plugins have a configuration file (plus a symlink in /etc) associated |
| 75 | # with them. We put the plugin and it's configuration usually in the same |
| 76 | # package, but that's problematic when the configuration file is related to |
| 77 | # multiple plugins, as is the case with the pulse, oss and maemo plugins. In |
| 78 | # case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf |
| 79 | # package that depends on all the pulse plugins, which ensures that all plugins |
| 80 | # that the configuration references are installed. The oss and maemo |
| 81 | # configuration files, on the other hand, are in the respective pcm plugin |
| 82 | # packages. Therefore it's possible to install the configuration file without |
| 83 | # the ctl plugin that the configuration file references. This is unlikely to |
| 84 | # cause big problems, but some kind of improvement to the packaging could |
| 85 | # probably be done here (at least it would be good to handle the different |
| 86 | # plugins in a consistent way). |
| 87 | FILES:${MLPREFIX}libasound-module-ctl-arcam-av += "\ |
| 88 | ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \ |
| 89 | ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \ |
| 90 | " |
| 91 | FILES:${MLPREFIX}libasound-module-pcm-a52 += "\ |
| 92 | ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \ |
| 93 | ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \ |
| 94 | " |
| 95 | FILES:${MLPREFIX}libasound-module-pcm-alsa-dsp += "\ |
| 96 | ${datadir}/alsa/alsa.conf.d/98-maemo.conf \ |
| 97 | ${sysconfdir}/alsa/conf.d/98-maemo.conf \ |
| 98 | " |
| 99 | FILES:${MLPREFIX}libasound-module-pcm-jack += "\ |
| 100 | ${datadir}/alsa/alsa.conf.d/50-jack.conf \ |
| 101 | ${sysconfdir}/alsa/conf.d/50-jack.conf \ |
| 102 | " |
| 103 | FILES:${MLPREFIX}libasound-module-pcm-oss += "\ |
| 104 | ${datadir}/alsa/alsa.conf.d/50-oss.conf \ |
| 105 | ${sysconfdir}/alsa/conf.d/50-oss.conf \ |
| 106 | " |
| 107 | FILES:${MLPREFIX}libasound-module-pcm-speex += "\ |
| 108 | ${datadir}/alsa/alsa.conf.d/60-speex.conf \ |
| 109 | ${sysconfdir}/alsa/conf.d/60-speex.conf \ |
| 110 | " |
| 111 | FILES:${MLPREFIX}libasound-module-pcm-upmix += "\ |
| 112 | ${datadir}/alsa/alsa.conf.d/60-upmix.conf \ |
| 113 | ${sysconfdir}/alsa/conf.d/60-upmix.conf \ |
| 114 | " |
| 115 | FILES:${MLPREFIX}libasound-module-pcm-usb-stream += "\ |
| 116 | ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \ |
| 117 | ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \ |
| 118 | " |
| 119 | FILES:${MLPREFIX}libasound-module-pcm-vdownmix += "\ |
| 120 | ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \ |
| 121 | ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \ |
| 122 | " |
| 123 | FILES:${MLPREFIX}libasound-module-rate-lavrate += "\ |
| 124 | ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \ |
| 125 | ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \ |
| 126 | " |
| 127 | FILES:${MLPREFIX}libasound-module-rate-samplerate += "\ |
| 128 | ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \ |
| 129 | ${sysconfdir}/alsa/conf.d/10-samplerate.conf \ |
| 130 | " |
| 131 | FILES:${MLPREFIX}libasound-module-rate-speexrate += "\ |
| 132 | ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \ |
| 133 | ${sysconfdir}/alsa/conf.d/10-speexrate.conf \ |
| 134 | " |
| 135 | |
| 136 | # The rate plugins create some symlinks. For example, the samplerate plugin |
| 137 | # creates these links to the main plugin file: |
| 138 | # |
| 139 | # libasound_module_rate_samplerate_best.so |
| 140 | # libasound_module_rate_samplerate_linear.so |
| 141 | # libasound_module_rate_samplerate_medium.so |
| 142 | # libasound_module_rate_samplerate_order.so |
| 143 | # |
| 144 | # The other rate plugins create similar links. We have to add the links to |
| 145 | # FILES manually, because do_split_packages() skips the links (which is good, |
| 146 | # because we wouldn't want do_split_packages() to create separate packages for |
| 147 | # the symlinks). |
| 148 | # |
| 149 | # The symlinks cause QA errors, because usually it's a bug if a non |
| 150 | # -dev/-dbg/-nativesdk package contains links to .so files, but in this case |
| 151 | # the errors are false positives, so we disable the QA checks. |
| 152 | FILES:${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so" |
| 153 | FILES:${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" |
| 154 | FILES:${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" |
| 155 | INSANE_SKIP:${MLPREFIX}libasound-module-rate-lavrate = "dev-so" |
| 156 | INSANE_SKIP:${MLPREFIX}libasound-module-rate-samplerate = "dev-so" |
| 157 | INSANE_SKIP:${MLPREFIX}libasound-module-rate-speexrate = "dev-so" |
| 158 | |
| 159 | # 50-pulseaudio.conf defines a device named "pulse" that applications can use |
| 160 | # if they explicitly want to use the PulseAudio plugin. |
| 161 | # 99-pulseaudio-default.conf configures the "default" device to use the |
| 162 | # PulseAudio plugin. |
| 163 | FILES:${PN}-pulseaudio-conf += "\ |
| 164 | ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ |
| 165 | ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ |
| 166 | ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \ |
| 167 | ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \ |
| 168 | " |
| 169 | |
| 170 | RDEPENDS:${PN}-pulseaudio-conf += "\ |
| 171 | ${MLPREFIX}libasound-module-conf-pulse \ |
| 172 | ${MLPREFIX}libasound-module-ctl-pulse \ |
| 173 | ${MLPREFIX}libasound-module-pcm-pulse \ |
| 174 | " |