Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] sbcinfo.c frame_len problem?
Date: Tue, 15 Mar 2005 08:54:19 +0100	[thread overview]
Message-ID: <1110873260.8820.8.camel@pegasus> (raw)
In-Reply-To: <1110872684.8820.3.camel@pegasus>

Hi Brad,

> > This was in an anonymous bug reported at the sf project.
> > 
> > =====================================
> > In sbcinfo.c, the frame_len is calculated incorrectly.
> > 
> > 195: frame_len[0] = count + 4;
> > 
> > The output of sbc_test_01.sbc results in:
> > 
> > Frame length 46 Bytes
> > 
> > instead of 42 (according to "A2DP Test v10.pdf").
> > =====================================
> > 
> > should the "+ 4" be dropped?
> 
> I have no idea, but the question is if the calculation shows always four
> bytes too much?

actually the answer to this was easier then I thought. The bug is not in
line 195. I don't even had to read the specification to find the answer
to this problem. The display of the value is simply wrong.

diff -u -r1.3 sbcinfo.c
--- sbcinfo.c   23 Nov 2004 09:12:22 -0000      1.3
+++ sbcinfo.c   15 Mar 2005 07:49:28 -0000
@@ -275,7 +275,7 @@
                                printf(", %d", bitpool[n]);
                printf("\n");
                printf("Number of frames\t%d\n", num);
-               printf("Frame length\t\t%d", frame_len[0] + 4);
+               printf("Frame length\t\t%d", frame_len[0]);
                for (n = 1; n < SIZE; n++)
                        if (frame_len[n] > 0)
                                printf(", %d", frame_len[n]);

You will see it when checking with sbc_test_09.sbc and sbc_test_10.sbc
for example.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2005-03-15  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-15  7:01 [Bluez-devel] sbcinfo.c frame_len problem? Brad Midgley
2005-03-15  7:44 ` Marcel Holtmann
2005-03-15  7:54   ` Marcel Holtmann [this message]
2005-03-15 15:57     ` Brad Midgley

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=1110873260.8820.8.camel@pegasus \
    --to=marcel@holtmann.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox