After researching a few different sources I have come up with my own flavor of solution, which I document here for future benefit of myself and others.
The first step included removing all the components of Pulse-Audio, and installing the bluez-alsa packages:
apt-get remove pulse-audio apt-get install bluez-alsathen edit the file .asoundrc:
linuxpixie@laptop:~$ cat .asoundrc pcm.bluetooth { type bluetooth device 00:02:3C:26:BA:87 # change this MAC address using the command "hcitool scan" profile "auto"} pcm.!default { type hw card 0 device 0 }Now pair your device to the laptop, using hcipair command or gnome-blue-tooth-applet or blueman-applet, what ever you use.
Now you need to tell gstreamer to use the bluetooth device as the audio sink. This is basically done with the following command:
gconftool-2 -t string -s /system/gstreamer/0.10/default/musicaudiosink \ "alsasink device=bluetooth"I modified a small script to make the switching to bluetooth sound and backward. This script lies in my ~bin/ directory.
linuxpixie@laptop:~$ cat bin/audioswitcher.sh #!/bin/bash state=`gconftool-2 --get /system/gstreamer/0.10/default/musicaudiosink | cut -d\ -f1` if [ $state == "autoaudiosink" ]; then gconftool-2 -t string -s /system/gstreamer/0.10/default/musicaudiosink \ "alsasink device=bluetooth" zenity --info --title="GStreamer" --text="Switched to bluetooth speakers" else gconftool-2 -t string -s /system/gstreamer/0.10/default/musicaudiosink "autoaudiosink" zenity --info --title="GStreamer" --text="Switched to laptop speakers" fiDon't forget to make the script executable, with:
linuxpixie@laptop:~$ chmod +x bin/audioswitcher.shNow you can just call the script use gnome-launcher, a keyboard shortcut or just using the terminal.
One Last thing. VLC is a very popular player which I use too. However, this solution does not work for VLC, since it does not use Gstreamer. So, the solution, is to edit the VLC config file found
.config/vlc/vlcrc.
[alsa] # ALSA audio output # ALSA Device Name (string) #alsa-audio-device=hw:0,0 #alsa-audio-device=default alsa-audio-device=bluetoothAs a nice bonus, if your Bluetooth adapter is ON and available, you don't need to pair it with laptop when playing with VLC. VLC will hang for about 4 second, waiting for the Bluetooth speakers to turn ON, and will pair automatically, and then the music will be played automatically through the Bluetooth speakers. If the Bluetooth devices is not found, VLC will play the music through the Laptop speakers.
UPDATE (March 2012):
Upgrading from bluez 4.96 to 4.98 broke this setup and I could not find a solution until I reported a bug on that issue. The maintainer send me a solution:
addding following into [General] section of /etc/bluetooth/audio.conf
Disable=Media Enable=SocketA more updated version of the script, can be found in my github. This Updated version is also working on mate-desktop.
40 comments:
It gives pretty good sound when all the speakers are used together, it sounds like crap if only the front left/right speakers are used.
bluetooth speakers
I have been through the web and find this here. It is pretty useful. It actually works. Thanks for sharing.
Bluetooth Speakers
What are the best bluetooth speakers for this price range?
wifi speakers
Really!!! I am very impressed after reading this blog. thanks for providing deep information for
fade alan walker
If you don’t do much talking on your mobile phone, you’re probably okay with the earbuds that came with it. And if you listen to a lot of music on that phone, with only the occasional call, you might want to consider stereo Bluetooth headphones with a microphone .But a good mono Bluetooth headset is a great accessory if you speak on the phone frequently and want the convenience of having your hands free. It’s also an important item if you need to be sure that your voice sounds clear to the person on the other end, without too much wind or other background noise. latestone.com And if you spend a decent amount of time talking on the phone, you don’t want to stay tethered to your handset by a wire, or to hold the phone with your shoulder while you talk—the latter is terrible for your neck and back.
It's really a nice and helpful piece of information. I'm glad that you shared this helpful info with us. Please keep us informed like this.
ceiling speaker amplifier
I am really very agree with your qualities it is very helpful for look like home. Thanks so much for info and keep it up.
Stonelove J - Urkel video
There are certainly a lot of details like that to take into consideration.
ceiling speaker amplifier
Nice!
This is a brilliant writing and very pleased to find this site. I couldn’t discover to much different information on your blog. I will surely be back again to look at some other important posts that you have in future.
erato audio
I definitely appreciate your blog. Excellent work!
RMP - FLEXIN Music Video
I guess there's always an easier way ...
Drummer
I definitely appreciate your blog. Excellent work!
No Control by Laura Mendes
I would be grateful if you continue with the quality of what we are doing now with your blog ... I really enjoyed it
edm violinist
Your Post is very useful, I am truly happy to post my note on this blog . It helped me with ocean of awareness so I really consider you will do much better in the future.
Borderline feat. Joyce Sterling
I definitely appreciate your blog. Excellent work!
Amie Penwell - Dogfight On The Moon
Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog.
Radiohead Cover Creep by Chonna Cristelle
Cool blog you got here and thank you for the valuable info.
Mr. Shammi_Time Machine (Official Video)
I am really very agree with your qualities it is very helpful for look like home. Thanks so much for info and keep it up.
First Music Video Villain- KD
Thank you for the helpful post. I found your blog with Google and I will start following. Hope to see new blogs soon.
Michael Blu Music
I have to say this has been probably the most helpful posts for me. Please keep it up. I cant wait to read whats next.
Sensory friendly theater New Jersey
Wow, what a blog! I mean, you just have so much guts to go ahead and tell it like it is. Youre what blogging needs, an open minded superhero who isnt afraid to tell it like it is. This is definitely something people need to be up on. Good luck in the future, man
Sleeping
Thank you for the helpful post. I found your blog with Google and I will start following. Hope to see new blogs soon.
Can't Stop the feeling by Justin Timberlake
Like your Posts.Thanks Keep Posting.
Paul Maged - "The Wild" (Official Music Video)
I would be grateful if you continue with the quality of what we are doing now with your blog ... I really enjoyed it
Changing Chords
This article has great reference value, thank you very much for sharing, I would like to reproduced your article, so that more people would see it.
Shows2Go App
I guess there's always an easier way ...
No Other Bagger by Chiro Music video
Post is very informative,It helped me with great information so I really believe you will do much better in the future.
Tory Lanez performing live
Spot on with this article, I really think this website needs more attention. I'll probably be back to read more, thanks for the info.
Ev Vinyls - The Rush Music Video
Thanks for sharing info. Keep up the good work...We hope you will visit our blog often as we discuss topics of interest to you
pop music Artist Ksenia Valentis
Spot on with this article, I really think this website needs more attention. I'll probably be back to read more, thanks for the info.
Black Rock Revival-If You Want It
Spot on with this article, I really think this website needs more attention. I'll probably be back to read more, thanks for the info.
Native Instruments
Thanks for sharing info. Keep up the good work...We hope you will visit our blog often as we discuss topics of interest to you
English Language for movies and songs
I think most people would agree with your article. I am going to bookmark this web site so I can come back and read more articles. Keep up the good work!
Dammy Ari Give Ya (Music Video Song)
Valuable information! Looking forward to seeing your notes posted.
Electric Love by Funeral Strippers
I would be grateful if you continue with the quality of what we are doing now with your blog ... I really enjoyed it
Live Your Life to the Fullest
Thank you for the helpful post. I found your blog with Google and I will start following. Hope to see new blogs soon.
Beyond the Sea
Thanks for the information and links you shared this is so should be a useful and quite informative!
Official Music Video for Passion
This blog is having the very nice information about music. Here we can have all the information about it.
SHORT FILM
Liztek is the Manufacturer and best Seller of Multi Color portable bluetooth Speaker, Ultra Portable Bluetooth Speaker, Bluetooth Receiver and Bluetooth Shower Speaker on Amazon and Walmart Marketplace in the USA.
Post a Comment