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. Android Application Branding

I have had the worst experience today trying to contact google. I've
never tried to contact google but I was surely dissapointed by how I
was treated and no help was offered. I just signed up for the Android
Market Place and upon reading the branding page, I noted that it said
that one cannot use a derived name from the word "Android" for a
product. Only thing is that I have been working on an application for
over a year now and I called it "FitRoid" I've paid for the domain
name and am designing the website then google springs this up on me.
So I decided to contact google to find out if the name "fitroid" was
ok for my application. Only problem is that there is no link on the
web to send any queries, or any contact information relating to
contacting the Android Branding team or whatever...The Android Market
place has not contact information and you end up being directed to
googles regular contact page, which of course does not have a category
for Android. So I called Google this evening and the first lady was
not interested in helping me at all and told me that no one on the
phone could help me and I had to rely on the web. She then told me to
go to www.android/support only that after I hung up and tried that,
the url does not even exist. So I called a second time and this time I
got a rude gentleman (ok s{*filter*}the gentle) - a rude person who could
not tell me where I could get help online or with a person. He said I
needed the exact extension to speak to anyone.... (jeez and I thought
Comcast was bad!) so finally he gave me an email address
[EMAIL PROTECTED] just so that he could get rid of me. Upon sending my
email to [EMAIL PROTECTED] of course I get another telling me that that
email is not an address that gets any response and this email directs
me back to www.google.com/support which has no Android Category...

I was very annoyed at the rude google employee and it made me wonder
why on earth have I been so enamored by google and their products...
I've been a developer with GWT and Android and have really pushed
those two products.. only to be treated like this. ALL I WANT TO KNOW
IS WETHER I AM ALLOWED TO KEEP USING THE NAME "FITROID" THAT I HAVE
BEEN USING FOR MY APPLICATION FOR THE LAST YEAR..

Forgive the yelling every one....

Thanks,
--donden1

--~--~---------~--~----~------------~-------~--~----~

2. java.io.IOException: Couldn't open /data/data/com.basic.ui/cache_/data.xml (parser problem)

hi,

sorry for late reply...

the code is :-

        SAXParserFactory spf = SAXParserFactory.newInstance();
        SAXParser sp = spf.newSAXParser();

        XMLReader xr = sp.getXMLReader();

        ServicesXMLParser parser = new ServicesXMLParser(con, this);
        xr.setContentHandler(parser);


        try {
      //this is the path where the xml has been downloaded, if got
java.io.IOException occur, will then parse directly using "url address"
            xr.parse(new InputSource(path));
        } catch (Throwable e) {
            xr.parse(new InputSource(addXML));
        }

hope this will address my problem more clearly...

thanks.

have a nice day.



wesley.


On Sat, Oct 25, 2008 at 2:43 AM, Justin (Google Employee) <[EMAIL 






--~--~---------~--~----~------------~-------~--~----~

3. How to get in touch with Android Marketing

4. Sync Google Contacts with Emulator

5. help I want to add contacts from gmail account to android emulators contacts

6. G1 Bug: Google Imported & Primary Phones

7. How do you compile the bundled apps that comes with the Android source code