maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   A2DP works, help me test it? (https://talk.maemo.org/showthread.php?t=13468)

Dado 2009-03-20 10:26

Re: A2DP works, help me test it?
 
Hello Blowfish,

deleting and re-pairing did i already without success. The DC800 has no controls but with my E51 volume is OK. Think this is the latest version found in the repository 1.0rc1-maemo.29.n8x0.

Any other idea?

Serge 2009-04-18 21:38

Re: A2DP works, help me test it?
 
Anybody here using Logitech FreePulse headset? Looks like it has problems with audio clipping when used with soundtracks which have audio volume maximized. A workaround is to reduce volume either in the player program or in bluez SBC encoder. If you encounter audio quality issues like clicks or 'frying pan' noise which are not defects of the original audio file itself of course, please let me know.

nadolph 2009-05-13 19:50

Re: A2DP works, help me test it?
 
Hello,

I'm having some trouble getting A2DP to work on my nokia N810. I followed the instructions in the first post. Are those instructions still current?

I'm running the latest version of the OS. The a2dp-support package installs correctly, and running a2dp firstrun and a2dp enable also seems to work. I am running mplayer version 1.0rc1-maemo.29.n8x0. When I try to play a file, I recieve the following error:

alsa-lib: pcm_bluetooth.c:1589:(bluetooth_init) BT_GETCAPABILITIES failed : Input/output error(5)

The bluetooth headset I'm using is paired prior to this and it does (is advertised to) support a2dp. I double(triple) checked the address given to a2dp firstrun. It works in non-A2DP mode.

Any help would be greatly appreciated. If there is another method for enabling a2dp, I'd love to know. I know my way around linux quite well, but I am new to the n810, bluetooth, and maemo.

Nathan

lardman 2009-05-13 22:17

Re: A2DP works, help me test it?
 
This sometimes happens (no idea why), try re-pairing your headset with the N810 and running the "runfirst" script again.

nadolph 2009-05-16 23:35

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by lardman (Post 287244)
This sometimes happens (no idea why), try re-pairing your headset with the N810 and running the "runfirst" script again.

I tried this many times already but it did not help. Thanks anyway.

Nathan

sachin007 2009-05-17 01:42

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by nadolph (Post 288150)
I tried this many times already but it did not help. Thanks anyway.

Nathan

Another thing to watch out is to unpair anyother bluetooth devices that are already authorised to the headset.

I had a nokia n95-4 which was also paired to the headset and this caused a problem. Deactivate the bluetooth on the phone and repairing solved the problem.

lardman 2009-05-17 09:55

Re: A2DP works, help me test it?
 
Quote:

I tried this many times already but it did not help. Thanks anyway.
I feel your pain, I had lots of frustration getting it setup when I first got my headset (and lots of wasted time debugging my DSP code when it was the fault of Bluez all the time, aargh!). If you do work out what the issue is please do post and let everyone know.

nadolph 2009-05-19 19:45

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by lardman (Post 288183)
If you do work out what the issue is please do post and let everyone know.

I haven't tried getting A2DP to work in for the last week or so, but I tried again today and it worked. I didn't do anything special, just rebooted, repaired, re-ran A2DP runfirst. I guess I just got lucky. Thanks everyone for your help.

Nathan

Dr Tran 2009-06-02 05:52

Re: A2DP works, help me test it?
 
This broke my MD-5W speakers. The a2dp profile is missing now. :(

tso 2009-06-21 01:17

Re: A2DP works, help me test it?
 
ah, got things working with my bt8010's. just had to turn of the tablet siunds so that the headset didnt go into phonecall mode every time i touched the phone.

also, one cant do much else while playing music...

yukop4 2009-06-21 02:29

Re: A2DP works, help me test it?
 
got the same problem with my tablet n810-media player send via bluetooth and the bluetooth connection drops out

what annoys me is that the md 7w speakers were stated as being compatiable with the n810

zenjunior 2009-06-26 17:59

Re: A2DP works, help me test it?
 
The instructions on the first page are still valid, and work without a problem, the only problem is that mplayer normaly uses 5 to 10 % , and using the A2DP it spikes to 50%, when monitoring using # top

So it works, but I think battery is going to be an issue...

Thanks for the hint

Tomaszd 2009-07-12 10:32

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by Serge (Post 266187)
Hello,

Regarding A2DP performance on N800/N810. Using the latest diablo firmware, a2dp-support_0.9_all.deb package and nothing else, we get the following profiling statistics (Signed 16 bit Little Endian, Rate 44100 Hz, Stereo WAV file played with aplay for 100 seconds), the results are consistent across multiple runs, CPU was set to run at 400MHz:



CPU usage is split between kernel and bluez SBC encoder more or less evenly and the bluetooth driver consumes quite a noticeable share of cpu time. Applying attached patch (tweak of UART FIFO buffer settings) to the kernel reduces CPU usage in the bluetooth driver. The fix for UART FIFO stuff for the bluetooth is available in pre-alpha fremantle kernel which was released to the public. I just did some tweaks which should work better on N800/N810, but of course somebody else can probably improve it more (reading OMAP1 and OMAP3 documentation about UART and "interpolating" it for OMAP2). Even better optimization would be to try using DMA in the bluetooth driver, but that may be a bit harder.

With the patch applied, the profiling statistics changes to the following:


CPU usage in the kernel gets lower and there are less interrupts generated. On the other hand, bluetooth transfer speed may become a little bit smaller.

As for the SBC codec alone, it takes ~7% of CPU on N800/N810. With ARMv6 SIMD optimizations (which are still to be done) and the latest SBC encoder from upstream bluez project, I expect that this time might get halved.

Alternatively, DSP can be used for SBC encoder (port to it is done by lardman). But ARM<->DSP communication overhead is also kind of can of worms and may (or may not) kill the benefits of offloading some work to DSP.

To anyone who wants to know: I've added Serge's patch to kernel-source-diablo of Mer, it's now in N8x0:Testing, should be available in the next release of Mer (0.15).

svu 2009-11-02 10:24

Re: A2DP works, help me test it?
 
svs57, could you please fix your a2dp script with adding

enabled=0

at the start? Otherwise the line

if [ $enabled -eq 1 ] ; then

gives the error message, when $enabled is not initialized.

Thanks

svs57 2009-11-02 11:11

Re: A2DP works, help me test it?
 
1 Attachment(s)
Thank you svu.
I fixed script.

clearcut 2009-12-02 05:14

Re: A2DP works, help me test it?
 
I'm trying to get this to work with a pair of LG HSB-250 which support A2DP. I have read all 9 pages of this tread. I followed the first message - actually 3 times now rebooting between tries.

With a2dp enabled:

mplayer - plays a video with no sound. Occasionally it plays a double speed with no sound. Until the video actually plays, screen taps play. Version 1.0rc1-maemo20.n8x0

Kagu simply crashes.

With a2dp disabled I can hear in both speakers, but the quality is poor. Kagu plays normally.

The headphones connect in HFP, HSP. I was able to make a call with Goggle Voice and Gizmo.

Any other suggestions?

lardman 2009-12-02 10:23

Re: A2DP works, help me test it?
 
Try un-pairing and then re-pairing, getting it to connect the first time can be a real pita.

clearcut 2009-12-02 17:59

Re: A2DP works, help me test it?
 
Thanks for the suggestion. Unfortunately after 6 un-pairing / re-pairings, the results are the same.

I have tried re-pairing while a2dp and enabled and a2dp was disabled.

I have triple checked the Bluetooth address.

As an experiment, I paired (and then un-paired) the headset with a Mac and achieved full a2dp support including controlling iTunes with the headset controls, so I know the headset works correctly.

Any other suggestions?

svs57 2009-12-03 08:05

Re: A2DP works, help me test it?
 
Start xterm. From xterm type
mplayer <Path to mp3 file>/<mp3 file name>
for example
mplayer /media/mmc2/music.mp3
Then copy output and paste here.

IMHO FAQ miss very important part - create a2dp device
Here is python script for this
-----------------------------------
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
bus_id = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(bus_id, '/org/bluez/audio'), 'org.bluez.audio.Manager')

path = audio.CreateDevice('XX:XX:XX:XX:XX:XX')
audio.ChangeDefaultDevice(path) #change the device to be used by default
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
sink.Connect()
----------------------------------------------
Change in the line
path = audio.CreateDevice('XX:XX:XX:XX:XX:XX')
BT address of your headphone

Also check file
/etc/bluetooth/audio.conf
line
Disable=Control,Sink,Source
should be
#Disable=Control,Sink,Source
And restart BT as root
/etc/init.d/bluez-utils stop
/etc/init.d/bluez-utils start

Hope this help you.

clearcut 2009-12-04 20:12

Re: A2DP works, help me test it?
 
Thank you so much for trying to help. I really appreciate it. But still no a2dp sound.

==-=-==

I rebooted the N810,
re-paired the HBS-250 headset,
did a a2dp runfirst adding the correct device 00:07:88:6A1:E1:72
and ran mplayer as you suggested

==-=-==
12/04/09, 10:59 AM: /media/mmc2 $ mplayer fpb.mp3
MPlayer 1.0rc1-maemo.29.n8x0 (C) 2000-2006 MPlayer Team
CPU: ARM
Internet Tablet OS version: RX-34+RX-44+RX-48_DIABLO_5.2008.43-7_PR_MR0

[MENU] Can't open menu config file: /home/user/.mplayer/menu.conf
Menu inited: /etc/mplayer/menu.conf

Playing fpb.mp3.

Audio file file format detected.
================================================== ========================
Trying to force audio codec driver family dspmp3...Opening audio decoder: [dspmp3] MP3 audio pass-through for Nokia 770/N800 (fake decoder)
ADecoder preinit failed :(
ADecoder init failed :(
Trying to force audio codec driver family libmad...Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
================================================== ========================
alsa-lib: pcm_bluetooth.c:1589:(bluetooth_init) BT_GETCAPABILITIES failed : Input/output error(5)
alsa-init: playback open error: Input/output error
Could not open/initialize audio device -> no sound.Audio: no sound
Video: no video


Exiting... (End of file)

==-=-==

I then ran your script

==-=-==

12/04/09, 11:00 AM: /media/mmc2 $ python usebt.py
Traceback (most recent call last):
File "usebt.py", line 7, in <module>
path = audio.CreateDevice('00:07:88:6A1:E1:72') File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 607, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.ConnectionAttemptFailed: Host is down
/media/mmc2 $

==-=-==

and reran mplayer

==-=-==
______

12/04/09, 11:01 AM: /media/mmc2 $ mplayer fpb.mp3
MPlayer 1.0rc1-maemo.29.n8x0 (C) 2000-2006 MPlayer Team
CPU: ARM
Internet Tablet OS version: RX-34+RX-44+RX-48_DIABLO_5.2008.43-7_PR_MR0

[MENU] Can't open menu config file: /home/user/.mplayer/menu.conf
Menu inited: /etc/mplayer/menu.conf

Playing fpb.mp3.

Audio file file format detected.
================================================== ========================
Trying to force audio codec driver family dspmp3...Opening audio decoder: [dspmp3] MP3 audio pass-through for Nokia 770/N800 (fake decoder)
ADecoder preinit failed :(
ADecoder init failed :(
Trying to force audio codec driver family libmad...Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
================================================== ========================
alsa-lib: pcm_bluetooth.c:1589:(bluetooth_init) BT_GETCAPABILITIES failed : Input/output error(5)
alsa-init: playback open error: Input/output error
Could not open/initialize audio device -> no sound.Audio: no sound
Video: no video


Exiting... (End of file)

==-=-==

I also rebooted and re-paired.

svs57 2009-12-05 17:21

Re: A2DP works, help me test it?
 
python script msg: Host is down
means that or BT address is incorrect or headphone is off.
Try remove BT headphone device and add it again after you change
/etc/bluetooth/audio.conf and restart bluetooth
You must first of all create a2dp alsa device using python script before you can use it.
PS
You can find more information on
http://wiki.bluez.org/wiki/HOWTO/AudioDevices

eastbayarb 2009-12-26 08:52

Re: A2DP works, help me test it?
 
I installed the a2dp support (a2dp-support_0.9_all.deb) and followed the guide. I have a Motorola S805, and although a2dp is enabled, I am still getting mono sound. I have the latest mplayer installed (1.0rc1-maemo.29.n8x0)

Please help!

speculatrix 2009-12-26 22:18

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by eastbayarb (Post 441984)
I installed the a2dp support (a2dp-support_0.9_all.deb) and followed the guide. I have a Motorola S805, and although a2dp is enabled, I am still getting mono sound. I have the latest mplayer installed (1.0rc1-maemo.29.n8x0)

Please help!

if you're only getting mono sound then..
either you're still using SCO audio
or
the sound file is mono
or
mplayer is broken
or
the configuration is broken - be sure to check you have the correct mac address so it can connect

meanwhile you'll have to paste some of the mplayer output as we're simply guessing in the dark as to what's going on!!

eastbayarb 2009-12-26 23:16

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by speculatrix (Post 442437)
if you're only getting mono sound then..
either you're still using SCO audio
or
the sound file is mono
or
mplayer is broken
or
the configuration is broken - be sure to check you have the correct mac address so it can connect

meanwhile you'll have to paste some of the mplayer output as we're simply guessing in the dark as to what's going on!!

I assure you the mp3's I am using are not mono. I have installed, uninstalled, and reinstalled mplayer twice. I know I have the correct MAC address.

What mplayer output are you talking about pasting?

tabletter 2010-01-09 17:28

Re: A2DP works, help me test it?
 
Who knows what is the current situation with AVRCP support? Do stop, next, prev, etc buttons work? Any chance?

lardman 2010-01-09 21:03

Re: A2DP works, help me test it?
 
On the N900? Yes they do.

tabletter 2010-01-20 20:57

Re: A2DP works, help me test it?
 
I mean the previous ones - N8x0. I believe this new N900 support everything.

AndyM 2010-02-16 13:15

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by zenjunior (Post 300075)
The instructions on the first page are still valid, and work without a problem, the only problem is that mplayer normaly uses 5 to 10 % , and using the A2DP it spikes to 50%, when monitoring using # top

So it works, but I think battery is going to be an issue...

Thanks for the hint

Is this still an accurate summary of the situation? A2DP will work, but it eats battery time?

svs57 2010-02-16 14:44

Re: A2DP works, help me test it?
 
My experience with a2dp:
proc load ~ 12%-15%
battery from 100% to 86%-90% working ~1.5 hour.

Serge 2010-07-02 22:56

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by Serge (Post 266187)
As for the SBC codec alone, it takes ~7% of CPU on N800/N810. With ARMv6 SIMD optimizations (which are still to be done) and the latest SBC encoder from upstream bluez project, I expect that this time might get halved.

Upstream bluez SBC codec got ARMv6 optimizations, which should be very useful for reducing A2DP CPU load on Nokia N800/N810:
http://git.kernel.org/?p=bluetooth/b...183a52f9f6c096

svs57 2010-07-05 07:24

Re: A2DP works, help me test it?
 
Did you compile new bluez for N810?

Serge 2010-07-05 07:30

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by svs57 (Post 740945)
Did you compile new bluez for N810?

No, but that should be simple: http://talk.maemo.org/showpost.php?p...&postcount=307

Just the content of 'sbc' subdirectory from bluez-4.67 should be used now.

svs57 2010-07-05 07:54

Re: A2DP works, help me test it?
 
I downloaded bluez-4.67.
There is no Makefile.am in sbc directory.
Appling both patches form git.kernel is failed.

Serge 2010-07-05 08:24

Re: A2DP works, help me test it?
 
Quote:

Originally Posted by svs57 (Post 740966)
I downloaded bluez-4.67.
There is no Makefile.am in sbc directory.
Appling both patches form git.kernel is failed.

1. take the old tarball from lardman: http://people.bath.ac.uk/enpsgp/noki...-0osso6.tar.gz
2. copy 'sbc' directory from bluez-4.67 over the 'sbc' directory in that tarball
3. take Makefile.am from old tarball and add new files 'sbc_primitives_armv6.c' and 'sbc_primitives_armv6.h' to it (similar to how 'mmx' and 'neon' files are listed there)
4. make sure that the package gets built with -march=armv6 or -mcpu=arm1136jf-s options to get armv6 optimizations compiled in.

I hope somebody in this thread still maintains the a2dp support package for diablo and will provide an updated .deb file soon.

svs57 2010-07-05 08:36

Re: A2DP works, help me test it?
 
Thanks. I'll try to compile.

svs57 2010-07-05 09:28

Re: A2DP works, help me test it?
 
2 Attachment(s)
Packages with the armv6 sbc patch.

Mgamerz 2010-07-05 20:03

Re: A2DP works, help me test it?
 
I'd test it if my battery life didn't suck already.


All times are GMT. The time now is 16:46.

vBulletin® Version 3.8.8