add snd
This commit is contained in:
parent
16a5b53b85
commit
1b6733360f
6 changed files with 259 additions and 0 deletions
77
snd/pipewire/build.sh
Normal file
77
snd/pipewire/build.sh
Normal file
|
@ -0,0 +1,77 @@
|
|||
pkgname=pipewire
|
||||
pkgver=0.3.48
|
||||
mver=0.4.1
|
||||
|
||||
fetch() {
|
||||
curl "https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.bz2" -o $pkgname-$pkgver.tar.bz2
|
||||
curl "https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$mver/media-session-$mver.tar.bz2" -O
|
||||
tar -xf $pkgname-$pkgver.tar.bz2
|
||||
mkdir $pkgname-$pkgver/build
|
||||
tar -xf media-session-$mver.tar.bz2 -C $pkgname-$pkgver/subprojects/
|
||||
mv $pkgname-$pkgver/subprojects/media-session-$mver $pkgname-$pkgver/subprojects/media-session
|
||||
cd $pkgname-$pkgver
|
||||
patch -p1 < ../../libudev-zero.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
cd build
|
||||
meson .. \
|
||||
--buildtype=release \
|
||||
--prefix=/usr \
|
||||
--libexecdir=lib \
|
||||
-Ddocs=disabled \
|
||||
-Dexamples=disabled \
|
||||
-Dman=disabled \
|
||||
-Dinstalled_tests=disabled \
|
||||
-Dgstreamer=disabled \
|
||||
-Dsystemd=disabled \
|
||||
-Dpipewire-jack=disabled \
|
||||
-Dpipewire-alsa=enabled \
|
||||
-Dpipewire-v4l2=disabled \
|
||||
-Dspa-plugins=enabled \
|
||||
-Dalsa=enabled \
|
||||
-Daudiomixer=enabled \
|
||||
-Dbluez5=disabled \
|
||||
-Dcontrol=enabled \
|
||||
-Daudiotestsrc=enabled \
|
||||
-Dffmpeg=disabled \
|
||||
-Djack=disabled \
|
||||
-Dsupport=enabled \
|
||||
-Devl=disabled \
|
||||
-Dv4l2=disabled \
|
||||
-Ddbus=enabled \
|
||||
-Dlibcamera=disabled \
|
||||
-Dvideoconvert=disabled \
|
||||
-Dvideotestsrc=disabled \
|
||||
-Dvolume=enabled \
|
||||
-Dvulkan=disabled \
|
||||
-Dpw-cat=enabled \
|
||||
-Dudev=enabled \
|
||||
-Dsdl2=disabled \
|
||||
-Dsndfile=enabled \
|
||||
-Dlibpulse=enabled \
|
||||
-Droc=disabled \
|
||||
-Davahi=disabled \
|
||||
-Dlibusb=disabled \
|
||||
-Draop=disabled \
|
||||
-Dlv2=disabled \
|
||||
-Dsession-managers="['media-session']"
|
||||
|
||||
samu
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
cd build
|
||||
DESTDIR=$pkgdir samu install
|
||||
}
|
||||
|
||||
backup() {
|
||||
return
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat COPYING
|
||||
}
|
37
snd/pipewire/libudev-zero.patch
Normal file
37
snd/pipewire/libudev-zero.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
|
||||
index 61ad1af..52510b5 100644
|
||||
--- a/spa/plugins/alsa/alsa-udev.c
|
||||
+++ b/spa/plugins/alsa/alsa-udev.c
|
||||
@@ -148,9 +148,6 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev)
|
||||
if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem"))
|
||||
return SPA_ID_INVALID;
|
||||
|
||||
- if (udev_device_get_property_value(dev, "SOUND_INITIALIZED") == NULL)
|
||||
- return SPA_ID_INVALID;
|
||||
-
|
||||
if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL)
|
||||
return SPA_ID_INVALID;
|
||||
|
||||
@@ -627,7 +624,7 @@ static int enum_devices(struct impl *this)
|
||||
|
||||
for (devices = udev_enumerate_get_list_entry(enumerate); devices;
|
||||
devices = udev_list_entry_get_next(devices)) {
|
||||
- struct udev_device *dev;
|
||||
+ struct udev_device *dev, *pdev;
|
||||
|
||||
dev = udev_device_new_from_syspath(this->udev, udev_list_entry_get_name(devices));
|
||||
if (dev == NULL)
|
||||
@@ -635,6 +632,13 @@ static int enum_devices(struct impl *this)
|
||||
|
||||
process_device(this, ACTION_ADD, dev);
|
||||
|
||||
+ pdev = udev_device_get_parent(dev);
|
||||
+ if (pdev) {
|
||||
+ process_device(this, ACTION_ADD, pdev);
|
||||
+ }
|
||||
+
|
||||
+ /* no need to call udev_device_unref(pdev) here.
|
||||
+ udev_device_unref() will free parent device implicitly */
|
||||
udev_device_unref(dev);
|
||||
}
|
||||
udev_enumerate_unref(enumerate);
|
Loading…
Add table
Add a link
Reference in a new issue