Jack Output over Bluetooth?
Moderators: MattKingUSA, khz
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Jack Output over Bluetooth?
Hi all, I got a new notebook yesterday from linux-onlineshop.de: 16 GB RAM, 500 GB SSD, digital audio (via HDMI, not yet tried), Core i5 CPU and ... Bluetooth.
I installed it today and I wonder if I could route Jack's output via Bluetooth to my Bluetooth adapter that's connected to my HiFi-amplifier.
I saw that Pulseaudio has some Bluetooth support. Pulse can output to Jack, but AFAIK Jack can't output to Pulse.
Any ideas?
I installed it today and I wonder if I could route Jack's output via Bluetooth to my Bluetooth adapter that's connected to my HiFi-amplifier.
I saw that Pulseaudio has some Bluetooth support. Pulse can output to Jack, but AFAIK Jack can't output to Pulse.
Any ideas?
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Re: Jack Output over Bluetooth?
I am afraid, no. I was halfway there.AndreeeCZ wrote:Is bluetooth even fast enough for this?
1.) Bought Philips bluetooth adapter and connected it to my HiFi amp
2.) Paired the device using Blueman applet in xfce4
3.) Used the following .asoundrc
pcm.btphilips {
type plug
slave {
pcm {
type bluetooth
device "00:1D:DF:E4:59:B6"
profile "auto"
}
}
hint {
show on
description "Philips Bluetooth Adapter"
}
}
4.) Played a song with Clementine, ALSA-output to device btphilips. Sounded ok, but not perfect. There was no distortion but the high frequencies were a bit damped. Maybe that can be tuned in the A2DP protocol or equalized.
5.) Started alsa_out. It keept crashing until I used the same buffersize like my jackd (-p 256)
6.) Now the shit begins. I can connect alsa_out in Qjackctl to Qtractor or Clementine with jack output, but the sound was totally distorted.
Bad luck.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Re: Jack Output over Bluetooth?
I found another tool, zita-j2a. But unfortunately this tool doesn't work with my bluetooth device:
hm@wolke:~$ zita-j2a -v -p 128 -c 2 -d btphilips
Alsa_pcmi: detected more than 1024 playback channnels, reset to 2.
Alsa_pcmi: can't set playback period size to 128.
Can't open ALSA playback device 'btphilips'.
Now I'm stuck.
hm@wolke:~$ zita-j2a -v -p 128 -c 2 -d btphilips
Alsa_pcmi: detected more than 1024 playback channnels, reset to 2.
Alsa_pcmi: can't set playback period size to 128.
Can't open ALSA playback device 'btphilips'.
Now I'm stuck.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
Re: Jack Output over Bluetooth?
I'm not sure there enough bandwidth for high quality audio. isn't it only 1mbps connection.
I used to have a Bluetooth headset for my phone and the sound quality was awfully. all midrange no highs.
unless It's improved since tgen
I used to have a Bluetooth headset for my phone and the sound quality was awfully. all midrange no highs.
unless It's improved since tgen
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Re: Jack Output over Bluetooth?
Sound quality is good enough to do some arrangements and record midi tracks. The Philips Bluetooth adapter has no audible distortion. The very high frequencies are a bit weak. With an ALSA-client it sounds ok. I wouldn't do the final mix with it, though.bazsound wrote:I'm not sure there enough bandwidth for high quality audio. isn't it only 1mbps connection.
I used to have a Bluetooth headset for my phone and the sound quality was awfully. all midrange no highs.
unless It's improved since tgen
My next approach is using the Bluetooth device as the sole device für jackd. So I subscribed to the jack-dev mailing list and hope to find a working solution with their help.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
-
- Established Member
- Posts: 3
- Joined: Sat Aug 15, 2015 5:01 am
Re: Jack Output over Bluetooth?
This is working great for me thanks to the info posted. I was getting a lot of clipping distortion so I set my period size to -p 6144 for the heck of it and now the sound is coming clean from my hometheater bluetooth. Note my purpose was just to play around with playing music in audacious with funky effects by Calf plugins, and oh it served its purpose!
I didn't know about alsa_out, that is really cool.
I didn't know about alsa_out, that is really cool.
-
- Established Member
- Posts: 3
- Joined: Sat Aug 15, 2015 5:01 am
Re: Jack Output over Bluetooth?
This works great for me to play some music over my home theater with some funky effects by Calf. I was getting distortion from low periods, but this command worked wonderfully:
Code: Select all
alsa_out -d btonkyo -p 6144
-
- Established Member
- Posts: 3
- Joined: Sat Aug 15, 2015 5:01 am
Re: Jack Output over Bluetooth?
This works great for me to play some music over my home theater with some funky effects by Calf. I was getting distortion from low periods, but this command worked wonderfully:
Code: Select all
alsa_out -d btonkyo -p 6144
-
- Established Member
- Posts: 5
- Joined: Thu Sep 26, 2019 11:38 pm
Re: Jack Output over Bluetooth?
Quite new post relative to others and my solution applies much more generally to any already-connected-to-pulseaudio bluetooth device
Finally figured out how to make it work (since the pulseaudio-jack bridge never seemed to output to the bluetooth headset even when other pulseaudio stuff was working fine over BT)
Make sure your bluetooth is functioning with pulseaudio (for some reason each time I startup my computer I have to do pactl load-module module-bluetooth-discover and after that it lets me connect to bluetooth))
then use:
Not sure why the pulseaudio bridge doesn't work directly but with alsa_out it's fine! Slight delay of course over bluetooth
UPDATE: When I tried again after sleeping the computer, I was getting errors with alsa_out but it worked after I restarted pulseaudio
Can anyone duplicate this?
Finally figured out how to make it work (since the pulseaudio-jack bridge never seemed to output to the bluetooth headset even when other pulseaudio stuff was working fine over BT)
Make sure your bluetooth is functioning with pulseaudio (for some reason each time I startup my computer I have to do pactl load-module module-bluetooth-discover and after that it lets me connect to bluetooth))
then use:
and route the jack audio ports to the newly created alsa out ports via your favorite jack-connections manager (mine is catia for simplicity). Voila!alsa_out -d pulse
Not sure why the pulseaudio bridge doesn't work directly but with alsa_out it's fine! Slight delay of course over bluetooth
UPDATE: When I tried again after sleeping the computer, I was getting errors with alsa_out but it worked after I restarted pulseaudio
Can anyone duplicate this?
-
- Established Member
- Posts: 5
- Joined: Mon Dec 26, 2016 8:37 pm
- Has thanked: 1 time
Re: Jack Output over Bluetooth?
I had hoped your solution would help me with my problem but unfortunately I can't get it to work.
I have successfully got my bluetooth working with jack sink ( using Cadence ) with one exception - I cannot get any of my MIDI programs (Rosegarden, Frescobaldi) to work via bluetooth.
This sounds similar to your problems :-
I have successfully got my bluetooth working with jack sink ( using Cadence ) with one exception - I cannot get any of my MIDI programs (Rosegarden, Frescobaldi) to work via bluetooth.
This sounds similar to your problems :-
but when I put in alsa_out -d pulse I just get error messages:Finally figured out how to make it work (since the pulseaudio-jack bridge never seemed to output to the bluetooth headset even when other pulseaudio stuff was working fine over BT)
Any suggestions?Cannot lock down 82280346 byte memory area (Cannot allocate memory)
WARNING: period size does not match: (requested 1024, got 682)
Segmentation fault (core dumped)
Re: Jack Output over Bluetooth?
I am in the same situation as UncleOilybag:
I would love to get this working since my only earbuds are wireless :/$ alsa_out -d pulse
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
WARNING: period size does not match: (requested 1024, got 682)
Segmentation fault (core dumped)