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

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



On Mon, Feb 28, 2011 at 6:49 AM, Klistvud <quotations@aliceadsl.fr> wrote:
> 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.
>

I appreciate hearing about your success.  I can get the pairing, but
it is always "failed to connect"

I've spent some time trying to figure out how .asoundrc is supposed to
work.  Once again, the documentation is little help, for me anyway.
Do you recall where you found the text that you entered in .asoundrc?
I found my text here:

http://wiki.debian.org/Bluetooth/Alsa

I tried each version, always get the same results.

I notice that the device code has quotes around it in the wiki
version, and not in your version.  My guess is that it probably works
either way, but is all of this documented someplace?

BTW, what about that script you wrote for starting it?  If I wanted to
write something for KDE, where did you find the basics and knowledge
to create that script?  (Not the basic bash scripting, but the alsa
stuff)

Thanks for your input.

--
John Pedersen
registered linux user #287986, registered 2002-09-27
http://EloraInfo.com
http://Fortdesoto.com
http://BocaCiegaPark.com
http://EloraQuarry.com
http://EloraGorgeAnimalHospital.com
http://MidlandLighter.com


Reply to: