GithubHelp home page GithubHelp logo

Comments (8)

borine avatar borine commented on June 16, 2024

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.

Vinchethescript avatar Vinchethescript commented on June 16, 2024

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.

borine avatar borine commented on June 16, 2024

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.

Vinchethescript avatar Vinchethescript commented on June 16, 2024

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.

borine avatar borine commented on June 16, 2024

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.

Vinchethescript avatar Vinchethescript commented on June 16, 2024

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.

borine avatar borine commented on June 16, 2024

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.

Vinchethescript avatar Vinchethescript commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.