HOWTO: Play audio on soundcard & bluetooth speaker simultaneously

keywords: howto play audio soundcard bluetooth speakers same time a2dp simultaneously multi-room

Summary

The purpose of this howto is to describe how you can set-up your computer to route all sound played to the soundcard’s wired speakers as well stream the sound to a pair of bluetooth speakers simultaneously. Note. I’ve updated it to work with Karmic. Can’t be followed on pre-9.10 releases.

By placing the bluetooth speaker in another room, the computer can act as a central hub to play music wirelessly in many rooms, as well as locally in the same room.

Steps

1) Pair bluetooth speakers with computer and test A2DP.

Right-click on Bluetooth icon in top panel and ‘Setup New Device’. Follow the steps to pair the computer with your speaker.

Left-click on the icon, go to Devices and make sure that you’re connected to the audio device.

Right-click on the volume-control icon in the top panel, go to ‘Sound Preferences’ and then the ‘Output’ tab. You should see your bluetooth speaker as an output device. Select it and play something, and it should play through your speakers.

2) Combine soundcard sink and bluetooth sink into one sink so that PulseAudio sends audio stream to both simultaneously.

First we need to find what the sink name of our soundcard is. This can be done by typing the following in the terminal:

pacmd list-sinks

You should get a list of all available sinks. You should see your soundcard sink and the bluetooth sink that streams to your speakers. Then we need to combine them into a virtual sink by running the following replacing the sink names passed to the ‘slaves’ parameters with the sink names pacmd returned:

pactl load-module module-combine sink_name=combined slaves=alsa_output.pci_8086_24c5_sound_card_0_alsa_playback_0,bluez_sink.00_0D_3C_A0_C0_45

4) Test combined sinks. To do this, first install pavucontrol:

sudo apt-get install pavucontrol

Then play something in totem, run pavucontrol, right-click on the playing stream, and select the output device to be the combined sink.

5) Have PulseAudio load new set-up at start-up by default.

[to be written]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: