Comments (8)
I am intrigued by this. I've always found Pipewire Bluetooth support to be very good, and never imagined anyone would want to use BlueALSA on the same system. Anyway, your main problem here (there may be others, as this setup has never been tried before AFAIK) is with Wireplumber.
of pavucontrol, PipeWire does receive audio data
So you have not told Pipewire what to do with that audio stream. In a default install with Pipewire's internal bluetooth, then the default Wireplumber config sets up a loop from bluetooth source to default (speaker) sink. I think you will have to find a way to configure Wireplumber so that it does something similar when a new ALSA module source appears.
from bluez-alsa.
I've always found Pipewire Bluetooth support to be very good, and never imagined anyone would want to use BlueALSA on the same system.
I am trying to use BlueALSA on PipeWire because, AFAIK, it does not support decoding LDAC, and because I am more familiar with BlueALSA anyway.
So you have not told Pipewire what to do with that audio stream. In a default install with Pipewire's internal bluetooth, then the default Wireplumber config sets up a loop from bluetooth source to default (speaker) sink. I think you will have to find a way to configure Wireplumber so that it does something similar when a new ALSA module source appears.
I see. I'm trying to configure WirePlumber for that right now, but I can't seem to get it working at the moment.
from bluez-alsa.
but I can't seem to get it working at the moment.
As noted in the wiki, the Pulseaudio module-loopback does not work with the bluealsa plugin as a module-alsa-source. Perhaps the Pipewire equivalent (whatever that is, I'm not a Pipewire expert) has similar difficulties. I happen to be looking into ways that the bluealsa plugin can be made to behave more like a hw
ALSA device, especially for ALSA capture, but that work is likely to take several more months before it comes to anything useable,
In the meantime, if the Pipewire loopback cannot be made to work, then you will have to consider some other way of transferring the incoming stream to an output device. bluealsa-aplay
may well be the best option for that.
from bluez-alsa.
but I can't seem to get it working at the moment.
As noted in the wiki, the Pulseaudio module-loopback does not work with the bluealsa plugin as a module-alsa-source. Perhaps the Pipewire equivalent (whatever that is, I'm not a Pipewire expert) has similar difficulties. I happen to be looking into ways that the bluealsa plugin can be made to behave more like a
hw
ALSA device, especially for ALSA capture, but that work is likely to take several more months before it comes to anything useable,
Yes, PipeWire presents the same issues as PulseAudio. I tried using both module-loopback
from pactl
and pw-loopback
, and both returned the same result.
In the meantime, if the Pipewire loopback cannot be made to work, then you will have to consider some other way of transferring the incoming stream to an output device.
bluealsa-aplay
may well be the best option for that.
I see. For now I am going to disable PipeWire and enable bluealsa-aplay
, until this is resolved.
from bluez-alsa.
I've updated the wiki page with some notes on using pulse's module-loopback with BlueALSA sources, and also mentioned using bluealsa-aplay as an alternative. The bash script has been updated to include an option to automatically load module-loopback.
@Vinchethescript Does that description match what you did with load-module module-loopback
?
What result did you get when using that module with Pipewire?
Now that you have demonstrated that the pulse load-module module-alsa-source
command works with Pipewire, I would like to extend the wiki article to include what you have learned. Please could you tell:
- how did you disable Pipewire's internal Bluetooth support?
- did you need to modify the bash script in any way, or perform any additional manual configuration?
- did you try using
bluealsa-aplay --pcm=pipewire
instead of loading the alsa-module-source module?
Any other useful information that you can provide, including links to references to may have used, would be helpful.
I plan to upgrade my laptop to Ubuntu 24.04 later this year, so will lose my last pulseaudio installation, and will then investigate more the co-existence of BlueALSA and Pipewire.
from bluez-alsa.
I've updated the wiki page with some notes on using pulse's module-loopback with BlueALSA sources, and also mentioned using bluealsa-aplay as an alternative. The bash script has been updated to include an option to automatically load module-loopback.
I tried to use that script even with the loopback, but it just exits with a syntax error because s32le
is not present into sample_size
.
@Vinchethescript Does that description match what you did with
load-module module-loopback
? What result did you get when using that module with Pipewire?
I got the same results as running it into PulseAudio.
how did you disable Pipewire's internal Bluetooth support?
I had to recompile PipeWire from scratch using the guide available on their repository. Before effectively building it, though, you have to run this command to disable all the Bluetooth functionalities:
meson configure builddir \
-Dprefix=/usr \
-Dbluez5=disabled \
-Dbluez5-backend-hfp-native=disabled \
-Dbluez5-backend-hsp-native=disabled \
-Dbluez5-backend-hsphfpd=disabled \
-Dbluez5-backend-native-mm=disabled \
-Dbluez5-backend-ofono=disabled \
-Dbluez5-codec-aac=disabled \
-Dbluez5-codec-aptx=disabled \
-Dbluez5-codec-lc3=disabled \
-Dbluez5-codec-lc3plus=disabled \
-Dbluez5-codec-ldac=disabled \
-Dbluez5-codec-opus=disabled
Also, note that I built PipeWire version 0.3.85, as 0.3.65 (which is the available version on APT on Raspberry Pi OS Bookworm) does not support module-alsa-source
and module-alsa-sink
.
- did you need to modify the bash script in any way, or perform any additional manual configuration?
No, I did not do any manual configuration and I did not edit the bluepulse
bash script.
- did you try using
bluealsa-aplay --pcm=pipewire
instead of loading the alsa-module-source module?
I just tried it, and it does show up on pavucontrol
this time, meaning the audio passes through PipeWire, and there is sound on the speakers! I noticed, though, that there's more latency when audio is playing through PipeWire, while there's less latency when using ALSA directly, which I think is sort of normal.
Also, that command does not work as root (tested through the bluealsa-aplay
service), which I think is normal because PipeWire is running as user and not as root.
from bluez-alsa.
Thanks, that is all very helpful. Given that recompilation of pipewire is required, I think that this all too much to be added on to the existing pulseaudio wiki page. Would you agree that co-existence of Pipewire and BlueALSA is just not worth the effort?
s32le is not present into sample_size
oops! I'll upload a new version with that corrected ASAP.
from bluez-alsa.
Would you agree that co-existence of Pipewire and BlueALSA is just not worth the effort?
I think it depends on which codec someone needs, unless PipeWire supports decoding and playing high quality codecs such as LDAC. AFAIK, PipeWire doesn't support it, which is why I've been trying to use BlueALSA on PipeWire (I used a different library to compile BlueALSA with LDAC support, which includes decoding).
from bluez-alsa.
Related Issues (20)
- Potential server lockup in PCM drain HOT 2
- Sink producing no audio with aptX codec HOT 2
- allow build with different dbus name HOT 2
- Bluealsa with Google Pixel 8 Android Version 14 (Call sounds like a robot) HOT 9
- Fedora includes a fork of libopenaptx, libfreeaptx HOT 1
- Occasional crashes when streaming from iPhone to bluealsa HOT 10
- Buttons not working during callback recording HOT 2
- build/install: LC3Plus libraries?? HOT 2
- HSP HS profile: "arecord -d" duration is ignored HOT 1
- Routing audio to bluealsa from hw:0,1 HOT 31
- Test all deps with pkgconfig HOT 10
- arecord Unable to install hw params, record from bluetooth failed HOT 3
- Error compiling with aptx HOT 1
- Audio cut off in the beginning of the file HOT 3
- how can an SCO link be reestablished after it has been disconnected by the HF device? HOT 2
- How to pipe bluealsa PCM to fifo? HOT 18
- aplay Unable to install hw params HOT 1
- Can't get the A2DP profile to use LDAC codec HOT 11
- LDAC shows only 96KHz as sample rate | support for other sampling rates HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluez-alsa.