All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Feig <feig@nnytech.net>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Frequent headset disconnects
Date: Fri, 18 May 2007 11:56:52 -0400	[thread overview]
Message-ID: <464DCCC4.90300@nnytech.net> (raw)
In-Reply-To: <d89ddf300705180613u5c24ed8brab0acf3f7ee65280@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2325 bytes --]

Brad Midgley wrote:
> *John
>
> *
>
>
>     I've been using the a2dpd app for a couple of weeks now, and
>     really like
>     it. I have a few issues though, with the main one being that after a
>     couple of minutes of playback, my headphones (HT820) turn off
>
>
> it looks like alsa_transfer_raw returns -1 once and then a2dpd closes 
> the connection. Maybe we should be checking for an error state that 
> indicates we can retry or maybe we should retry a few times regardless.
>
> it could be the set turns off because of the way we terminate the 
> connection. This is mostly Frederic's playground but I remember 
> locking up headsets with a2play by accidentally sending data on the 
> stream fd after we had signaled a stream close on the control fd.
>
> brad
Brad, thank you for the reply. To try to understand this, you're saying 
that when I get:

a2dp_transfer_raw: Wrote -1 not 603 bytes (sbc.len=118)
transfer_outgoing_packets: Error in transfer (transfer=-1)

The issue could be that the headset is expecting a value of a certain 
length, and since the value -1 is not that length, the headset doens't 
like that, and shuts down? If this is the case, where should I look to 
change that value, and what should it be changed to? I wouldn't mind 
sending some dummy data and have it drop out for a second once in a 
while, as long as I don't have to keep restarting the thing. At least it 
would be a temporary fix.

I found the IF block in a2dpd_output_a2dp.c:

if (a2dp->sk > 0) {
    // Pause?
    // The value 0 have finally been tested ;)
    // However, we may safely simulate a failed write
    if (!a2dp->pause_writing) {
        // Send our data
            if ((written = write(a2dp->sk, a2dp->buf, a2dp->len)) != 
a2dp->len) {
                // Error while sending data
                    DBG("Wrote %d not %d bytes (sbc.len=%d)", written, 
a2dp->len, a2dp->sbc.len);
                        // Return the error
                        result = written;
            }
...

That seems to be the only place that contains that string, that I could 
find. I can't find out where the function "write" is defined either.

I'll keep looking, and if you guys can give me some suggestions of 
things to try and what I should be looking at, I will and let you all 
know how it goes.

Thanks again,
John

[-- Attachment #1.2: Type: text/html, Size: 3606 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2007-05-18 15:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17  0:07 [Bluez-devel] headsetd has problems serving two applications at a time Robert Huitl
2007-05-17  3:42 ` Brad Midgley
2007-05-17  7:51   ` Tim Chick
2007-05-17 13:21   ` Robert Huitl
2007-05-17 15:34     ` [Bluez-devel] Frequent headset disconnects John Feig
2007-05-18 13:13       ` Brad Midgley
2007-05-18 15:56         ` John Feig [this message]
2007-05-18 19:17           ` [Bluez-devel] RE : " Frederic Dalleau
2007-05-22 14:31             ` John Feig
2007-05-22 17:51               ` John Feig
2007-05-24 13:24     ` [Bluez-devel] headsetd has problems serving two applications at a time Brad Midgley
2007-05-24 16:28       ` Marc-André Lureau
2007-05-24 18:45       ` Robert Huitl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=464DCCC4.90300@nnytech.net \
    --to=feig@nnytech.net \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.