Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1021370: pipewire: build with bluez5-codec-aac=enabled

175 views
Skip to first unread message

KeyofBlueS

unread,
Oct 6, 2022, 6:20:04 PM10/6/22
to
Package: pipewire
Version: 0.3.59-1
Severity: wishlist
X-Debbugs-Cc: Keyof...@gmail.com

Dear Maintainer,

please build pipewire with aac codec support enabled. If this is not possible
due to legal\patent issues, please mention it somewhere in the readme and/or in
the description, maybe in the debian wiki too.
I've spent months to understand why my bluetooth (aac) devices wont pick this
codec, looking in config files, installing and removing packages ecc...
Now i've compiled and installed from sources and it's working, but as i said,
mention it somewhere can be usefull to other users, giving us some clues on
what's going on.

Thanks and best regards.


-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.18.5-custom (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pipewire depends on:
ii init-system-helpers 1.65.2
ii libpipewire-0.3-modules 0.3.59-1-custom
ii pipewire-bin 0.3.59-1-custom

pipewire recommends no packages.

pipewire suggests no packages.

-- no debconf information

Max Nikulin

unread,
Jan 12, 2024, 11:20:05 AM1/12/24
to
On Fri, 07 Oct 2022 00:11:56 +0200 KeyofBlueS wrote:
>
> please build pipewire with aac codec support enabled.

An alternative may be building a separate package for the contrib
repository section that contains just the aac codec plugin.

I have no experience with meson, so I have no idea if it is possible to
force it to ignore everything besides the specific plugin. As a proof of
concept I have tried the following Makefile. Perhaps more flags should
be added.

# - atomic_dep?
top_srcdir ?= .
top_builddir ?= $(top_srcdir)
builddir ?= $(top_srcdir)

spaversion = $(shell sed -n -e "s/^spaversion *= *'\(.*\)'$$/\1/p"
$(top_srcdir)/meson.build)
pkgname = libspa-$(spaversion)
plugindir = $(shell pkg-config --variable=plugindir $(pkgname))
installdir = $(plugindir)/bluez5
# toplevel default_options
plugin_CFLAGS += --std=gnu11 -fPIE
# toplevel cc_flags
plugin_CFLAGS += -D_GNU_SOURCE -DFASTPATH
# toplevel common_flags
plugin_CFLAGS += -fvisibility=hidden -fno-strict-aliasing
# AVX and SSE flags perhaps may be ignored since
# computations should be done inside the linked library
# bluez5 codec_args
plugin_CFLAGS += -DCODEC_PLUGIN
# spa pkgconfig
plugin_CFLAGS += $(shell pkg-config --cflags $(pkgname))
# required for shared library
plugin_CFLAGS += -fPIC
plugin_CFLAGS += $(shell pkg-config --cflags fdk-aac)
ALL_CFLAGS = $(plugin_CFLAGS) $(CFLAGS)
ALL_LDLIBS = $(LDLIBS) $(shell pkg-config --libs fdk-aac)

bluez5_dir = $(top_srcdir)/spa/plugins/bluez5
aac_codec = $(builddir)/libspa-codec-bluez5-aac.so
plugin_LIBRARIES += $(aac_codec)
plugin_OBJECTS += $(builddir)/a2dp-codec-aac.o $(builddir)/media-codecs.o

all: $(plugin_LIBRARIES)
clean:
$(RM) $(plugin_LIBRARIES) $(plugin_OBJECTS)

# Not $(LD) due to $(LDFLAGS)
# ld: unrecognized option '-Wl,-z,relro'
$(aac_codec): $(plugin_OBJECTS)
$(CC) -o $@ -shared $(LDFLAGS) $^ $(ALL_LDLIBS)

$(builddir)/%.o: $(bluez5_dir)/%.c
$(CC) -o $@ $(CPPFLAGS) $(ALL_CFLAGS) -c $<

install: $(plugin_LIBRARIES)
install -D --target-directory $(DESTDIR)$(installdir) $(plugin_LIBRARIES)

.PHONY: all clean install

--- 8< --- debian/rules --- 8< ---
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs

%:
dh $@

# Custom Makefile instead of configure script
override_dh_auto_configure:
override_dh_makeshlibs:

Jeremy Bícha

unread,
Jan 12, 2024, 2:30:04 PM1/12/24
to
On Fri, Jan 12, 2024 at 11:12 AM Max Nikulin <mani...@gmail.com> wrote:
> On Fri, 07 Oct 2022 00:11:56 +0200 KeyofBlueS wrote:
> >
> > please build pipewire with aac codec support enabled.
>
> An alternative may be building a separate package for the contrib
> repository section that contains just the aac codec plugin.

I would prefer getting fdk-aac-free into Debian main. It has been in
the NEW queue for roughly 2 years.

Thank you,
Jeremy Bícha

Max Nikulin

unread,
Jan 12, 2024, 9:30:04 PM1/12/24
to
I suggested a separate contrib package because after reading #981285 I
decided that there is a little chance that package can be moved to main.

"Changes" in
https://ftp-master.debian.org/new/fdk-aac-free_2.0.2-3.html
(I hope NEWS file advertises it as well) contains a better description
of intentions in comparison to the request to ftpmasters in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981285#64

I was confused by
https://fedoraproject.org/wiki/Licensing/FDK-AAC
> [UPDATE: As of some date in August 2022, the FDK-AAC license is expected
> to be reclassified as not-allowed (essentially, non-free) because of its
> "no patent licenses" feature. This is not expected to have an impact on
> the continued packaging of fdk-aac-free in Fedora.]
Maybe another message to ftpmasters could help. One that clearly states
the steps taking to resolve licensing issues.

It may be offered to add new set of binary packages, e.g.
libfdk-aac2-free having Provides: libfdk-aac2 and Conflicts:
libfdk-aac2. However duplication increases maintenance burden in the
case of security bugs.

So it is necessary to identify friction points related to fdk-aac-free.
0 new messages