I am getting a2dp_write failed err: -110 when I play media on the headset

by Mike » Wed, 11 Nov 2009 23:54:17 GMT


Sponsored Links
 Hi All,
I am working on the eclair code base. And I just started enabling
BlueZ and started working on it.
The basic profiles seems to be working fine. But When I play media on
my headset there is a time delay oocured when playing the media on
headset and hence after 2 seconds of play it stops for 2 seconds and
plays again.
During this process I saw error message "a2dp_write failed err: -110".

1-01 00:09:48.980: INFO/AudioHardwareALSA(1991): Initialized ALSA
PLAYBACK device AndroidPlayback_Speaker_normal
01-01 00:09:48.980: DEBUG/AudioHardwareALSA(1991): Set PLAYBACK PCM
format to S16_LE (Signed 16 bit Little Endian)
01-01 00:09:48.985: DEBUG/AudioHardwareALSA(1991): Using 2 channels
for PLAYBACK.
01-01 00:09:48.985: DEBUG/A2DP(1991): ********** a2dp_write **********
01-01 00:09:48.990: DEBUG/A2DP(1991): bluetooth_start
01-01 00:09:49.000: DEBUG/AudioHardwareALSA(1991): Set PLAYBACK sample
rate to 44100 HZ
01-01 00:09:49.000: DEBUG/AudioHardwareALSA(1991): Buffer size: 4096
01-01 00:09:49.000: DEBUG/AudioHardwareALSA(1991): Latency: 92879
01-01 00:09:49.080: INFO/vold(3225): Android Volume Daemon version 2.0
01-01 00:09:49.465: WARN/AudioFlinger(1991): OutputTrack::write()
0x23cc0 no more overflow buffers
01-01 00:09:49.490: DEBUG/A2DP(1991): wait_for_start: 500575 us
01-01 00:09:49.490: ERROR/A2dpAudioInterface(1991): a2dp_write failed
err: -110
01-01 00:09:49.500: WARN/AudioFlinger(1991): write blocked for 512
msecs, thread 0x23658
01-01 00:09:49.500: DEBUG/A2DP(1991): ********** a2dp_write **********
01-01 00:09:49.705: WARN/AudioFlinger(1991): OutputTrack::write()
0x23cc0 no more overflow buffers
01-01 00:09:49.820: WARN/AudioFlinger(1991): OutputTrack::write()
0x23cc0 no more overflow buffers
01-01 00:09:49.930: DEBUG/A2DP(1991): Received BT_RESPONSE -
BT_START_STREAM
01-01 00:09:49.930: DEBUG/A2DP(1991): Received BT_RESPONSE -
BT_NEW_STREAM
01-01 00:09:49.930: DEBUG/A2DP(1991): wait_for_start: 431150 us
01-01 00:09:49.930: DEBUG/A2DP(1991): poll: 20 us
01-01 00:09:49.930: DEBUG/A2DP(1991): send: 189 us
01-01 00:09:49.930: DEBUG/A2DP(1991): avdtp_write: 297 us


I tried reducing the bitpool till 20 and tried but I did not see any
variation in the performance.
As of now I am using the Baud rate of 115200 should I increase the
baud rate.
If yes please let me know how can I do that since hciconfig hci0 up is
not working with baud rate more than 115200.
waiting for ur reply guys
Thnaks in Advance!

-- 



I am getting a2dp_write failed err: -110 when I play media on the headset

by Ash » Thu, 12 Nov 2009 23:42:33 GMT


 i Mike,

Yes, you need to increase the baud rate, chanding bit pool value will
not help you definately. Ideally high quality A2DP audio data needs
320-350Kbps of band width. For running this you would need baud-rate
of 460.8Kbps which will run basic audio(80% audio data) for you, but i
would suggest you to use 921.6Kbps.

Changing the baud-rate will depend platform you are using. In BlueZ
baud-rate is configured using hciattach tool during bluetooth on
process. hciattach has platform specific code which does the vendor
specific initialization and baud-rate change.

By the way which platform are you working on?

I am not sure hci0 up would work, i will verify and come back to you.
If you are working on source code you can check in hciattach, whether
it is possible or not. And intial configuration for hciattach is taken
from init.trout.rc, you can set the configuration in there.

On Nov 11, 7:08am, Mike <mikebro...@gmail.com> wrote:

--


Sponsored Links


I am getting a2dp_write failed err: -110 when I play media on the headset

by Ash » Thu, 12 Nov 2009 23:47:18 GMT


 ne more thing about:

"If yes please let me know how can I do that since hciconfig hci0 up
is
not working with baud rate more than 115200."

To resolve this erify that you platform specific code in hciattch has
required code to do the baudrate change.


On Nov 12, 8:42pm, Ash <ashoks...@gmail.com> wrote:

--



I am getting a2dp_write failed err: -110 when I play media on the headset

by Mike » Fri, 13 Nov 2009 10:12:39 GMT


 i Ash,
Thanks for the reply.
Yeah I checked the hciattch.c file, there is baud rate change code for
460800 as well as 921600.
And I am able to do hciattach with the above configurations but the
hciconfig hci0 up is not working.
Please lemme know ...

On Nov 12, 8:46pm, Ash <ashoks...@gmail.com> wrote:

--



I am getting a2dp_write failed err: -110 when I play media on the headset

by Ash » Sat, 14 Nov 2009 18:50:21 GMT


 i Mike,

Let me understand your problem clearly.

You are able to get the bluetooth on with 460800/921600 baud-rate
using hciattach??
But you want to change the baud-rate using hciconfig too??



On Nov 13, 7:12am, Mike <mikebro...@gmail.com> wrote:

--



I am getting a2dp_write failed err: -110 when I play media on the headset

by Ash » Sat, 14 Nov 2009 18:54:50 GMT


 nd what error are you getting when you do hciconfig with other baud-
rate configurations??



On Nov 14, 3:49pm, Ash <ashoks...@gmail.com> wrote:

--



I am getting a2dp_write failed err: -110 when I play media on the headset

by Mike » Mon, 16 Nov 2009 12:24:20 GMT


 i Ash,
Please find the answer to the questions you have asked.
> You are able to get the bluetooth on with 460800/921600
baud-rate
> using hciattach??
yes. I mean hciattach is working with the above
baud rates

>But you want to change the baud-rate using hciconfig
too??
No, I am doing hciconfig hci0 up I am getting
the followin error.
I am getting Can't init device hci0 : Connection Timed Out (110).
But the things are working perfectly with 115200 Baud rate.
hciattach with 115200 speed
hciconfig hci0 up
====> Working

hciattach with 460800 or 921600 baud-rate - > working
hciconfig hci0 up -> not working Connection timed Out error.

Thanks,
Jaya Chandra

On Nov 14, 3:54pm, Ash <ashoks...@gmail.com> wrote:

--



I am getting a2dp_write failed err: -110 when I play media on the headset

by Sidharth Malhotra » Fri, 20 Nov 2009 18:38:49 GMT


 i,

I am facing a similar issue with Donut release using kernel 2.6.27.
Even when I run A2DP at 921Kbps, I am getting "write blocked for %ms"
error. See this log snippet below. I have tried changing the bitpool
down to 35, but that hasn't helped.

Earlier, when I used Cupcake build, I could breakfree music even with
460Kbps on the same platform. Looking at the code, I saw that
liba2dp.c (external/bluez/utils/audio) has changed and so has the
Audioflinger part since Android 1.6. Is this issue of A2DP glitches a
known problem with Donut?

==============================================================================================================
D/BluetoothDeviceService( 655): found 0 bonded devices
D/BluetoothDeviceService( 655): Bluetooth state 1 -> 2
D/A2dpAudioInterface( 629): setParameter bluetooth_enabled,true
D/A2dpAudioInterface( 629): setBluetoothEnabled 1
I/bluetooth_ScoSocket.cpp( 709): Listening SCO socket...
W/BluetoothHeadset( 857): Proxy not attached to service
W/BluetoothHeadset( 857): Proxy not attached to service
W/BluetoothHeadset( 857): Proxy not attached to service
W/BluetoothHeadset( 857): Proxy not attached to service
D/dalvikvm( 712): GC freed 888 objects / 38672 bytes in 66ms
D/dalvikvm( 857): GC freed 4789 objects / 208352 bytes in 68ms
D/dalvikvm( 655): GC freed 8824 objects / 380952 bytes in 112ms
I/BluetoothEventLoop.cpp( 655): DiscoveryCompleted signal received
I/BluetoothEventLoop.cpp( 655): DiscoveryStarted signal received
D/BluetoothDeviceService( 655): 00:13:17:70:53:DB bond state 0 -> 2
(0)
I/BluetoothEventLoop.cpp( 655): DiscoveryCompleted signal received
D/BluetoothDeviceService( 655): 00:13:17:70:53:DB bond state 2 -> 1
(0)
D/BT HSHFP( 709): Loaded priority 00:13:17:70:53:DB = 0
D/BT HSHFP( 709): Saved priority 00:13:17:70:53:DB = 100
D/BT HSHFP( 709): Headset state 0 -> 1, result = 1
D/BT HSHFP( 709): Handsfree SDP request
D/dalvikvm( 857): GC freed 9346 objects / 547312 bytes in 73ms
D/BT HSHFP( 709): SDP request returned 2 (882 ms)
I/BT HSHFP( 709): Created RFCOMM socket fd 33.
I/BT HSHFP( 709): async connect is in progress (Operation now in
progress)
I/BT HSHFP( 709): Successful RFCOMM socket connect.
D/BT HSHFP( 709): RFCOMM connection attempt took 825 ms
D/BT HSHFP( 709): Rfcomm connected
D/BT HSHFP( 709): Headset state 1 -> 2, result = 1
D/BluetoothA2dpService( 655): connectSink(00:13:17:70:53:DB)
D/BluetoothA2dpService( 655): new bluez sink: 00:13:17:70:53:DB (/org/
bluez/audio/device0)
D/A2dpAudioInterface( 629): setParameter bt_headset_name,Jabra BT620s
D/BluetoothA2dpService( 655): state 00:13:17:70:53:DB (/org/bluez/
audio/device0) 0->1
D/A2dpAudioInterface( 629): setParameter bt_headset_nrec,on
I/Bluetooth AT recv( 709): AT+BRSF=27
I/Bluetooth AT sent( 709): +BRSF: 99
I/Bluetooth AT sent( 709): OK
I/Bluetooth AT recv( 709): AT+CIND=?
I/Bluetooth AT sent( 709): +CIND: ("service",(0-1)),("call",(0-1)),
("callsetup",(0-3)),("callheld",(0-2)),("signal",(0-5)),("roam",(0-1)),
("battchg",(0-5))
I/Bluetooth AT sent( 709): OK
I/Bluetooth AT recv( 709): AT+CIND?
I/Bluetooth AT sent( 709): +CIND: 0,0,0,0,5,0,5
I/Bluetooth AT sent( 709): OK
I/Bluetooth AT recv( 709): AT+CMER=3, 0, 0, 1
I/Bluetooth AT sent( 709): OK
I/Bluetooth AT recv( 709): AT+CHLD=?
I/Bluetooth AT sent( 709): +CHLD: (0,1



Other Threads

1. New Gmail

As subject, itu download dr market ya?
Apa Market Enabler?
V2.3



~ Jus69 ~
Connected by MOTOBLUR2.1 & powered by XL Broadband

-- 
===============
"

2. Update : Droid X harga spesial (Booked)

Mau update status WTS semalam,

Droid X sudah ada yg booked yah, considered sold.

Lelang Evo masih dibuka s.d pukul 23 nanti, setelah ditutup nanti akan
diumumkan peserta beserta harga penawarannya, supaya fair.
Sudah ada 2 penawar. Ayo bid, spy yakin menang.

-- 
===============
"

3. Android SDK for Android

4. Accessing Video Thumbnail

5. spica froyo kitchen... alpha...

6. Streaming di android

7. Facebook Publish Error In Anroid Application