aboutsummaryrefslogtreecommitdiff
path: root/recipes/pulseaudio/pulseaudio-alsa-wrapper.bb
blob: 571dd46bbf31d7e83b9ead42fa8eebd6d8cf65a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DESCRIPTION = "Meta package to make alsa transparently use pulseaudio"
LICENSE = "GPLv2"

PR = "r2"

SRC_URI = "file://asound.conf.pulseaudio"

RDEPENDS_${PN} = "hal \
	pulseaudio-server \
	pulseaudio-misc \
	pulseaudio-module-alsa-sink \
	pulseaudio-module-alsa-source \
	pulseaudio-module-hal-detect \
	pulseaudio-module-volume-restore \
	pulseaudio-module-default-device-restore \
	pulseaudio-module-rescue-streams \
	pulseaudio-module-suspend-on-idle \
	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
}