diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2015-05-22 21:51:52 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-24 07:19:21 +0100 |
commit | 5d71a49b89658c9b0a0f8044a20304a26824886d (patch) | |
tree | 7e19bb3691bfbeccda36eab4fc36730794e1e6e1 /meta/recipes-multimedia | |
parent | 55fe5a06d9079639852dab804a7198313ea8cc09 (diff) | |
download | poky-5d71a49b89658c9b0a0f8044a20304a26824886d.tar.gz |
alsa-plugins: initial recipe
When PulseAudio is installed, alsa-plugins is needed to provide
compatibility for ALSA applications.
The dependencies are set up so that pulseaudio-server depends on
alsa-plugins-pulseaudio-conf, and alsa-plugins-pulseaudio-conf depends
on the PulseAudio plugins. This should make the ALSA->PulseAudio
compatibility configuration work out of the box, while leaving the
PulseAudio specific configuration out on systems that don't have
pulseaudio-server installed.
The alsa-plugins recipes in meta-guacamayo and meta-webos were used as
references, but this recipe is not a straight copy of either.
(From OE-Core rev: c1413ee6310d37325770ae411874495416f0d923)
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r-- | meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb | 100 | ||||
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 5 |
2 files changed, 105 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb new file mode 100644 index 0000000000..5105e77895 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb | |||
@@ -0,0 +1,100 @@ | |||
1 | DESCRIPTION = "ALSA Plugins" | ||
2 | HOMEPAGE = "http://alsa-project.org" | ||
3 | SECTION = "multimedia" | ||
4 | |||
5 | # The primary license of alsa-plugins is LGPLv2.1. | ||
6 | # | ||
7 | # m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the | ||
8 | # build system, and doesn't affect the licensing of the build result. | ||
9 | # | ||
10 | # The samplerate plugin source code is licensed under GPLv2+ to be consistent | ||
11 | # with the libsamplerate license. | ||
12 | LICENSE = "LGPLv2.1 & GPLv2+" | ||
13 | LIC_FILES_CHKSUM = "\ | ||
14 | file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ | ||
15 | file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
16 | file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ | ||
17 | file://rate/rate_samplerate.c;endline=19;md5=f3d3ce0b189846a486517d97a854b276 \ | ||
18 | " | ||
19 | |||
20 | SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2" | ||
21 | SRC_URI[md5sum] = "a66797b4471e3cbe96575207bfbe252c" | ||
22 | SRC_URI[sha256sum] = "325d85cac285f632b83e0191ae3f348bad03c1f007b937042f164abb81ea6532" | ||
23 | |||
24 | DEPENDS += "alsa-lib" | ||
25 | |||
26 | inherit autotools pkgconfig | ||
27 | |||
28 | PACKAGECONFIG ??= "\ | ||
29 | samplerate \ | ||
30 | speex \ | ||
31 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ | ||
32 | " | ||
33 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav" | ||
34 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | ||
35 | PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" | ||
36 | PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" | ||
37 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" | ||
38 | PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" | ||
39 | PACKAGECONFIG[speex] = "--with-speex=lib,--with-speex=no,speex" | ||
40 | |||
41 | PACKAGES += "alsa-plugins-pulseaudio-conf" | ||
42 | |||
43 | PACKAGES_DYNAMIC = "^libasound-module-.*" | ||
44 | |||
45 | # The alsa-plugins package doesn't itself contain anything, it just depends on | ||
46 | # all built plugins. | ||
47 | ALLOW_EMPTY_${PN} = "1" | ||
48 | |||
49 | do_install_append() { | ||
50 | rm ${D}${libdir}/alsa-lib/*.la | ||
51 | |||
52 | # We use the example as is, so just drop the .example suffix. | ||
53 | mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf | ||
54 | } | ||
55 | |||
56 | python populate_packages_prepend() { | ||
57 | plugindir = bb.data.expand('${libdir}/alsa-lib/', d) | ||
58 | packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) | ||
59 | d.setVar("RDEPENDS_alsa-plugins", packages) | ||
60 | } | ||
61 | |||
62 | # The rate plugins create some symlinks. For example, the samplerate plugin | ||
63 | # creates these links to the main plugin file: | ||
64 | # | ||
65 | # libasound_module_rate_samplerate_best.so | ||
66 | # libasound_module_rate_samplerate_linear.so | ||
67 | # libasound_module_rate_samplerate_medium.so | ||
68 | # libasound_module_rate_samplerate_order.so | ||
69 | # | ||
70 | # The other rate plugins create similar links. We have to add the links to | ||
71 | # FILES manually, because do_split_packages() skips the links (which is good, | ||
72 | # because we wouldn't want do_split_packages() to create separate packages for | ||
73 | # the symlinks). | ||
74 | # | ||
75 | # The symlinks cause QA errors, because usually it's a bug if a non | ||
76 | # -dev/-dbg/-nativesdk package contains links to .so files, but in this case | ||
77 | # the errors are false positives, so we disable the QA checks. | ||
78 | FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so" | ||
79 | FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" | ||
80 | FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" | ||
81 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so" | ||
82 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" | ||
83 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" | ||
84 | |||
85 | FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug" | ||
86 | |||
87 | # 50-pulseaudio.conf defines a device named "pulse" that applications can use | ||
88 | # if they explicitly want to use the PulseAudio plugin. | ||
89 | # 99-pulseaudio-default.conf configures the "default" device to use the | ||
90 | # PulseAudio plugin. | ||
91 | FILES_${PN}-pulseaudio-conf += "\ | ||
92 | ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ | ||
93 | ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ | ||
94 | " | ||
95 | |||
96 | RDEPENDS_${PN}-pulseaudio-conf += "\ | ||
97 | libasound-module-conf-pulse \ | ||
98 | libasound-module-ctl-pulse \ | ||
99 | libasound-module-pcm-pulse \ | ||
100 | " | ||
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index d6ddc3b609..30fe221c93 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc | |||
@@ -149,6 +149,11 @@ RDEPENDS_pulseaudio-server = " \ | |||
149 | pulseaudio-module-role-cork \ | 149 | pulseaudio-module-role-cork \ |
150 | pulseaudio-module-switch-on-port-available" | 150 | pulseaudio-module-switch-on-port-available" |
151 | 151 | ||
152 | # If the server is installed, it's usually desirable to make ALSA applications | ||
153 | # use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration | ||
154 | # that makes the PulseAudio plugin the default ALSA device. | ||
155 | RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf" | ||
156 | |||
152 | RDEPENDS_pulseaudio-module-console-kit =+ "consolekit" | 157 | RDEPENDS_pulseaudio-module-console-kit =+ "consolekit" |
153 | RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" | 158 | RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" |
154 | 159 | ||