diff options
author | Koen Kooi <koen@openembedded.org> | 2008-06-14 18:02:48 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2008-06-14 18:02:48 +0000 |
commit | 0aaa95c131f07a9fe34685b9843e4857caf14f26 (patch) | |
tree | 25ee0750584c2c0111b42355a277111b98a977e9 | |
parent | dcf9a8fa856c7a6ffaa07d829477f29388c388d1 (diff) |
pulseaudio alsa wrapper: add meta package that installs the files needed to use pulseaudio as alsa-backend
* you need to manually add the contents of /etc/asound.conf.pulseaudio to /etc/asound.conf
-rw-r--r-- | packages/pulseaudio/files/asound.conf.pulseaudio | 7 | ||||
-rw-r--r-- | packages/pulseaudio/pulseaudio-alsa-wrapper.bb | 37 |
2 files changed, 44 insertions, 0 deletions
diff --git a/packages/pulseaudio/files/asound.conf.pulseaudio b/packages/pulseaudio/files/asound.conf.pulseaudio new file mode 100644 index 0000000000..71f01f2c3c --- /dev/null +++ b/packages/pulseaudio/files/asound.conf.pulseaudio @@ -0,0 +1,7 @@ +pcm.pulse { + type pulse +} + +ctl.pulse { + type pulse +} diff --git a/packages/pulseaudio/pulseaudio-alsa-wrapper.bb b/packages/pulseaudio/pulseaudio-alsa-wrapper.bb new file mode 100644 index 0000000000..7a287da773 --- /dev/null +++ b/packages/pulseaudio/pulseaudio-alsa-wrapper.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Meta package to make alsa transparently use pulseaudio" +LICENSE = "GPLv2" + +SRC_URI = "file://asound.conf.pulseaudio" + +RDEPENDS = "hal \ + pulseaudio-server \ + pulseaudio-misc \ + pulseaudio-module-alsa-sink \ + pulseaudio-module-alsa-source \ + pulseaudio-module-hal-detect \ + libasound-module-ctl-pulse \ + libasound-module-pcm-pulse \ +" + +do_install() { + install -d ${D}/${sysconfdir} + install -m 0644 ${WORKDIR}/asound.conf.pulseaudio ${D}/${sysconfdir} +} + +PACKAGE_ARCH = "all" + +pkg_postinst_${PN} () { +#!/bin/sh +if [ "x$D" != "x" ]; then + exit 1 +fi + +mkdir -p /etc/pulse || true +# Remove existing entries +if [ -e /etc/pulse/session ] ; then + sed -i -e /load-module\ module-hal-detect/d /etc/pulse/session +fi +# Load hal-detect module to avoid alsa->pulse-alsa-pulse->.. loops +echo "load-module module-hal-detect" >> /etc/pulse/session +} + |