OS2008 on n800 - Nice Job

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

 



On Dec 5, 2007 11:52 PM, Fr?d?ric Crozat <fred at crozat.net> wrote:
>
> Le jeudi 29 novembre 2007 ? 22:42 +0100, Fr?d?ric Crozat a ?crit :
>
> > Le jeudi 29 novembre 2007 ? 21:28 +0100, Laurent GUERBY a ?crit :
> > > On Wed, 2007-11-28 at 23:43 +0100, Fr?d?ric Crozat wrote:
> > > > > https://bugs.maemo.org/show_bug.cgi?id=667
> > > >
> > > > Well, documentation for enabling A2DP is extremely scarce atm, even in
> > > > this bug report.
> > > >
> > > > I'm not sure if I'll keep my BT headset or ask for a refund.
> > >
> > > On IRC I was told there was work done on it, I suggest
> > > adding a comment with your model and problem on the
> > > above bugzilla.
> >
> > Well, I've spend part of this afternoon at Mandriva office into fixing /
> > enabling Audio bluetooth on Mandriva cooker and I've been successful
> > into directing using ALSA output to headset (either in HSP or A2DP) or
> > using gstreamer a2dp sink (from bluez-utils).
> >
> > Some dbus queries are needed to enable a2dp, which is why it can't work
> > out of the box on IT2008.
> >
> > I'll do more test on n800 this week-end and report here.
>
> I haven't had time to test the dbus queries for A2DP, yet.

And I just found enough time to finish my test with A2DP and I'm happy
to announce
I got it working with IT2008 !

Here is the howto (I've posted it on bugzilla too) :
-first, ensure you have your headset working with IT2008 ie bluetooth pairing
done and if you enable enabled, you get sound (crappy but you get it ;)
-as root, edit /etc/bluetooth/audio.conf and change
Disable=Sink
into
#Disable=Sink

(it would be nice for next nokia image to enable Sink by default, even if there
is no UI to use it in a "supported by Nokia way" so it wouldn't require any
root privilege to hack around A2DP support

-as user, create ~/.asoundrc and put into it :
pcm.bluetooth {
   type bluetooth
}

ctl.bluetooth{
        type bluetooth
}

-as a user, create a file bt.sh with the following content (be sure to set
HEADSET_ADDRESS with your headset BT address :
#!/bin/sh
HEADSET_ADDRESS="aa:bb:cc:dd:ee:ff"

MANAGER=`dbus-send --system --print-reply --dest=org.bluez  /org/bluez
org.bluez.Manager.ActivateService string:audio | grep string | sed -e 's/.*
string //g' -e 's/"//g' `

DEVICE=`dbus-send --system --type=method_call --print-reply --dest="$MANAGER"
/org/bluez/audio org.bluez.audio.Manager.CreateDevice string:"$HEADSET_ADDRESS"
| grep string | sed -e 's/.* string //g' -e 's/"//g' `

dbus-send --system --type=method_call --print-reply --dest="$MANAGER"
"$DEVICE" org.bluez.audio.Sink.Connect

-chmod +x this file
-run this file at each startup so A2DP sink is configured and enabled for your
headset

now, to play sound, use mplayer as following :
mplayer -ao alsa:device=bluetooth your_file_to_play

and enjoy quality music ;)

There is some buffer underrun during playback, but it is a good start.

-- 
Frederic Crozat


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux