Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "ALSA Plugins" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 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." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | HOMEPAGE = "http://alsa-project.org" |
| 6 | BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" |
| 7 | SECTION = "multimedia" |
| 8 | |
| 9 | # The primary license of alsa-plugins is LGPLv2.1. |
| 10 | # |
| 11 | # m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the |
| 12 | # build system, and doesn't affect the licensing of the build result. |
| 13 | # |
| 14 | # The samplerate plugin source code is licensed under GPLv2+ to be consistent |
| 15 | # with the libsamplerate license. However, if the licensee has a commercial |
| 16 | # license for libsamplerate, the samplerate plugin may be used under the terms |
| 17 | # of LGPLv2.1 like the rest of the plugins. |
| 18 | LICENSE = "LGPLv2.1 & GPLv2+" |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [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 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | |
| 25 | SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 26 | SRC_URI[sha256sum] = "42eef98433d2c8d11f1deeeb459643619215a75aa5a5bbdd06a794e4c413df20" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [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 | " |
| 37 | PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp" |
| 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. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | FILES:${PN} = "" |
| 53 | ALLOW_EMPTY:${PN} = "1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | do_install:append() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 56 | rm -f ${D}${libdir}/alsa-lib/*.la |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 68 | python populate_packages:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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='')) |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | d.setVar("RDEPENDS:alsa-plugins", packages) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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). |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | FILES:${MLPREFIX}libasound-module-ctl-arcam-av += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 88 | ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \ |
| 89 | ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \ |
| 90 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 91 | FILES:${MLPREFIX}libasound-module-pcm-a52 += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 92 | ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \ |
| 93 | ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \ |
| 94 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 95 | FILES:${MLPREFIX}libasound-module-pcm-alsa-dsp += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 96 | ${datadir}/alsa/alsa.conf.d/98-maemo.conf \ |
| 97 | ${sysconfdir}/alsa/conf.d/98-maemo.conf \ |
| 98 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 99 | FILES:${MLPREFIX}libasound-module-pcm-jack += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 100 | ${datadir}/alsa/alsa.conf.d/50-jack.conf \ |
| 101 | ${sysconfdir}/alsa/conf.d/50-jack.conf \ |
| 102 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 103 | FILES:${MLPREFIX}libasound-module-pcm-oss += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 104 | ${datadir}/alsa/alsa.conf.d/50-oss.conf \ |
| 105 | ${sysconfdir}/alsa/conf.d/50-oss.conf \ |
| 106 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 107 | FILES:${MLPREFIX}libasound-module-pcm-speex += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 108 | ${datadir}/alsa/alsa.conf.d/60-speex.conf \ |
| 109 | ${sysconfdir}/alsa/conf.d/60-speex.conf \ |
| 110 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | FILES:${MLPREFIX}libasound-module-pcm-upmix += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 112 | ${datadir}/alsa/alsa.conf.d/60-upmix.conf \ |
| 113 | ${sysconfdir}/alsa/conf.d/60-upmix.conf \ |
| 114 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 115 | FILES:${MLPREFIX}libasound-module-pcm-usb-stream += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 116 | ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \ |
| 117 | ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \ |
| 118 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 119 | FILES:${MLPREFIX}libasound-module-pcm-vdownmix += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 120 | ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \ |
| 121 | ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \ |
| 122 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 123 | FILES:${MLPREFIX}libasound-module-rate-lavrate += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 124 | ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \ |
| 125 | ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \ |
| 126 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 127 | FILES:${MLPREFIX}libasound-module-rate-samplerate += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 128 | ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \ |
| 129 | ${sysconfdir}/alsa/conf.d/10-samplerate.conf \ |
| 130 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 131 | FILES:${MLPREFIX}libasound-module-rate-speexrate += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 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" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 163 | FILES:${PN}-pulseaudio-conf += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 170 | RDEPENDS:${PN}-pulseaudio-conf += "\ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 171 | ${MLPREFIX}libasound-module-conf-pulse \ |
| 172 | ${MLPREFIX}libasound-module-ctl-pulse \ |
| 173 | ${MLPREFIX}libasound-module-pcm-pulse \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 174 | " |