Illegitimi non carborundum


Configuring card profiles in PulseAudio

The upcoming 0.9.15 release of PulseAudio will support "card profiles". What in the name of Almighty Bob (where Bob is a deity of questionable existence) is a card profile I hear you all cry. Well in our world of cost savings the majority of sound cards can operating in different but mutually exclusive configurations. For example some devices are capable of outputting 5.1 surround sound, but to do this they use the same jacks as are normally used for sound input, so you cannot record sound from the device when it is playing 5.1 sound.

As expected, information concerning what these capabilities are and under what situation they can be used simultaneously is not supplied to us by the ALSA layer. So to get around this problem,PulseAudio will probe for various configurations for you and provide a handy list which will allow for easy configuration. Sadly there is no GUI to control this. Or rather there was no GUI....

So I had a little hack around today with pavucontrol to add the capability to query and set the card profiles. Here is a small screenshot of it in action:

Changing card profiles in pavucontrol

Sadly there is a small bug right now in pavucontrol in that it produces a protocol error when you change your profiles. This happened before my tweaks so I know it's not my fault. Sadly this means pavucontrol will exit when you change profiles, which is a pain and I'm not quite sure what I need to do to fix it, but time will tell.

So hopefully people wanting to use SP/DIF or 5.1 configurations etc will now be able to do so with ease!

Until these changes are merged upstream, you can grab my patches from my git repositories.

Happy listening.

Share and Enjoy:
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Slashdot
  • This is awesome stuff!

  • Andrei Nistor

    Hi, my laptop has two profiles for output: HDMI and Analog, is there any way to set it up to switch to HDMI when plugging it to my TV, and back to Analog when I unplug it? I’m using KDE and it’s a pain to go through phonon every time.

    • Colin

      Sorry for the late reply. Right now, it’s not totally trivial, but it is possible. There is a module called “switch on port available” which I think will do what you want. Longer term, I plan to list the ports, rather than the “sinks” or “sources” in the priority lists in Phonon configuration so that this additional module isn’t needed and you just set the priority as you would expect.