Sending my Jack sesson out of a bluetooth headset?

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Post Reply
djbon2112
Established Member
Posts: 3
Joined: Tue May 05, 2015 2:57 am

Sending my Jack sesson out of a bluetooth headset?

Post by djbon2112 »

Hey everyone, new member here, so apologies if this is the wrong forum. I've been trying for ages to get my music composition and recording going on Linux; after I switched full-time in 2013 I just kinda stopped doing anything, since Sibelius was by bread and butter for composing and MIDI editing, and I've never been able to get that working well in Wine.

Well, this week I finally managed to get a complete Jack setup that allows me to do everything I want while I'm doing my recording/composing, including Rosegarden for the actual heavy lifting (I love it!) The problem is, this is all on my laptop, and sometimes I go on the road with it and don't care about all the Jack setup: I just want to connect by Bluetooth headphones to the laptop and use those for e.g. video playback, just like I did before I set up the whole Jack daemon.

To get Jack running I'm using a custom .asoundrc file (under Debian Jesse) but of course trying to add the one snippit I found for bluetooth output doesn't seem to actually do anything (see the code below).

Anyone have any advice on getting this working? Ideally I'd like a single button: Jack mode, or Pulseaudio mode, for output. I'm a Linux sysadmin so if I needed to I could probably write some monstrous hacky script to do it all for me, but surely someone else has had this thought and has a [GUI] method to do this kind of switch simply?

Thanks for reading!

Code: Select all

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

pcm.btphilips {
        type plug
        slave {
                pcm {
                        type bluetooth
                        device "00:1E:7C:XX:XX:XX"
                        profile "auto"
                }
        }
        hint {
                show on
                description "Philips Bluetooth Headphones"
        }
}
Edit 1: Immediately after posting I had the thought that I could create a dedicated user for the Music stuff. Not as seamless as a button but it might just work for me. However I'm still open to just about any help you guys can provide!
tatch
Established Member
Posts: 662
Joined: Fri Nov 16, 2012 3:18 pm

Re: Sending my Jack sesson out of a bluetooth headset?

Post by tatch »

you could take a look at cadence in the kxstudio repositories, that's how I use jack and pulseaudio. When I start jack pulseaudio still runs but via a bridge, and when I quit jack pulseaudio automatically switches back to the ALSA sink/source.
djbon2112
Established Member
Posts: 3
Joined: Tue May 05, 2015 2:57 am

Re: Sending my Jack sesson out of a bluetooth headset?

Post by djbon2112 »

Interesting, I'm using Cadence as well and for some reason when I stop the Jack daemon PulseAudio doesn't start back normally; it just gets stuck outputting to a "Dummy Output". Mind sharing your .asoundrc or any tweaks you've made to the default setup? This would actually be my ideal, PA all the time but Jack started when I need it.
djbon2112
Established Member
Posts: 3
Joined: Tue May 05, 2015 2:57 am

Re: Sending my Jack sesson out of a bluetooth headset?

Post by djbon2112 »

I ended up finding the solution I needed was actually the defaults, and now everything works how I want!

The .asoundrc file I was using was part of a generic guide on setting up Jack, and as mentioned it wasn't allowing my headset to connect.

I ended up getting rid of that, and using Cadence's built-in bridge profiles. Once I did, I was able to connect my Bluetooth headsets as an a2dp-sink and Pulseaudio handles switching: either I'm sending PA to Jack, or to the headphones, just how I want it!
belamat
Posts: 2
Joined: Thu Jan 05, 2017 9:04 am

Re: Sending my Jack sesson out of a bluetooth headset?

Post by belamat »

Hello djbon2112 could you tell me how to do the link/bridge from Cadence to get the bluetooth output available?

" I was able to connect my Bluetooth headsets as an a2dp-sink" How can I do this?

Does the Cadence/jack needs to be stopped to achieve this?
Post Reply