[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Squeeze: can Bluetooth headset work without pulseaudio???



Dne, 28. 02. 2011 12:42:57 je Klistvud napisal(a):
Dne, 27. 02. 2011 22:21:05 je Celejar napisal(a):
On Sat, 26 Feb 2011 12:55:42 -0500
John <nesredep@gmail.com> wrote:

>  I have used pulseaudio in the past, and it was horrible to install
> and understand. But for a while, I had it working on some machine or > other, with Etch or Lenny (I think). Sinks, sources, wonderful. That
> machine is long gone.
>
> I recently installed Squeeze/KDE 4.45, and I wanted to use a bluetooth
> headset.  My Googling led me to believe that it CAN NOT be done
> without pulseaudio.

I wish I knew.  I've wasted hours trying to get a bluetooth headset
working, without success.  Documentation is horrible, and everything
you find is incomplete and / or outdated.  Never really had the
patience to install the whole pulseaudio shebang just to do something
really simple that absolutely shouldn't require it.

Celejar

FWIW I had my bluetooth headset working under Lenny. It required no pulse audio. Wait a minute, let me check... OK. I copied the old Lenny ~/.asoundrc to my Squeeze home dir and it works in Squeeze too. This is the contents of my ~/.asoundrc:


<snip>

pcm.bt_audioraw {
        type bluetooth
        device 00:0B:E4:38:F8:F7
        profile "auto"
}
pcm.bt_audio {
	type plug
        slave.pcm "bt_audioraw"
        hint {
            show on
            description "Zvočna naprava bluetooth"
        }
}

<pins>


Of course you must first pair your bluetooth headset with your machine, which is a no-brainer with the GNOME bluetooth applet. Once you have it paired, you should use hcitool and/or other utilities to find out your headset's hardware address and replace the "device XX:XX:XX:XX:XX:XX" line in your .asoundrc accordingly. Once you have the right~/.asoundrc in place, you can easily switch between the external speakers and the bluetooth headset by running some script such as this:


<snip>

#!/bin/bash

state=`gconftool --get /system/gstreamer/0.10/default/musicaudiosink | cut -d\ -f1`

if [ $state == "autoaudiosink" ]; then
gconftool --type string --set /system/gstreamer/0.10/default/audiosink "alsasink device=bt_audio" gconftool --type string --set /system/gstreamer/0.10/default/musicaudiosink "alsasink device=bt_audio" gconftool --type string --set /system/gstreamer/0.10/default/chataudiosink "alsasink device=bt_audio" gconftool --type string --set /system/gstreamer/0.10/default/videosink "alsasink device=bt_audio" zenity --info --title="GStreamer" --text="Zvočni izhod preklopljen na bluetooth slušalke."
else
gconftool --type string --set /system/gstreamer/0.10/default/audiosink "autoaudiosink" gconftool --type string --set /system/gstreamer/0.10/default/musicaudiosink "autoaudiosink" gconftool --type string --set /system/gstreamer/0.10/default/chataudiosink "autoaudiosink" gconftool --type string --set /system/gstreamer/0.10/default/videosink "autovideosink" zenity --info --title="GStreamer" --text="Zvočni izhod preklopljen na zvočnike."
fi

echo Audiosink preklopljen na `gconftool --get /system/gstreamer/0.10/default/musicaudiosink`.

<pins>


The above procedure only works for gstreamer (for example, system sounds and Totem movies will still be heard through the external speakers). It's great for listening to Rhythmbox though. I've left a couple of strings in my language, which is Slovenian, but you should have no trouble adapting them to your needs. They don't affect functionality anyway.

--
Good luck,

Klistvud http://bufferoverflow.tiddlyspot.com Certifiable Loonix User #481801 Please reply to the list, not to me.


Sorry if the above procedure is GNOME-specific, but it's all I have. Perhaps it can get you started at least. Anyway, I sincerely don't think pulseaudio is required to make a bluetooth headset work. Not even in KDE.

--
Cheerio,

Klistvud http://bufferoverflow.tiddlyspot.com Certifiable Loonix User #481801 Please reply to the list, not to me.


Reply to: