[How to do instruction] Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package (/showthread.php?tid=5583) |
RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - Tim Curtis - 05-19-2023 So true. Hearing does not improve with age like red wine is supposed to do, lol. I'm just trying to verify whether the OP's recipe does in fact work and under what usage scenarios. RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - jenzd - 05-25-2023 (05-19-2023, 12:28 PM)Tim Curtis Wrote:(05-19-2023, 11:52 AM)TheOldPresbyope Wrote:(05-18-2023, 01:06 PM)romain Wrote: Hello, Hi all, Sorry for the late answer, I was off for a few days. I can reproduce the issue with aptX and aptX-HD and it seems to be caused by a change introduced with bluez-alsa version 4.0.0. Support for aptX and aptX-HD via libopenaptx (both for playback and receive) is avaiable since version 3.1.0 of bluez-alsa and used to work perfectly together with Moode. I actually used this configuration quite often in the past with several versions of Moode (at least since Moode 7) where my Sony Xperia XZ1 Compact reliably connected via the best available codec (aptx-HD in this case). Unfortunately, I did not test aptX again when writing the guide, but only used an AAC capable device instead. (And didn't expect negative surprises due to the stable behaviour in the past.) With the current version of Moode (8.3.2) I get the following test results with the Sony Xperia phone:
Sorry for the (unexpected) inconveniece. Best regards Jens RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - romain - 05-25-2023 (05-25-2023, 12:20 PM)jenzd Wrote:(05-19-2023, 12:28 PM)Tim Curtis Wrote:(05-19-2023, 11:52 AM)TheOldPresbyope Wrote:(05-18-2023, 01:06 PM)romain Wrote: Hello, No problem Jens, thanks RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - TheOldPresbyope - 05-25-2023 Huh. I'm surprised I don't recall libopenaptx. In any case, since I have neither aptX nor aptX-HD senders available, the issue is moot for me. I have to say I'm nonplussed by this statement about the library I found at https://github.com/Arkq/openaptx Quote:This project is for research purposes only. Without a proper license private and commercial usage might be a case of a patent infringement. If you are looking for a library, which can be installed and used legally (commercial, private and educational usage), go to the Qualcomm® aptX™ homepage and contact Qualcomm customer service. Regards, Kent RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - jenzd - 05-25-2023 (05-25-2023, 12:20 PM)jenzd Wrote: Hi all, Finally found the solution after diigging a bit deeper into the bluez-alsa documentation (and will update the guide soon). Since version 4.0.0 all additional codecs other than SBC and (if installed) AAC are inactive by default. They need to be activated in the config file of the bluealsa service first. You can see this by comparing the result of Code: bluealsa-cli status with Code: bluealsa --help The first command shows which codecs are activated (SBC, AAC only) while the second one shows all codecs with which the package has been built (last lines of the respective outputs). To activate aptX, aptX-HD and LDAC you additionally have to change the file /etc/systemd/system/bluealsa.service Code: sudo nano /etc/systemd/system/bluealsa.service and change the line Code: ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink to Code: ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink -c aptx -c aptx-hd -c ldac After rebooting, "bluealsa-cli status" finally shows Code: Service: org.bluealsa and my Sony Xperia connects with aptx-HD again. Unfortunately the file /etc/systemd/system/bluealsa.service belongs to the moode-player package and will be overwritten with each update of Moode - so this last step needs to repeated after each in-place update. Best regards Jens RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - jenzd - 05-25-2023 (05-25-2023, 04:11 PM)TheOldPresbyope Wrote: Huh. I'm surprised I don't recall libopenaptx. In any case, since I have neither aptX nor aptX-HD senders available, the issue is moot for me. openaptx by Arkq is actually an alternative to libopenaptx (https://github.com/pali/libopenaptx). Prior to verion 3.1.0 of bluez-alsa only openaptx was supported (and would have to be built from source). Version 3.1.0 introduced the switch "--with-libopenaptx" to use libopenaptx instead. A binary version of libopenaptx is available from the normal Raspberry Pi OS repositoriy (package libopenaptx0). Best regards Jens RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - jenzd - 05-25-2023 There is even an (experimental) implementation of an LDAC decoder which iis supported by bluealsa as an LDAC sink (https://github.com/anonymix007/libldacdec). see also the bluealsa issue https://github.com/arkq/bluez-alsa/issues/482. Cheers, Jens RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - Tim Curtis - 05-25-2023 We could include libopenaptx and the systemd config in the bluez-alsa package shipped with moOde but according to Qualcomm only encoding is free open source and that decode is still proproetary. @jenzd it's very confusing to me since you mentioned "Support for aptX and aptX-HD via libopenaptx (both for playback and receive)". RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - jenzd - 05-26-2023 (05-25-2023, 09:07 PM)Tim Curtis Wrote: @jenzd it's very confusing to me since you mentioned "Support for aptX and aptX-HD via libopenaptx (both for playback and receive)". The libopenaptx liibrary which is included in Raspberry Pi OS (seems to be a standard debian package) is apparently capable of both. So I guess it should be ok to just link against it? The situation seems to be different for LDAC, where only the encoder is freely avaiable as a binary package. Regards Jens RE: Moode 8: Add bluetooth codec support for AAC, aptX & aptX-HD to bluez-alsa package - Tim Curtis - 05-26-2023 (05-26-2023, 06:41 AM)jenzd Wrote:(05-25-2023, 09:07 PM)Tim Curtis Wrote: @jenzd it's very confusing to me since you mentioned "Support for aptX and aptX-HD via libopenaptx (both for playback and receive)". Right, it was picked up by Debian and thus also by downstream RaspiOS so it would appear that it's ok to distribute :-) Have you tested that receive works i.e., by connecting client to moOde and verifying that aptX codec is being used by bluez-alsa? |