marvin.im

Raspbmc and BOSE Companion 5 or other USB Soundcards

Good morning

Today I’ll post you my experiences with Rasberry Pi, XBMC and my BOSE Companion 5 System.
Note: This Guide works also with other USB-Soundcard Devices!

Unfortunatly it didn’t run out of box. Okay to be honest, it did run under my openelec - but then it stopped working without a reason. This may be fixed at this time. You can try it. Especially with this new informations you gain on this Guide.

After that I’ve stwiched to Raspbmc here it runs like a charm, but you have to enable some things.

Get it running

To get it running, first you need is to install the alsa-utils

sudo apt-get update && sudo apt-get install -y alsa-utils

Now you can check if you’re able to see your Devices

aplay -l

And you should get something like this in return

**** List of PLAYBACK Hardware Devices ****
card 1: U0x41e0x30d3 [USB Device 0x41e:0x30d3], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As you can see, there is now a USB Audio Device registered at device 0 (the default audio device)

Now we need to tell XBMC to use this Device, so we add something to the advancedsettings.xml.
You might wanna use you’re favorite Editor (maybe vim must be installed first)

vim .xbmc/userdata/advancedsettings.xml

And add the following, to tell XBMC not to use OpenMAX (which is the default Video Player on RPi) instead it should use dvdplayer (the normal default Player)

<advancedsettings>
  <video>
    <defaultplayer>dvdplayer</defaultplayer>
    <defaultdvdplayer>dvdplayer</defaultdvdplayer>
  </video>
</advancedsettings>

Now you can configure in your XBMC System Audio Settings to use the new ALSA Device 0 as default Audio. Just play around with the other Settings. I didn’t enable Passthru.
Switch to Expert Mode in your XBMC Settings to see all available options

Here’s a Screenshot of my Settings:

TODO add image

Why is it such a Trouble to get XBMC on RPi running with USB Audio?

XBMC for RPi is a special branch of the XBMC source code. On RPi it uses OpenMAX as a Video Player because of the Hardware Acceleration of Video encoding. OpenMAX did not support ALSA and just HDMI and the Analog Audio. It was made for RPi so it just needed to support these two features. I think later they added support for HiFi Berry.

It might seem, that you disable your Hardware acceleration. But if you don’t change any Hardware decoding Settings and just add the video settings to your advancedsettings.xml everthing works normal. I’m totally Happy.

You can also use AirPlay ;)

Have Fun