Skip to contentSkip to conversation

Add liblc3 and enable the LC3 codec in PipeWire

PATCH In review Alsey Coleman Miller 2 participants 4 messages Aug 4

lore
Share & tools
lore
#0 lore raw

cover Add liblc3 and enable the LC3 codec in PipeWire

LC3 is the mandatory codec of the Bluetooth LE Audio profiles. The PipeWire bluez5 plugin can encode and decode it when built against liblc3, but -Dbluez5-codec-lc3 was unconditionally disabled because the library was not packaged.

The first patch adds liblc3 (the Google implementation), the second wires it up as an optional dependency of PipeWire, following the same idiom already used there for the opus and aac codecs.

Both patches pass utils/check-package. The tarball and LICENSE hashes were verified against the upstream v1.1.3 release, and the two meson options used (-Dtools, -Dpython) exist in that release.

Alsey Coleman Miller (2):
package/liblc3: new package
package/pipewire: add support for the LC3 bluetooth codec

 DEVELOPERS                   |  3 +++
 package/Config.in            |  1 +
 package/liblc3/Config.in     |  8 ++++++++
 package/liblc3/liblc3.hash   |  3 +++
 package/liblc3/liblc3.mk     | 16 ++++++++++++++++
 package/pipewire/pipewire.mk |  7 ++++++-
 6 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 package/liblc3/Config.in
 create mode 100644 package/liblc3/liblc3.hash
 create mode 100644 package/liblc3/liblc3.mk
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/2 package/liblc3: new package

liblc3 is the Google implementation of LC3, the mandatory codec of the Bluetooth LE Audio profiles. The PipeWire bluez5 plugin can use it to encode and decode LE Audio streams.

https://github.com/google/liblc3

---
 DEVELOPERS                 |  3 +++
 package/Config.in          |  1 +
 package/liblc3/Config.in   |  8 ++++++++
 package/liblc3/liblc3.hash |  3 +++
 package/liblc3/liblc3.mk   | 16 ++++++++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 package/liblc3/Config.in
 create mode 100644 package/liblc3/liblc3.hash
 create mode 100644 package/liblc3/liblc3.mk
DEVELOPERS +3 -0
index f2713c7239..f8a6e5bdd0 100644
@@ -166,6 +166,9 @@ F:	configs/hifive_unleashed_defconfig
 F:	package/libspdm/
 F:	package/xen/
 
+N:	Alsey Coleman Miller <[email protected]>
+F:	package/liblc3/
+
 N:	Alvaro G. M <[email protected]>
 F:	package/dcron/
 F:	package/libxmlrpc/
package/Config.in +1 -0
index fc1e57d30d..82d11b5bdc 100644
@@ -1570,6 +1570,7 @@ menu "Audio/Sound"
 	source "package/libgsm/Config.in"
 	source "package/libid3tag/Config.in"
 	source "package/libilbc/Config.in"
+	source "package/liblc3/Config.in"
 	source "package/liblo/Config.in"
 	source "package/libmad/Config.in"
 	source "package/libmodplug/Config.in"
package/liblc3/Config.in new file +8 -0
new file mode 100644
index 0000000000..8dbd1d00b4
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBLC3
+	bool "liblc3"
+	help
+	  LC3 is an efficient low latency audio codec, specified by
+	  the Bluetooth SIG for the LE Audio profiles. This is the
+	  Google implementation of the encoder and decoder.
+
+	  https://github.com/google/liblc3
package/liblc3/liblc3.hash new file +3 -0
new file mode 100644
index 0000000000..269316d501
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  276752ff54ce6a77d54ec133397b9d7e71f90caf3d9afa32d8b0e891b8ecb8af  liblc3-1.1.3.tar.gz
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
package/liblc3/liblc3.mk new file +16 -0
new file mode 100644
index 0000000000..87ab68105a
@@ -0,0 +1,16 @@
+################################################################################
+#
+# liblc3
+#
+################################################################################
+
+LIBLC3_VERSION = 1.1.3
+LIBLC3_SITE = $(call github,google,liblc3,v$(LIBLC3_VERSION))
+LIBLC3_LICENSE = Apache-2.0
+LIBLC3_LICENSE_FILES = LICENSE
+LIBLC3_INSTALL_STAGING = YES
+LIBLC3_CONF_OPTS = \
+	-Dpython=false \
+	-Dtools=false
+
+$(eval $(meson-package))
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 1/2] package/liblc3: new package

Quoted 7 lines · Alsey Coleman Miller

liblc3 is the Google implementation of LC3, the mandatory codec of the Bluetooth LE Audio profiles. The PipeWire bluez5 plugin can use it to encode and decode LE Audio streams.

https://github.com/google/liblc3

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

PATCH 2/2 package/pipewire: add support for the LC3 bluetooth codec

In reply to Alsey Coleman Miller

The bluez5 plugin can encode and decode LC3 (Bluetooth LE Audio) when built against liblc3, but the meson option was unconditionally disabled. Enable it when BR2_PACKAGE_LIBLC3 is set, using the same conditional idiom as the neighbouring opus and aac codecs.

---
 package/pipewire/pipewire.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/pipewire/pipewire.mk +6 -1
index c5127b9a9d..9f66db0f55 100644
@@ -20,7 +20,6 @@ PIPEWIRE_CONF_OPTS += \
 	-Dspa-plugins=enabled \
 	-Daudiomixer=enabled \
 	-Daudioconvert=enabled \
-	-Dbluez5-codec-lc3=disabled \
 	-Dbluez5-codec-lc3plus=disabled \
 	-Dcontrol=enabled \
 	-Daudiotestsrc=enabled \
@@ -129,6 +128,12 @@ PIPEWIRE_DEPENDENCIES += fdk-aac
 else
 PIPEWIRE_CONF_OPTS += -Dbluez5-codec-aac=disabled
 endif
+ifeq ($(BR2_PACKAGE_LIBLC3),y)
+PIPEWIRE_CONF_OPTS += -Dbluez5-codec-lc3=enabled
+PIPEWIRE_DEPENDENCIES += liblc3
+else
+PIPEWIRE_CONF_OPTS += -Dbluez5-codec-lc3=disabled
+endif
 else
 PIPEWIRE_CONF_OPTS += -Dbluez5=disabled
 endif
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot