linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Socket type in audio IPC
Date: Thu, 04 Nov 2010 09:14:07 +0100	[thread overview]
Message-ID: <4CD26B4F.8070709@tieto.com> (raw)

Hi,

We have a problem with audio IPC, sometimes following printout can be seen in logs when A2DP connection fails:
external/bluetooth/bluez/audio/pcm_bluetooth.c:1609:(audioservice_recv) Too short (1 bytes) IPC packet from bluetoothd

I was not able to catch this issue on my workstation for debugging so far, but it does not seem like ipc.h mismatch between BlueZ and ALSA plugin - we use one BlueZ version for a long time. Perhaps it's because of some unusual fragmentation (not sure how exactly sockets work internally) so my questions is why SOCK_STREAM sockets are used in audio IPC? Doesn't SOCK_SEQPACKET fit better here since we're dealing with messages rather than byte stream? There's no handling of fragmented packets in pcm_bluetooth.c at all so in case recv() returns less bytes than expected this is immediately returned as an error.

BR,
Andrzej


             reply	other threads:[~2010-11-04  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04  8:14 Andrzej Kaczmarek [this message]
2010-11-06 11:08 ` Socket type in audio IPC Johan Hedberg

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=4CD26B4F.8070709@tieto.com \
    --to=andrzej.kaczmarek@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).