Illegitimi non carborundum


Mix it some more

OK, so this is really just an update on my earlier post about KMix PulseAudio integration.

I've spent quite a lot of time refining the initial support I added a few weeks back. What follows is a brief summary of the changes/improvements/bugfixes.

Firstly, some of the tabs (namely "Capture Streams" were not shown unless an application was actively capturing while kmix started... somewhat unlikely really :p This is now fixed.

Then there was a problem with Profiles. These would be created automatically when you went to the "Configure Channels..." dialog. There were actually several problems relating to profiles which ultimately lead to controls going AWOL - with no way in the GUI to see them even if the backend itself was actually aware of their presence. The concept of GUIProfiles does not really tie in too well with the concept of "Dynamic Mixers" (where controls come and go), but I think I've managed to get it all working nicely now.

And finally we come to something I said I wasn't going to do. In my last post I explained that moving streams to different devices was something best left to the System Settings -> Multimedia dialog. Lots of people commented on that post saying that individual stream moving is still needed. Well, not wanting to disappoint the public, I have now added relevant patches to enable this in KMix. The UI is not ideal yet, but you can access it via the context menu of Playback and Capture streams by right clicking on the sliders and selecting an option from the "Move" submenu.

There were several other small cosmetic fixes (like using the right icons for devices/applications in the GUI) too and a really annoying race condition due to a singleton class taking too long to start up that got fixed too.

All in all I'm rather pleased with the outcome for now. It's not perfect by any means (if the PA server dies there is not much feedback), but it's certainly a good start. Failing any massive problems with the build I've just submitted to Mandriva Cooker, I'll sync this to subversion trunk for everyone else to play with.

I had to make more changes to the core of kmix than I originally intended. I've tried to ensure I always remain backwards compatible but some subtle differences in profile loading certainly exists. I'm not sure if these are avoidable (I don't think so) so this may be a sticking point... time will tell.

Have fun

Share and Enjoy:
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Slashdot
  • JR

    Great work. :3

  • klaus


  • Compiled it for lucid from your git pulse branch, packages made (right now just for my PPA), works like a charm with 4.4 rc1.

    One little wish. The gnome mixer has the option to overload the sound level (above 100%), can you implement this for kmix too? its very valuable when you have some shitty headphones 🙂

    Also i couldnt find the advanced options gnome has (like the capture stuff anywhere, not implemented yet)?

    anyway, its a great work you are doing.. keep it up, me and i believe a lot of other ppl are behind you 110% 🙂

    best regards

    • Colin

      Not sure what you mean about the “capture stuff” but I presume you mean the “Ports” system (the ability to change port for a given sink or source if the device supports it?). If so then yes, this is not implemented yet. I may implement it, but the GUI in kmix makes this difficult for now…. I could use the Enums structure but I think the end GUI will be pretty ugly :s It may have to wait until after the GUI is reworked.

      As for the overload %age thing, This is easily doable, but I want to make sure I mark the volume sliders appropriately with a mark or different colour etc. when it’s above 100%. Ideally I’d like to have kmix+pavucontol+gnome-volume-control all agree on the maximum volume shown so that there is some degree of sanity :p

      All in time 🙂

    • Ryan

      Your packages are a little out of date compared to the current ones in Lucid, so I pulled the patch from your PPA[1] and applied it to the latest source[2]. I’m compiling it now, and then I will install it and reboot to make sure all the new components are in place. I’ll report back here whether it works.

      [2] apt-src install kdemultimedia

      • Ryan

        Works like a charm!

        • Ryan

          Actually, it’s not quite perfect. KMix doesn’t provide a way to switch input/output configurations. For example, my laptop has internal speakers as well as an HDMI output, and Pulseaudio supports both. I can use pavucontrol to switch between these configurations, but not KMix. Furthermore, KMix crashes every time I switch configurations in this way.

          Still, great work, and thank you!

          • Colin

            I’ve got work waiting to add this configuration switching capabilities. It’s not part of kmix (as I don’t think this is actually the right place to put this), but a new GUI next to the device/category selection in System Settings. Once KDE trunk is open to commits I’ll sent it out to the world and blog about it a bit.

  • jbernardo

    One doubt I got from your previous article, if someone now still wants to use kmix without pulseaudio the only way will be to launch it from the command line passing a env string, or to export that string in .profile?

    • Colin

      Well it depends what you mean by “only way” :p If the user’s system is configured to not use PulseAudio, we detect this and the PA backend is not used. So users who don’t drink from the PA cup will not really notice any difference. For those users who do use PA, kmix will now notice this and present them with the PA version.

      I know others (e.g. Helio and Cristian) would be in favour of being able to select your preferred backend via a menu and switch at runtime etc., so longer term there will be a more user friendly way to do this.

      Take care

  • venky80

    Hi Will these changes be in kde 4.4 final?
    Also does PA make it easy to use bluetooth headset with kde?

    • Colin

      Sadly this wont make 4.4, but it will be in 4.5 and I expect distros shipping KDE 4.4 with a PA system underneath to include a patch to enable this anyway (the only real problem is some minor i18n() phrases that wont be translated).

      As for bluetooth, yes, PA is the way forward in this regard. Simply pair your device using a suitable applet and it will become automatically available (I recommend “bluetooth-applet”. I’m not 100% sure of the KDE bluetooth applet support of late as I’ve not looked – it could be fine or it could be a bit broken!) All the upstream work from bluez regarding audio is focused on PA integration which is one of the reasons I’m keen to see support in KDE improved 🙂

  • Ref

    Is it possible to integrate “Pulseaudio Equalizer” in a KMix tab? That would be great.

    • Colin

      This is likely possible in the long term, but this EQ stuff is not yet released. When it’s released and stable, then I’m sure myself or someone else will think about integrating it into KMix.