linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: "Christian Hoene" <hoene@uni-tuebingen.de>
Cc: "'Luiz Augusto von Dentz'" <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org,
	"'Hagen Hentschel \(Ellisys\)'" <hagen.hentschel@ellisys.com>
Subject: Re: SBC loudness bug?
Date: Thu, 23 Dec 2010 01:07:32 +0200	[thread overview]
Message-ID: <201012230108.48623.siarhei.siamashka@gmail.com> (raw)
In-Reply-To: <000601cba1e2$86077e70$92167b50$@de>

[-- Attachment #1: Type: Text/Plain, Size: 2735 bytes --]

On Wednesday 22 December 2010 16:14:16 Christian Hoene wrote:
> Hello,
> 
> Mr. Hagen Hentschel was telling me that the BlueZ SBC implementation still
> has an bug.

Yes, unfortunately bluez sbc *decoder* is still as bad as it used to be. There
easily may be more than one bug in it.

I feel somewhat responsible for not bringing sbc decoder into a better shape
earlier. But at that time, only properly working and fast sbc *encoder* was
needed for A2DP bluetooth stereo headsets support in Nokia N900. Moreover, I
had run out of allocated time to this task (due to actually having to fix some
bluez sbc encoder bugs in addition to doing just performance optimizations) and
had to wrap up this activity even before all the planned ARM NEON optimizations
had been implemented.

Fortunately I had some spare time on the last summer vacation to spend on bluez
sbc codec. It was a tough choice deciding between either fixing the decoder or
adding missing ARM NEON optimizations to the encoder. But in the end I decided
to get at least one thing done right (the encoder), especially considering that
it happens to be referred from several places as an example of ARM NEON
optimizations. And I just did not feel right about having clearly incomplete
stuff there :) So the encoder got more optimizations [1][2], and the decoder
remained the way it was (it is still in my low priority TODO list).

> As compared to Bluetooth's reference implementation the signal
> is twotimes too silent. We told me, that in the last step of calculating
> the PCM samples a 1 bit right shift was done too much.
> 
> A correct implementation for C# can be found at
> http://sourceforge.net/projects/sbcsharp/
> 
> Sorry, due to time limits I cannot provide you with a patch...

Even without looking at the changes (after all, it's not so easy without a
patch), I guess it's more like a band aid. The whole decoder needs to be
seriously reworked. At least dropping the current synthesis filter
completely and reimplementing it straight according to A2DP spec is
necessary. We can't verify whether the current filter is correct, and also
its low precision is likely masking the other bugs and deviations from the
spec. I had some notes about it earlier in [3].

I have no idea when this all might be done unless somebody steps up for this
task (Hagen?). Or unless I myself somehow get an opportunity to work on fixing
sbc decoder full time for at least a week (next summer vacation?).


1. http://marc.info/?l=linux-bluetooth&m=127781938327437&w=2
2. http://marc.info/?l=linux-bluetooth&m=127807359119577&w=2
3. http://marc.info/?l=linux-bluetooth&m=126106163120842&w=2

-- 
Best regards,
Siarhei Siamashka

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-12-22 23:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  9:35 [PATCH v3] sbc: detect when bitpool has changed Luiz Augusto von Dentz
2010-12-22 14:14 ` SBC loudness bug? Christian Hoene
2010-12-22 23:07   ` Siarhei Siamashka [this message]
2010-12-22 17:55 ` [PATCH v3] sbc: detect when bitpool has changed Brian Gix
2010-12-22 22:44 ` 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=201012230108.48623.siarhei.siamashka@gmail.com \
    --to=siarhei.siamashka@gmail.com \
    --cc=hagen.hentschel@ellisys.com \
    --cc=hoene@uni-tuebingen.de \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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).