Bug 667 - A2DP and AVRCP Bluetooth profile wanted
: A2DP and AVRCP Bluetooth profile wanted
Status: RESOLVED FIXED
Product: Connectivity
Bluetooth
: 2.0
: 770 Maemo
: Medium enhancement with 44 votes (vote)
: 5.0-beta
Assigned To: unassigned
: bluetooth-bugs
:
: enhancement-it2006, ITOS2007HE-garage
:
:
  Show dependency tree
 
Reported: 2006-07-04 01:16 UTC by Rune Eriksson
Modified: 2009-12-11 03:39 UTC (History)
13 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Rune Eriksson (reporter) 2006-07-04 01:16:37 UTC
I think it should be included in the OS itself, but if it just gets to the 
audio/videoplayer, fine...
A2DP is the stereo sound profile, and the AVRCP is the remote control profile so 
you can control your 770 in the pocket with play/pause etc, which is included on 
most A2DP headset today.
Comment 1 Maemo QA (deprecated) 2006-07-07 19:28:51 UTC
Thanks, will be handled as a feature request.
Comment 2 Quim Gil nokia 2007-07-05 13:35:09 UTC
Picking this one to see if it ends up in http://maemo.org/intro/roadmap.html
either in the roadmap or at least in wishlist. Please provide any additional
details or ideas you might have since you filed this  enhancement request.

Thanks!
Comment 3 Quim Gil nokia 2007-08-16 09:37:15 UTC
While the feature is not officially supported, it would be useful for (power)
users to know about how to make A2DP work.

Is this page summarizing the steps and pages about this topic?
http://1976th.com/bluetooth/2007/n800-simplified-instructions-for-adding-bluetooth-a2dp/

Perhaps someone here would like to go ahead and create a wiki page.

In the meantime I'll do my part of the homework.
Comment 4 feig 2007-08-16 16:36:26 UTC
I wanted to let people know that there is a new A2DP, which has not been
packaged for the n800 yet. I believe that it is now packaged with bluez: 

http://wiki.bluez.org/wiki/Audio 

I think that if Nokia is going to move forward with this issue, then they
should do it using the current packages. This audio section also includes the
headset profiles, which would take care of that feature request also.
Comment 5 Johan Hedberg nokia 2007-08-28 19:24:36 UTC
Don't worry, we (Nokia) are aware of this development in BlueZ and have
actually been responsible for the most part of it. I just tested an unmodified
bluez-utils-3.15 on a N800 and A2DP worked just fine. I used mpg123 and the CPU
usage was about 20% (which includes mp3 decoding, rate changing to 48kHz and
SBC encoding, from which the decoding will be moved to DSP in the future and
rate changing wont be neded).

I'll push the packages to sardine soon.
Comment 7 Jason Carter 2007-10-23 21:54:45 UTC
Johan, has there been any progress on A2DP on IT2008? We haven't heard anything
about it since your last comment.
Comment 8 Johan Hedberg nokia 2007-10-23 22:32:06 UTC
(In reply to comment #7)
> Johan, has there been any progress on A2DP on IT2008? We haven't heard anything
> about it since your last comment.

The audio service and alsa plugin supporting A2DP ships with IT2008, however by
default support for it is disabled (you need to comment out a line in
/etc/bluetooth/audio.conf to enable it). The main reason why it's disabled is
that there are several places in the system that are not ready to support it
yet (mostly the DSP from where we'd need to get raw audio out after it has
mixed it from various sources (system souds, media player music, etc). However,
you should be able to get it working for specific 3rd party apps by editing
audio.conf, creating a .asoundrc file and making sure your music player uses
the alsa device specified in .asoundrc. E.g. I've tested it successfully using
alsaplayer both on N800 and N810 HW.

As for sardine, I did the necessary changes to sardine.packages last week but
I'm not sure a package has been built yet since it seemed that libhal-dev
wasn't available for some reason.
Comment 9 fremwi 2007-11-07 02:17:06 UTC
Why a2dp and avrcp works with n810 and not with n800?
Comment 10 Johan Hedberg nokia 2007-11-07 11:34:44 UTC
(In reply to comment #9)
> Why a2dp and avrcp works with n810 and not with n800?

It's a little difficult to answer that question since I've seen it work on both
devices :)
Comment 11 Frederic Crozat 2008-01-13 13:39:55 UTC
Ok, I've just been able to get A2DP working with latest IT2008 image, after
some fight with the system.

Here is the howto :
-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.
Comment 12 Mikael 2008-06-23 00:12:25 UTC
(In reply to comment #11)
> Ok, I've just been able to get A2DP working with latest IT2008 image, after
> some fight with the system.
> 
> Here is the howto :
> -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.
> 

I tried this... But.. the result then i run bt.sh looks like this:

Nokia-N810-51-3:/home/user# ./bt.sh
Usage: dbus-send [--help] [--system | --session] [--dest=NAME] [--type=TYPE]
[--                                 print-reply=(literal)]
[--reply-timeout=MSEC] <destination object path> <message                      
           name> [contents ...]
./bt.sh: line 6: org.bluez.Manager.ActivateService: not found
sed: unmatched '/'
./bt.sh: line 3: syntax error: "|" unexpected

Please help!
Comment 13 benson 2008-07-03 14:56:40 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > -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
> 
> I tried this... But.. the result then i run bt.sh looks like this:
> 
> Nokia-N810-51-3:/home/user# ./bt.sh
> Usage: dbus-send [--help] [--system | --session] [--dest=NAME] [--type=TYPE]
> [--                                 print-reply=(literal)]
> [--reply-timeout=MSEC] <destination object path> <message                      
>            name> [contents ...]
> ./bt.sh: line 6: org.bluez.Manager.ActivateService: not found
> sed: unmatched '/'
> ./bt.sh: line 3: syntax error: "|" unexpected
> 
> Please help!
> 

I think you might have some newlines that shouldn't be there (from wrapping);
I've marked them with ***************.
Comment 14 Christoph 2008-08-27 22:10:19 UTC
since a2dp works now with some hacking, I would like to know if there 
is a way to use AVRCP. I would like to use the buttons on my headset.

Regards,
    Christoph
Comment 15 eagarcia 2008-09-19 05:10:18 UTC
Hi, I had the same errors.
Was typed using vi, exactly as was posted.

Please advise.
Thanks


(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > -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
> > 
> > I tried this... But.. the result then i run bt.sh looks like this:
> > 
> > Nokia-N810-51-3:/home/user# ./bt.sh
> > Usage: dbus-send [--help] [--system | --session] [--dest=NAME] [--type=TYPE]
> > [--                                 print-reply=(literal)]
> > [--reply-timeout=MSEC] <destination object path> <message                      
> >            name> [contents ...]
> > ./bt.sh: line 6: org.bluez.Manager.ActivateService: not found
> > sed: unmatched '/'
> > ./bt.sh: line 3: syntax error: "|" unexpected
> > 
> > Please help!
> > 
> 
> I think you might have some newlines that shouldn't be there (from wrapping);
> I've marked them with ***************.
>
Comment 16 Quim Gil nokia 2008-10-06 09:38:26 UTC
Both A2DP and AVRCP will be officially supported in Fremantle. Thank you very
much to the patient supporters of these features.
Comment 17 Quim Gil nokia 2008-10-27 08:28:47 UTC
Can we set this as fixed or do you prefer to wait for the code?

Personal opinion: in the case of generic enhancement requests like this one the
word of an authorized Nokia speaker could be enough. As an example with this
report, I confirm this feature is covered in Fremantle and it's already working
in internal testing.
Comment 18 Ryan Abel maemo.org 2008-10-27 09:11:22 UTC
(In reply to comment #17)
> Personal opinion: in the case of generic enhancement requests like this one the
> word of an authorized Nokia speaker could be enough.
>

I'd say it can be resolved. That said, I don't doubt there will be an uproar
from current generation owners.

> As an example with this report, I confirm this feature is covered in Fremantle and
> it's already working in internal testing.
> 

Well, if it's working in internal testing, then it's already in the code. ;)
Comment 19 Quim Gil nokia 2008-10-27 10:50:44 UTC
Uproar is ok as long as it can be converted into activity and progress.  :)

Resolving.
Comment 20 Andre Klapper maemo.org 2008-10-27 12:11:26 UTC
Closing as "FIXED in Fremantle" is fine if some internal code already exists.
Comment 21 Andre Klapper maemo.org 2009-04-28 15:34:34 UTC
Setting Target Milestone to Fremantle SDK beta.
Comment 22 kradon.trekkie 2009-12-10 05:19:24 UTC
"FIXED in Fremantle" does n8x0 users no good and is therefore not a fix in the
least. this bug should be reopened.
Comment 23 Andre Klapper maemo.org 2009-12-10 14:13:50 UTC
(In reply to comment #22)
> "FIXED in Fremantle" does n8x0 users no good and is therefore not a fix in the
> least. this bug should be reopened.

No, as this is a WONTFIX for Maemo4. Maemo4 is in maintenance mode and Nokia
will only provide bugfixes for critical issues if at all.
For your interest the Mer project aims to provide a community backport of
Maemo5 for 770/N8x0 devices. See http://wiki.maemo.org/Mer for more
information.