Posts: 1,950 | Thanked: 1,174 times | Joined on Jan 2008 @ Seattle, USA
#301
Originally Posted by Un27Pee View Post
What app do you use to do that changes is it through the command line some suggestions please thanks
Someone else may tell you how to do it from command line, but if they don't, you can do it with emelFM2 (a file manager). You may need to load emelFM2 from root in XTerm (though maybe just opening by double-clicking is enough, I'm not sure). Then navigate to the file and use the pencil icon to edit.
__________________
.
. .

Help Save This Forum
for N8x0/Diablo Users! Register and Vote for Solution #1 on this Brainstorm. (The Solution will let you see New Posts with any threads you choose -- like the N900 and Maemo5/Fremantle threads -- filtered out.) (To understand the Solution better, see these posts #17, #18, and #19.)
 

The Following User Says Thank You to GeraldKo For This Useful Post:
Un27Pee's Avatar
Posts: 259 | Thanked: 59 times | Joined on Feb 2008
#302
Thanks i did not find .atabake on that directory /home/user/
__________________
Uncle Pee

T3 - IT 810
Confidence is hard to gain easy to loose impossible to regain, Pee
 
bongo's Avatar
Posts: 291 | Thanked: 124 times | Joined on Feb 2006 @ Trier, Germany
#303
I've written a little app called mbluetoothd
see:
http://www.internettablettalk.com/fo...ad.php?t=26809

It can execute commands when bt devices connect/disconnect. You can use the a2dp enable and disable commands and so a2dp will be turned on or off when the connection to your headset changes.
__________________
ongo bongo!
 
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#304
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_CYCLES:100000|
samples| %|
------------------
27578 46.8448 libasound_module_pcm_bluetooth.so
27005 45.8715 no-vmlinux
1232 2.0927 oprofiled
814 1.3827 libc-2.5.so
356 0.6047 libasound.so.2.0.0
305 0.5181 ld-2.5.so
257 0.4365 Xomap
215 0.3652 libglib-2.0.so.0.1200.12
190 0.3227 busybox
182 0.3092 libpthread-2.5.so
120 0.2038 libgobject-2.0.so.0.1200.12
107 0.1818 libdbus-1.so.3.2.0
97 0.1648 dbus-daemon
67 0.1138 libgdk-x11-2.0.so.0.1000.12
61 0.1036 aplay

CPU_CYCLES:100000|
samples| %|
------------------
27238 47.7692 libasound_module_pcm_bluetooth.so
26289 46.1049 no-vmlinux
1176 2.0624 oprofiled
790 1.3855 libc-2.5.so
337 0.5910 libasound.so.2.0.0
267 0.4683 ld-2.5.so
191 0.3350 busybox
151 0.2648 libpthread-2.5.so
114 0.1999 libglib-2.0.so.0.1200.12
100 0.1754 libgobject-2.0.so.0.1200.12
82 0.1438 aplay
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_CYCLES:100000|
samples| %|
------------------
28345 56.8401 libasound_module_pcm_bluetooth.so
18780 37.6594 no-vmlinux
989 1.9832 oprofiled
641 1.2854 libc-2.5.so
283 0.5675 libasound.so.2.0.0
257 0.5154 ld-2.5.so
194 0.3890 busybox
131 0.2627 libpthread-2.5.so
91 0.1825 libuClibc-0.9.28.so
61 0.1223 aplay

CPU_CYCLES:100000|
samples| %|
------------------
28315 56.1861 libasound_module_pcm_bluetooth.so
18894 37.4918 no-vmlinux
997 1.9784 oprofiled
787 1.5617 libc-2.5.so
265 0.5258 ld-2.5.so
264 0.5239 libasound.so.2.0.0
184 0.3651 busybox
141 0.2798 libpthread-2.5.so
120 0.2381 libglib-2.0.so.0.1200.12
82 0.1627 libgobject-2.0.so.0.1200.12
76 0.1508 dbus-daemon
69 0.1369 aplay
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.
Attached Files
File Type: gz bluetooth-fifo-fix.diff.gz (508 Bytes, 206 views)
 

The Following 11 Users Say Thank You to Serge For This Useful Post:
Posts: 104 | Thanked: 20 times | Joined on Apr 2008 @ Illinois
#305
I've got these headphones: http://www.bestbuy.com/site/olspage....=1185267960408
and I have followed the instructions from the first post and everything seems to work. But I'm still not getting stereo audio. When I look at the headphones info on my n800, it says supported profiles: hfp, hsp but does not list a2dp. I also have not gotten the stereo audio to work with my bluetooth dongle on my pc. Are my headphones defective or am I missing something?
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#306
Serge, I honestly have no clue what you just said. I just know it was something good. I hope that means that I will be able to use A2DP without to much significant battery drain.
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#307
I've back-ported the Bluez 4.32 changes to the sbc sub-system to our version of bluez-utils (which sounds quite grand, but really just consists of replacing the contents of one directory with the contents of another ). You can grab the file and overwrite your existing one (dpkg -i) and as it's the same version, it shouldn't break anything.

Note these are the userspace changes, I've not looked at the kernel stuff that Serge posted above (yet). Also note that I only changed the sbc subsystem stuff, there may be some other useful patches which make changes outside that subsystem. If anyone knows of any please let me know.

Files here as usual: http://people.bath.ac.uk/enpsgp/noki.../sbc/ARM-only/
 

The Following 3 Users Say Thank You to lardman For This Useful Post:
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#308
I tested packages from http://people.bath.ac.uk/enpsgp/noki.../sbc/ARM-only/
mplayer eats ~ 40% cpu with ondemand goverment cpu.

How can I be sure that sbc encoding in use?
Here is output from mplayer:
...
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
...
Is it normal?

One more question.
I want to user panucci audio book player with a2dp.
The problem is how to start gstreamer with a2dp.

gst-inspect bluetooth
Plugin Details:
Name: bluetooth
Description: Bluetooth plugin library
Filename: /usr/lib/gstreamer-0.10/libgstbluetooth.so
Version: 3.28
License: LGPL
Source module: bluez-utils
Binary package: BlueZ
Origin URL: http://www.bluez.org/

rtpsbcpay: RTP packet payloader
a2dpsink: Bluetooth A2DP sink
avdtpsink: Bluetooth AVDTP sink
sbcparse: Bluetooth SBC parser
sbcdec: Bluetooth SBC decoder
sbcenc: Bluetooth SBC encoder
bluetooth type: sbc

7 features:
+-- 6 elements
+-- 1 types
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#309
No idea if it's normal or not, will test this evening and see what figures I get. Bear in mind that the CPU has to do MP3 decoding followed by SBC encoding. Also, as you were using ondemand, what was the current CPU frequency while you measured these figures?
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#310
ondemand 165 Mhz cpu load ~35%-38%
What does it mean?

Any advice about using gstreamer over a2dp....
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:45.