Audio and input support in KBluetooth :)

Finally, the most wanted feature has landed in KBluetooth, support for Audio!

The support is divided in 4 blocks:

  1. Pair the device
    The support for pair the devices should be working, not only for HEADSETS but for everything.
  2. Connect to the service
    KBluetooth will detect if the paired device has audio service, and connect to it.
  3. Support for PulseAudio
    PulseAudio rocks, and since it rocks it will detect and configure the new device automagically :)
  4. Support for Alsa
    Alsa is not automagical like PulseAudio, so we’ve to write a few things in a file to get it working.

Everything is done by KBluetooth but Alsa support, so I’ll explain how to get it working manually.

1-Pair it using kbluetooth-wizard (be sure that you’re using kbluetooth-wizard an not kbluetooth-inputwizard)

2-Launch kbluetooth-devicemanager, click in your headset and write somewhere the Address (XX:XX:XX:XX:XX:XX)

3-Open with your favorite editor the file ~/.asoundrc (located in your home) and add:

pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
profile "auto"

4-If you want use it with Phonon, try the following configuration (is not working totally but something is something :))

pcm.softvol {
type softvol
slave {
pcm "bluetooth"

control {
name "SoftMaster"
card 0
hint {
show on
description "BlueTooth Headset"
pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
profile "auto"

With this, a Bluetooth device should appear in KDE-Multimedia configuration, but as I said is not full working (If I recall correctly the output was working perfectly but not the input).

As always, the corresponding video:
Download video


Powered by Blogilo

  • FloPe


    when can i download and test it? And where? kde-apps?

  • apol


  • Dennis

    That’s great news. Though I wonder about the need to manually note the device address. Blueman-1.21 is able to figure that out on its own. Perhaps a look-see at how they do it would eliminate the need.

    • afiestas

      I guess they write the file I describe in the post, I’ll do more research anyway.

  • Phobeus

    Sounds great and would mean one gtk-applet less. Thanks for your work!

  • jospoortvliet

    Would automagic integration in Phonon be so hard? I’m wondering cuz I don’t want to install pulse audio and have to deal with all the crazy stuff I see people complain about all over the web – audio works perfectly for me as it is…

    • afiestas

      Yes, because of phonon bug(s) (workspace part, not the lib itself)

  • Framp

    I’ve just installed pulseaudio to try this but – after having managed to install pulseaudio correctly – I can’t get my paired headset to work

    It doesn’t record or play audio at all.

    By the way, thank you for working on this – KDE needs absolutely the ability to pair easily a bt headset!

    • afiestas

      You need at least KDE 4.4, and KBluetooth from the svn. What devices are in KDE-Multimedia systemsettings? can you give me more details? thanks!

      • Jack

        csolisHi Clemej,Going through the same tgthuhos. I just installed xubuntu and so far I am enjoying it. The theme available in the iso is far better than the one available in tha basic install from repositories. I can use my netbook again, no more swap to disk.

  • Dennis

    I tend to agree with you. Even with the latest bluez (4.62) and pulseaudio (0.9.21) and blueman; its still not a smooth ride. I think and I am not phonon expert, the fewer layers the better. I’m sure lots of people have rave things to say about pulseaudio but my experiences with it coupled with bluetooth and kde-4.4.1 does not fit in that category.

  • Dennis


    If I might ask, what version of bluez are you using and how do you have it configured?

  • Framp

    Yes, I’ve installed Kbluetooth from the svn and I have a device called bluetooth (It shows up also in skype for example)
    but it doesn’t play the testing sound from the multimedia settings tab and doesn’t work at all with skype.
    It’s a Treo headset and works fine on my phone and on windows.

    The device is in the Device manager – it simply doesn’t work.
    Ah, and I don’t see extra channel on kmix, unfortunately.
    I’ve tried with gstreamer and with xine backends (and yes I’ve installed the required libs for pulseaudio)
    I’m using Arch Linux by the way.

    Now I’ve removed temporarily pulseaudio and tried to configure the headset with alsa but without success.
    As expected, I’ve a device called Bluetooth headset but I can’t select it: it’s greyed out.
    On skype I’ve a new device called softvol but, if selected, uses the pc speakers.
    No entries in kmixer too

    Thanks again for your time :)

  • Nick

    After some tinkering, I have my headset working using PA and the Gentoo kbluetooth-9999 ebuild from the KDE overlay. My mic even works in Mumble and Skype, which is awesome!

    My only issue is that I was not previously using PA, and since installing it, Phonon no longer sees my regular sound card. I can’t get KDE to output sound to my speakers now. Any ideas?

    Thanks for your hard work on this…I’ll keep playing and see what else I can break. ;)

    • afiestas

      Try to use Trunk 4.5 (the beta is alrady tagged iirc), that version comes with poulseaudio integration.

  • zayed

    Thanks for your effort. as Phobeus said “one gtk-applet less. ” I would like to suggest to review the wizard thing in configuration the devices. I feel it is not necessary. You can put the configuration in one windows.

  • Vladimir Prus

    These are great news — I am surely looking forward towards smooth Bluetooth headset support.

    May I ask a few technical questions, based on the svn head state of kbluetooth:
    1. Am I right that OrgBluezAudioInterface::Connect is only called when you pair the device for the first time, and not when the device connects thereafter?
    2. If so, is this a problem? And what does that Connect call actually does? Bluez source code looks like it’s establishing AVDTP session, whatever that might be, so presumably this must be called each time a headset becomes available. On the other hand, my current manual setup appears to work without that method ever called, at least as far as dbus-monitor can tell.
    3. What magic makes the device available to pulse? All instruction I saw involve manually adding pulse sink for the new device. Is KBluetooth doing it somehow?


    • afiestas

      1: Yes, then bluez will remain the settings and use the agent to give access to your device (in case that the device is not trusted)
      2: Nope, Bluez is going to handle everything for us.
      3: A Google summer of code done the last year :p, I don’t really know what black magic is done there.

  • christian

    is there any plan to support the opposite headset profile (for using pc as an handsfree device for a bluetooth phone)? cfr.

    • afiestas

      Step by step, but yes maybe for kde 4.6 we’ll be able to support that.

  • james

    what is the address to the svn? Spent so much time trying to install, and then became disappointed it was old

    • afiestas

      It is the correct url

  • Pingback: | Strona główna | Konqiklub()